> ## This Does what I want !!
> $tmp ="Joe Smore1qazxswedcvfrtgbnhytujmkilptyoXXXXt5000";
> ($tmp) = $tmp =~ m/^(\w{3})/;
> print "$tmp\n"; ## "Joe"
> 
> Why does $tmp need '(...)'  ??

Regular expression matches return ($1, $2, ...) in list context. The
parentheses force that.

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to