Hello, I've tried to your way.. Here's the result
My code:It just prints none every single time I run my script... Not sure what's wrong but it doesn't seem to work.use strict; use warnings; my $dirs1 = </cygdrive/c/Users/attwwwe1/Documents/dude/logs/*.logs>; my $dirs2 = </cygdrive/c/Users/attwwwe1/Documents/dude/logs2/*.logs>; my @dirs = qw($dirs1 $dirs2); @ARGV = map { <./1848_SoPW/$_/*\.log> } @dirs; if (@ARGV){ while(<>){ #somework } } else{ print "none"; }
In reply to Re^3: Looping through multiple directories
by dotowwxo
in thread Looping through multiple directories
by dotowwxo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |