in reply to parse a string
would probably work. The '$' anchors the pattern to the end of the string, and the brackets around the LastWord variable are to keep things in a list context.my $String = " something, something, something, this "; my ( $LastWord ) = $String =~ m/(\w+)\s$/;
--t. alex
"Nyahhh (munch, munch) What's up, Doc?" --Bugs Bunny
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: parse a string
by Molt (Chaplain) on May 03, 2002 at 15:05 UTC |