my @tags = map { /(.{36})\.txt$/ ? $1 : undef } @files;
should be
my @tags = map { /(.{36})\.txt$/ ? $1 : () } @files;
or else you'll end up with a bunch of undefs in @tags.
>perl -le "print 0 + map undef, 1..2 2 >perl -le "print 0 + map { () } 1..2 0
In reply to Re^2: How do I read files in a directory and not directories?
by ikegami
in thread How do I read files in a directory and not directories?
by Win
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |