perl -e 'while(<>) {
if(m/y/&&m/u/&&m/o/&&m/i/&&m/a/&&m/e/){ s/'\''`//;push(@a,$_);}
}
print sort{length($a)<=>length($b)||$a cmp $b;}@a'
It was posted as a one liner but I broke it in many lines because I hate code that obliges you to horizontally scroll a page.
Today, I would use modifiers and drop parenthesis here and there but would not write it very differently.
--
stefp
In reply to Re: How long have you been using Perl?
by stefp
in thread How long have you been using Perl?
by vroom
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |