in reply to Re^2: Looping through multiple directories
in thread Looping through multiple directories
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"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Looping through multiple directories
by Athanasius (Archbishop) on Dec 26, 2017 at 10:15 UTC | |
|
Re^4: Looping through multiple directories
by haukex (Archbishop) on Dec 26, 2017 at 15:32 UTC |