blogical has asked for the wisdom of the Perl Monks concerning the following question:
I had:
$first = ('abcd' =~ /(\w)\w(\w)/ )[0]; print $first;
print ('abcd' =~ /(\w)\w(\w)/ )[0];
But apparently I can't have what I want. What is at work here?
"One is enough. If you are acquainted with the principle, what do you care for the myriad instances and applications?"
- Henry David Thoreau, Walden
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Slice misuse ?
by bobf (Monsignor) on Aug 07, 2006 at 21:33 UTC | |
|
Re: Slice misuse ?
by gellyfish (Monsignor) on Aug 07, 2006 at 21:31 UTC | |
|
Re: Slice misuse ?
by liverpole (Monsignor) on Aug 07, 2006 at 21:35 UTC | |
|
Re: Slice misuse ?
by GrandFather (Saint) on Aug 07, 2006 at 21:36 UTC | |
by blogical (Pilgrim) on Aug 07, 2006 at 22:06 UTC |