I hate having to write $x = uc $x; when the dwimmiest way would be uc $x; and have it mutate in void context.
The funny (?) thing is that Perl itself is inconsistent when it comes to operators that change strings.
| Mutating | Not mutating |
|---|---|
| chomp chop s/// tr/// |
lc lcfirst quotemeta uc ucfirst |
Juerd # { site => 'juerd.nl', plp_site => 'plp.juerd.nl', do_not_use => 'spamtrap' }
In reply to Re: Re: What should be returned in scalar context?
by Juerd
in thread What should be returned in scalar context?
by tilly
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |