hwg-languages archives | Mar 2001 | new search | results | previous | next |
Perl Regex to strip all but last character in a stringby "Jan Morell" <jan_man(at)bellsouth.net> |
|
Hi List Members, I am trying to strip all but the last digit in a string. I tried using: $foo =~ s!^..!!; which workd fine if there are 3 digits in the string. (The case most of the time), but there might only be 2 digits. Am I going about this backwards? Thanks for any help. Jan
HWG: hwg-languages mailing list archives, maintained by Webmasters @ IWA