|
|
|
good chemistry is complicated, and a little bit messy -LW |
|
| PerlMonks |
Re^4: palindrome using regular expressionsby strat (Canon) |
| on Oct 11, 2006 at 07:58 UTC ( #577544=note: print w/ replies, xml ) | Need Help?? |
|
exactly. reverse is aware of its context; if you use it in string context ($reverse = reverse ...), it reverses the string; but if you use it in list context (print reverse ... or @array = reverse ..), it reverses the list (and does nothing if the list only has one element
Best regards,
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||