On Tue Sep 13 08:17:35 2011, jerry@nightwatch.org.uk wrote: > > "03abcde" =~ /^(..)((??{sprintf".{%d}",hex("0x$1")}))/; > print "$`:$&:$' -> [$1] [$2]\n" > > Run the same code with 'use bigint;': > > use bigint; > "03abcde" =~ /^(..)((??{sprintf".{%d}",hex("0x$1")}))/; > print "$`:$&:$' -> [$1] [$2]\n" > > and the RE doesn't match and $' is filled with garbage, which would > appear to > be the memory of the process. > I get a somewhat different result. ### "03abcde" =~ /^(..)((??{sprintf".{%d}",hex("0x$1")}))/; print "$`:$&:$' -> [$1] [$2]\n"; use bigint; "03abcde" =~ /^(..)((??{sprintf".{%d}",hex("0x$1")}))/; print "$`:$&:$' -> [$1] [$2]\n"; ### ... produces: ### :03abc:de -> [03] [abc] Use of uninitialized value $2 in concatenation (.) or string at 99026.pl line 13. :03abc:de -> [03] [] ### ... i.e., no garbage, but no good results either. (Perl 5.14.2/Linux i386) Thank you very much. Jim KeenanThread Previous | Thread Next