Shouldn't it be:
open(FH,"<$file") or die "The file $file could not be found";
Barry Brevik
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
nd".
If you are expecting the array index to begin at 0, then do some bounds
checking on your "complicated function" so that it does not return out of scope
arguments to your Perl functions.
Barry Brevik
___
Perl-Win32-Users mailing list
I am using the Win32::ODBC module, and I continually get the following
error message:
Can't locate auto/Win32/ODBC/GetTypeInfo.al in @INC (@INC contains:
C:/Perl/site/lib C:/Perl/lib .) at odbcinfo.pl line 58
Indeed, there is no "filename.al" file of any kind on my disk anywhere,
which leads m
t I have been unable to find any
function in Win32::ODBC that returns this prefix string.
Can anyone point me in the right direction? Thank you,
Barry Brevik
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
rl Command Line Interpreter has encountered
a problem and needs to close. We are sorry for
the inconvenience."
Here is a link to the actual error:
http://www.manicreader.com/gallery/latest/perlerror.jpg
I would appreciate any clues as to where to start looking to fix this
pr
tc. Perl itself never issues any error
despite "use strict; use warnings;", and the cmd window is never closed.
So is this one of those things we live with that everyone knows about
except me?
Barry Brevik
___
Perl-Win32-Users mail
at
continuously loops waiting for something to do, and it would be good to
give control back to the OS when idle. There is Win32::GUI::DoEvents(),
but I am unsure if this really does the same thing.
Barry Brevik
___
Perl-Win32-Users mailing list
P
an idea on how to fix this?
-Barry Brevik
===
use strict;
use warnings;
use Win32::Gui;
use Win32::Console;
my $STDOUT = new Win32::Console(STD_OUTPUT_HANDLE);
my $STDIN = new Win32::Console(STD_INPUT_HANDLE);
$STDIN->Mode(ENABLE_PROCESSED_INPUT
I have a subroutine to which I want to pass a hash by reference. In the
real program, the hash in the caller starts out empty, and the
subroutine adds values to it.
The hash eventually becomes quite large, so I want the subroutine to add
values to the caller's hash. The following sample code does
I always get majorly confused when I have to deal with Arrays of Arrays,
Arrays of Hashes etc. The Camel book has a good section on this, but it
is not always enough. That's why each time I do one, I document it in a
file on my disk. However, I have not done this one before.
I am extracting Bill
Hello-
>From time to time I need a subroutine to generate a temporary file name
so I created an imperfect routine (shown below) to generate a file name
based on the current time. The problem with this is that it will create
only 1 'unique' name every second, and when the day rolls over, it will
s
Oops, I guess it doesn't duplicate the next day. My bad.
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
$txt =~ s/^(.{1,39})/$1/;
print "Resulting string: $txt\n";
Barry Brevik
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Wow, thank you all for the many replies I received!!
Barry Brevik
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
code and change every print
statement.
Barry Brevik
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Since list traffic seems to be overly light, I'll post this slightly
off-topic query.
All of my Perl books seem to use the word "list" and "array"
interchangeably. Is there a difference between a list and an array?
(believe it or not, I'm not a newb).
Barry B
t; To: perl-win32-users@listserv.ActiveState.com
> Subject: Re: List vs. Array
>
> On 08/19/2011 04:24 PM, Barry Brevik wrote:
> > Since list traffic seems to be overly light, I'll post this
> slightly
> > off-topic query.
> >
> > All of my Perl books seem to use the word "
I'm working on an app that periodically needs to execute outside
procedures. Ideally, I want to launch the outside procedure in "fire and
forget" mode; that is, I do not want to wait for the outside process to
terminate.
I ALREADY HAVE some code that does this (see below). My question is- is
there
board
input.
I've been writing a routine that uses Win32::Console in the manner shown
below.
Anyway, writing this has become way complex, and I've lost my way. I'm
wondering if anyone out there has some example code that they would be
willing to
use a loop, but is there a cleaner, more Perl-ish way of
doing it?
Barry Brevik
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
The Camel book seems to say that splice will only remove or change
elements and move them *down* if necessary.
You must think I'm a raging newb, but I gotta admit, I've never used
splice. Thanks, I'll check it out!
Barry Brevik
> -Original Message-
> From:
Splice with a length of 0... I wish I had thought of that. Thank you!
> Everybody's a 'newb' at stuff that haven't tried before. It
> might help to think of inserting elements into an array as
> replacing a section of length 0, when you read 'perldoc -f splice'.
>
> It might also be worth takin
Using Perl 5.8.8.
I have both of the Win32 books and I've googled for this but I've come
up short.
Does anyone know how to set the time on a Windows server from a remote
machine?
Barry Brevik
___
Perl-Win32-Users mailing list
Perl-W
anner [mailto:tan...@optonline.net]
> Sent: Monday, September 26, 2011 5:26 PM
> To: Tobias Hoellrich; 'Barry Brevik';
> perl-win32-users@listserv.ActiveState.com
> Subject: RE: Setting file server time
>
> NET TIME was my first thou
, Sep 28, 2011 at 4:04 AM,
wrote:
I've used Win32-OLE to start/execute processes on remote
computers. In
this scenario you could use Win32-OLE to call time
-Original Message-
From: perl-win32-users-boun...@listserv.activestate.com
27;, "\x08"; next;} #
Backspace key.
print chr($input[5]);
}
}
}
As an aside, I think we need to get more traffic on this list somehow.
Barry Brevik
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
T
I want to thank those who responded; it was all good advice.
It turns out that what I was looking for was GetEvents. I really need to
pay more attention to the module docs.
>
> I think you wanted to call PeekInput() instead of Input() here.
>
> But GetEvents() may be even better if you only wan
Last week I had posted a query about getting keyboard input in a non
blocking way.
I received several replies, so I thought I would post back the code I
developed which seems to work.
This is not the code I will end up using; it is more like a proof of
concept program.
use strict;
use warnings;
ot;) as an ARRAY ref while "strict refs" in use at
test42.pl line 39.".
I know this smells like a newbie problem, but I'm not a newbie;
nevertheless, I guess I do not know enough about array references yet.
Barry Brevik
==
use
Ah, I see. Yes, that had eluded me.
> Here you are flattening the @$record into @toparray. If you
> wanted to keep the nested array structure, you would have to
> push the array reference instead:
>
> push @toparray, $record;
>
> Or if for whatever reason you must create a copy of the d
or me about how they create directories with
Perl?
Barry Brevik
=
use strict;
use warnings;
umask 0;
my $thisPath = "c:\\temp\\megabom\\newdir";
unless (-d $thisPath) {mkdir $thisPath, 0777;}
if (-r $thisPath) {print " Sub folder is read for eve
Thank you for the tips... I will try them.
> -Original Message-
> From: Kanhaiya Prasad [mailto:kpra...@aptaracorp.com]
> Sent: Monday, October 24, 2011 10:08 PM
> To: 'Sisyphus'; Barry Brevik;
> perl-win32-users@listserv.ActiveState.com
> Subject: RE
t; Sent: Monday, October 24, 2011 6:00 PM
> To: Barry Brevik; perl-win32-users@listserv.ActiveState.com
> Subject: Re: Making directories
>
>
> - Original Message -
> From: "Barry Brevik"
>
> > Does anyone have advice for me about how they create
>
PPN with the repositories I have configured only has the older version
of File::Path that only has 'mkpath'.
From: perl-win32-users-boun...@listserv.activestate.com
[mailto:perl-win32-users-boun...@listserv.activestate.com] On Behalf Of
Justin Allegakoen
ating the "bad"
directory), this is when trying to overwrite the files fails.
Sorry for all the parens.
I hope that makes it more clear, and I should have said that in my 1st
post.
Barry Brevik
___
Perl-Win32-Users mailing list
Perl-Win32-U
about any other Win32 extensions?
I require these extensions, so I don't know what to do.
Thanks,
Barry Brevik
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Daemon
Do these all work under 5.14?
Barry Brevik
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
question, this works for me (on
Windows):
use strict;
use warnings;
my $msg =
'this is line one
this is line 2
this is line III';
print "original string:\n$msg\n\n";
print "the array:\n";
my @ans = split /\n\r/, $msg;
print "$_\n
0 is the one where the same
message is in the comment.
I realize that the sample code has some elements specific to my
environment, but it is the best I could do, and it is pared down quite a
bit.
Thanks,
Barry Brevik
--
use strict;
use warnings;
use Win32::ODB
laces the
final match. I have just re-read the camel book section on regexes and
have tried many variations, but apparently I'm too close to it to see
what must be a simple answer.
BTW, if you guys think I'm posting too often, please say so.
Barry Brevik
Hi Barry,
On Thu, Nov 10, 2011 at 2:34 AM, Barry Brevik wrote:
> Below is some test code that will be used in a larger program.
>
> In the code below I have a regular expression who's intent is to look
> for " <1 or more characters> , <1 or more characters&g
feel
like I'm the only one posting questions to the list, and it alarms me
that the traffic is so low... I would really regret having this list go
dormant, as I have learned so much, especially from reading threads I
did not post. And the people are really friendly.
Barry Brevik
ork a little better, but will not deal with spaces
between fields, which are not supposed to be there anyway.
Barry Brevik
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
> Don't know if it helps, but I seem to have installed
> Text::CSV_XS on Activestate 5.14.1 build 1401.
I'm on Perl 5.8.8 because my Perl DevKit only works on that version.
Barry Brevik
___
Perl-Win32-Users mailing list
I'm having a problem with a recursive routine that enumerates a directory tree
and all of its files. It works well, except when it goes down 1 level from the
top directory, I get this message: Use of uninitialized value in addition (+)
at test61.pl line 61.
I've been fighting this thing for a c
Thanks. That is a cool observation.
-Original Message-
From: Tobias Hoellrich [mailto:thoel...@adobe.com]
Sent: Monday, November 28, 2011 3:47 PM
To: Barry Brevik; perl Win32-users
Subject: RE: Problem with recursive routine
You are not changing the directory while traversing. Whenever
About a week ago, I posted a question about a recursive directory
enumeration function that I was having trouble with, and Tobias
Hoellrich wrote back and pointed out my ridiculous oversight. I thought
that I would post the resulting code as a point of interest. It is kinda
bloated with a bunch of
the daylight savings time state.
I want something light weight (rather not use a module) and it only has
to deal with the PST timezone.
Has anyone found a Win32:: method that will retrieve the DST state from
Windows? Also, when the date is expressed in that format, is it supposed
to represent UTC
> In list context it returns the DST state as the last
> value so (localtime())[-1] would give that value.
OK, that is just lame of me to miss that. Thank you so much.
Barry Brevik
___
Perl-Win32-Users mailing list
Perl-Win32
On Thu, 26 Jan 2012, Barry Brevik wrote:
> > In list context it returns the DST state as the last value so
> > (localtime())[-1] would give that value.
>
> OK, that is just lame of me to miss that. Thank you so much.
> Not sure if this matters to you, but at least olde
I've been Googling for 2 hours and do not see what I'm looking for.
Does anyone know how to turn on/off the computer's monitor using Win32
modules?
Barry Brevik
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.Act
s in the domain if
necessary. In fact, I'm willing to jump through a fair number of hoops
to collect this information.
Does anyone out there know how to do this, or at least have an idea as
to how to do this?
Thanks in advance,
Barry Brevik
Thank you for the detailed response, even if it is depressing.
Barry Brevik
> On the other hand, if you are really asking the question "from",
> you have to go to the event logs; there, you can get if a login
> was local or via the network. The problem, of course, i
ight want to pass.
Google the Win32::Process module for the priority classes as well as other
flags, etc.
Barry Brevik
-
From: perl-win32-users-boun...@listserv.activestate.com
[mailto:perl-win32-users-boun...@listserv.activesta
o query for domain controllers: ",
Win32::FormatMessage(Win32::NetAdmin::GetError()), ".\n");
}
ERROR message is:
Unable to query for domain controllers: No more connections can be made
to this remote computer at this time because there are already a
8519-1677701-1424}';
my $accountname = '';
my $siddomain = '';
my $sidtype = '';
Win32::LookupAccountSID("qbert", $usersid, $accountname, $siddomain,
$sidtype);
print "error..: ", Win32::FormatMessage(Win32::GetLastError()),
"\n&q
Thanks for posting!!
-Original Message-
From: Ken Cornetet [mailto:ken.corne...@kimball.com]
Sent: Tuesday, July 10, 2012 11:39 AM
To: Barry Brevik; perl Win32-users
Subject: RE: Win32::LookupAccountSID()
http://code.activestate.com/lists/perl-win32-users/26301/
-Original Message
there know how to do
this?
TIA,
Barry Brevik
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Ay Caramba!! I thank you for the post, but my skills are too low to
reverse that monstrosity!
Barry Brevik
-Original Message-
From: Cordoni, Ray [mailto:rcord...@richmond.ca]
Sent: Wednesday, July 18, 2012 11:38 AM
To: Barry Brevik; perl Win32-users
Subject: RE: Help with
I tried to implement that call using Win32::API, but I just don't know
enough about Windows to make it work.
Thank you for posting,
Barry Brevik
-Original Message-
From: Howard Tanner [mailto:tan...@optonline.net]
Sent: Wednesday, July 18, 2012 11:31 AM
To: Barry Brevik; Perl-
Thank you again.
I saw that, but it looks like it might not be available to Perl 5.14 and
I am looking to upgrade.
Barry Brevik
-Original Message-
From: Howard Tanner [mailto:tan...@optonline.net]
Sent: Wednesday, July 18, 2012 12:11 PM
To: Barry Brevik
Cc: Perl-Win32-Users
nd of
call into an XS module or something.
Thank you for posting,
Barry Brevik
-Original Message-
From: Steven Manross [mailto:ste...@manross.net]
Sent: Wednesday, July 18, 2012 5:07 PM
To: Barry Brevik; perl Win32-users
Subject: RE: Help with LookupAccountSID (again)
What about the foll
x27;m sorry that it
is about 90 lines in length. Can anyone help?
Thank you,
Barry Brevik
---
use strict;
use warnings;
use Win32;
use Win32::GUI();
my $main = Win32::GUI::Window -> new
(
-name => 'Main',
-title => 'Test v0.1',
-widt
63 matches
Mail list logo