in reply to Re^2: Opinion: where Perl5 wasn't attractive for me
in thread Opinion: where Perl5 wasn't attractive for me
Probably something to do with reverse operating on scalars or lists and print operating on a list. Using scalar forces scalar context so that reverse operates on $_; not sure what it defaults to operating on in list context :-s
$ perl -Mstrict -Mwarnings -le ' $_ = q{skrow}; print reverse;' $
$ perl -Mstrict -Mwarnings -le ' $_ = q{skrow}; print scalar reverse;' works $
I hope this is of interest.
Cheers,
JohnGG
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Opinion: where Perl5 wasn't attractive for me
by rsFalse (Chaplain) on Nov 20, 2014 at 11:40 UTC | |
by davido (Cardinal) on Nov 20, 2014 at 15:56 UTC |