my @paragraph = map { if ( /^#/ ) { () } else { local $_ = lc; tr/-~//cd; if ( /foobar/ ) { (); } else { s/administration/admin/g; length() > 60 ? () : $_; } } /^#/ ? do { } : (); } @lines;