in reply to push foreach glob - bug?
Hm. Modifying an array whilst iterating over it? Maybe you should rather say
perl -le '@l = glob("*.mp3"); push @{$f[/ad/]}, $_ foreach @l;
(update) since @l[0,1] contain file names, not array references.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: push foreach glob - bug?
by ikegami (Patriarch) on Jan 13, 2010 at 22:58 UTC | |
by shmem (Chancellor) on Jan 13, 2010 at 23:10 UTC |
In Section
Seekers of Perl Wisdom