Why you shouldn't write short code examples in Perl
- Using $a and $b outside of sort() can have serious consequences.
- You can't name a subroutine m, q, s, y (at least my favorites f and g aren't taken).
- Removing duplicate elements from a list:
php> $ary = array_unique($ary);
$ sudo su
# apt-get install curl
# curl -L http://cpanmin.us | perl - --self-upgrade
# cpanm List::MoreUtils
perl> use List::MoreUtils qw(:all);
perl> @ary = uniq @ary;
Anybody care to add?