in reply to Re^2: palindrome using regular expressions
in thread palindrome using regular expressions
Yes, you are absolutely right. Thanks for the correction.
In fact, I also thought that reverse worked on strings and so I tried print reverse 'hello' which returns hello. From that I (incorrectly) concluded that it doesn't work ... well, got bitten by list context again, print scalar reverse 'hello' does the job OK :)
-- Hofmator
Code written by Hofmator and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: palindrome using regular expressions
by strat (Canon) on Oct 11, 2006 at 07:58 UTC |
In Section
Seekers of Perl Wisdom