Re: Am I doing something really stupid?

2009-10-13 Thread cknipe
foreach my $File (@Files) { print $File "\n"; This print statement is treating $File as a file handle. It is similar to: print STDERR "\n"; I saw the typo a few minutes after I sent the email (it always happens that way!). At least I'm not loosing my mind yet :) -- Chris -

Am I doing something really stupid?

2009-10-13 Thread cknipe
Hi, I have the following code: #!/usr/bin/perl use diagnostics; use strict; use warnings; my @Files = ; foreach my $File (@Files) { print $File "\n"; } I have the following files in /flows/ r...@stats1:/flows# ls -l total 245M -rwxrwxr-x 1 root root 146 Oct 13 15:31 ParseNetFlow* -rw-r--r--

Re: regex matching

2006-05-31 Thread cknipe
if (($_ =~ m/match string/i) && ($_ !~ m/does not match string/i)) { Works flawlessly, thanks allot... -- Chris Quoting Shashidhara Bapat <[EMAIL PROTECTED]>: > Hi, > > yes you can do that. For "not match", you got to use "!~". > > - shashi > > On 5/31/06, [EMAIL PROTECTED] <[EMAIL PROTECT

regex matching

2006-05-31 Thread cknipe
Hi, if ($_ =~ m/match string/i) { if ($_ =~ m/does not match string/i) { } else { print $_; Regex is not my strong point, so I'm going to ask... Is there any way to write that better? Preferably only using one if statement? if (($_ =~ m/match string/i) && ($_ =~ m/does not matc

Re: Is there any way to get the name of the Window Server that the Perl script is currently running on?

2006-05-26 Thread cknipe
Quoting Dan <[EMAIL PROTECTED]>: > > "Japerlh" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > Help: Is there any way to get the name of the Window Server that the > Perl script is currently running on? > > Thanks. Uhm, there is always the hostname.exe command as well if you wa