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 -

Re: Am I doing something really stupid?

2009-10-13 Thread Shawn H Corey
"Am I doing something really stupid?" No, asking for help is never stupid. :) ckn...@savage.za.org wrote: > > Hi, > > I have the following code: > #!/usr/bin/perl > use diagnostics; > use strict; > use warnings; > my @Files = ; > foreach my $File (@Files) { > print $File "\n"; This print st

Re: Am I doing something really stupid?

2009-10-13 Thread jm
not sure, but try print "$File\n"; including the var in the quotes may take care of the problem On Tue, Oct 13, 2009 at 8:34 AM, wrote: > > Hi, > > I have the following code: > #!/usr/bin/perl > use diagnostics; > use strict; > use warnings; > my @Files = ; > foreach my $File (@Files) { > pr

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: scrip

2009-10-13 Thread Philip Potter
Uri's post is excellent as always, and I hope he doesn't mind me piggybacking on it: 2009/10/13 Uri Guttman : >> "JF" == Jesus Fernandez writes: > >  JF> Here is the script: > > it helps if your question and code are in the same posting. this will be > a general code review as well as a solut