Endless has asked for the wisdom of the Perl Monks concerning the following question:
Hello Monks,
I am baffled as to why this code isn't working; it just returns "1, 1, 1" when I have three elements in the array. I use virtually the same regex elsewhere and it works fine. If I switch to "uc", that works, too; so I know I still have the correct values in my ARGV. Can someone give me an explanation? (I'm just trying to strip the provided names down to the file names without directory structure).
Thanks!print $out_file "Lexicons: ", join(', ', map{s/.*\///} @ARGV[FIRST_LEX +ICON .. $#ARGV]), "\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Map with Regex Replace
by Corion (Patriarch) on Aug 08, 2013 at 13:50 UTC | |
by kennethk (Abbot) on Aug 08, 2013 at 14:43 UTC | |
by Endless (Beadle) on Aug 08, 2013 at 14:01 UTC |