Arowana
12-09-03, 11:21 AM
Hi guys,
perl NEWBIE here, trying to answer a question. I'd appreciate any help.
Consider the following substitution:
s/([A-Z][a-z]+) ([A-Z][a-z]+)/$2 $1/;
Suppose $_ eq "Tom Hanks" before the above substitution is applied. What is stored in $_ afterwards?
I have been reading this book (Learning Perl Third Edition) over and over again, and I cannot figure this out to save my life. I know it'll probably be simple for you guys, though. Thanks!
Chris
perl NEWBIE here, trying to answer a question. I'd appreciate any help.
Consider the following substitution:
s/([A-Z][a-z]+) ([A-Z][a-z]+)/$2 $1/;
Suppose $_ eq "Tom Hanks" before the above substitution is applied. What is stored in $_ afterwards?
I have been reading this book (Learning Perl Third Edition) over and over again, and I cannot figure this out to save my life. I know it'll probably be simple for you guys, though. Thanks!
Chris