Given the following snippet of code could someone explain to me
why the linefeed gets included in $num?

mike@/deb40a:~/perl> perl -e'
$str = "asdfggfh 987321qwertyyy\n";
($num = $str) =~ s/^.*?(\d+).*$/$1/;
print $num;
' | hd
00000000  39 38 37 33 32 31 0a                              |987321.|
00000007

Thanks,
Mike
-- 
Satisfied user of Linux since 1997.
O< ascii ribbon campaign - stop html mail - www.asciiribbon.org

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to