RE: How to count the size of files in a directory

2003-12-27 Thread Tom Kinzer
not sure if you meant except those that match...in that case, replace the if with unless. -Tom Kinzer -Original Message- From: danield [mailto:[EMAIL PROTECTED] Sent: Saturday, December 27, 2003 10:15 PM To: perl_beginer Subject: How to count the size of files in a directory Hello all,

How to count the size of files in a directory

2003-12-27 Thread danield
Hello all, I do have a beautiful script, that counts a size of specified files ("ABAA.txt", "ABAC.txt") in a directory test. I have got this script from discussion board. Here is the script: my $dir='c:\\test'; my @files2check = ("ABAA.txt", "ABAC.txt"); my $totalSize= 0; foreach (@files2check

RE: Scripting a CLI command on Windows 2000

2003-12-27 Thread Tim Johnson
Norrgard, Nate wrote: > I need to have this password passed in before the command will execute. I then want > to move the next command, which will prompt for a password, etc. Depending on the program, I've been able to get away with this in the past. I think it was W2k, it might have been NT4.

Re: Problems with LWP::UserAgent

2003-12-27 Thread Randal L. Schwartz
> "Dan" == Dan Anderson <[EMAIL PROTECTED]> writes: Dan> I guess I should stop then, but I was looking at O'Reilly's Dan> robots.txt file (http://safari.oreilly.com/robots.txt): Dan> User-Agent: * Dan> Allow: / Dan> Which made me think spidering was alright. That's for spide

Re: Newbie problems with > in a string

2003-12-27 Thread Wiggins d'Anconia
Rob Dixon wrote: Albert Browne wrote: Thirdly, the test if ($Author ne "") is tidier written as if ($Author) Unless of course $Author is 0 in which case you have changed the logic. I often use 0 as the default user account id on websites that have user registration, in which case empty

Re: Timeout for backtick and rsh?

2003-12-27 Thread Wiggins d'Anconia
glidden, matthew wrote: In my current script, I'm polling machines for data, mostly by using rsh and the backtick. For example: my $retVal = `rsh $hostname -l root "/usr/local/blah"`; I'd like the backticks to timeout at 30 seconds, to prevent getting stuck. I already added a ping test before the

Re: Timeout for backtick and rsh?

2003-12-27 Thread Wiggins d'Anconia
glidden, matthew wrote: In my current script, I'm polling machines for data, mostly by using rsh and the backtick. For example: my $retVal = `rsh $hostname -l root "/usr/local/blah"`; I'd like the backticks to timeout at 30 seconds, to prevent getting stuck. I already added a ping test before the