[ABE.pm] So who can explain this?

Ricardo SIGNES rjbs-perl-abe at lists.manxome.org
Wed Sep 5 12:24:54 PDT 2007


* Ted Fiedler <fiedlert at gmail.com> [2007-09-05T15:17:22]
> perl -e 'print  map { s/^.{1}0{0,}//, $_} shift @ARGV' D234
> perl -e 'print  map { s/^.{1}0{0,}//, $_} shift @ARGV' 000000234
> perl -e 'print  map { s/^.{1}0{0,}//, $_} shift @ARGV' D0000234
> 
> prints: 1234

You want a semicolon, not a comma, in the map.  the s/// returns 1, and the
print concatentates the 1 to the 234.

-- 
rjbs


More information about the ABE-pm mailing list