There's even Scalar::Readonly that allows you to modify readonly variables :)
#!/usr/bin/perl use Scalar::Readonly 'readonly_off'; sub trim { for (@_) { readonly_off($_); s/^\s+//; s/\s+$//; } } for (' foo ', ' bar ') { trim($_); print ">>$_<<\n"; } __END__ >>foo<< >>bar<<
In reply to Re^2: Amusing note on my own stupidity (longish)
by almut
in thread Amusing note on my own stupidity (longish)
by roboticus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |