Hi,
Suppose I have this:
#!/usr/local/bin/perl
use strict;
my $string = "Theres more than 1 way to do it";
if ($string =~ /\w+$/){
print "Hooray! pattern found";
print $1;
}
My goal is to print the last word.
However, it only prints "Hooray! pattern found";
Any idea what's wrong with $1??
Thanks
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>