> Suppose I have a string in $str, I want to extract > some part of it based on regex and store it in the > same string. how do I do that? > > say... > > $str=~ $str /\d\d\s*$/;
($str) = $str =~ /(\d\d)\s*$; # Takes last two digits # off end of string Jonathan Paton __________________________________________________ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]