Interesting. Reverse of 'bus' is 'sub'. Hmm. Is it wise, or necessary? - no you have scalar at your disposal to force scalar context safely. Eval-ing strings (especially some strings ;-) reversed or not is potentially dangerous. It ended up there because I wondered what would happen if I put it there, it worked on the test case, so it stayed. Just simple curiosity. Never used it before and I doubt I'll use it again.
$b = '}"n\!nhoJ olleH" tnirp{b bus'; print eval reverse $b; &b; $_ = 'web&lave'; print eval reverse; sub AUTOLOAD {print}
cheers
tachyon
s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print
In reply to Re: Re: Reverse in scalar context
by tachyon
in thread Reverse in scalar context
by tachyon
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |