I abhor foreach/push loops. Gag me with a spoon!
my @paragraph = map { local $_ = lc; tr/-~//cd; /foobar/ ? () : do { s/administrator/admin/g; length() > 60 ? () : $_ } } grep /^#/, @lines;
That code was ugly and I wouldn't have actually written that.
my @paragraph = map { if ( /^#/ ) { () } else { local $_ = lc; tr/-~//cd; if ( /foobar/ ) { (); } else { s/administration/admin/g; length() > 60 ? () : $_; } } /^#/ ? do { } : (); } @lines;
In reply to Re: Re: Re: "foreach" is to "next" as "map" is to ???
by diotalevi
in thread "foreach" is to "next" as "map" is to ???
by McMahon
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |