![]() |
|
go ahead... be a heretic | |
PerlMonks |
Re^8: What esteemed monks think about changes necessary/desirable in Perl 7 outside of OO staffby Fletch (Bishop) |
on Sep 15, 2020 at 15:51 UTC ( #11121801=note: print w/replies, xml ) | Need Help?? |
Had a reeeeeaaaaly vague recollection and the Perl Cookbook (Ch 1 section 19) does actually offer $_ = join(' ', split(' ')); as an alternative to these three substitutions:
to strip and canonicalize to single spaces; and does offer this trim sub:
Edit: That being said, I don't recall having seen this construct in the wild otherwise and had the vaguest of hunches that PC mentioned anything like this so I'd hardly call it a "common idiom" either.
The cake is a lie.
In Section
Meditations
|
|