in reply to Win32 File Creation Weirdness, ActivePerl 5.8.8
Most likely that is a quoting issue between cmd.exe and Perl. I try to avoid double quotes in my oneliners:
perl -e "for (glob '*') { my ($id) = /(\d+)$/ || /^(\d+)/; print qq($_ + => id=$id\n); }"
If you want to find out what Perl sees, use B::Deparse:
>perl -MO=Deparse -e "for (glob '*') { my ($id) = /(\d+)$/ || /^(\d+)/ +; print qq($_ => id=$id\n); }" use File::Glob (); foreach $_ (glob('*')) { my($id) = /(\d+)$/ || /^(\d+)/; print "$_ => id=$id\n"; } -e syntax OK >perl -MO=Deparse -e "for (glob '*') { my ($id) = /(\d+)$/ || /^(\d+)/ +; print \"$_ => id=$id\n\"; }" -e syntax OK >
So Perl doesn't even want to tell me what's going on with the double-quote thing.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Win32 File Creation Weirdness, ActivePerl 5.8.8
by missingthepoint (Friar) on Jul 07, 2009 at 08:51 UTC |