Today’s Shell Snippets
tower$ jot -w "%03u" -s " " 19 2 002 003 004 005 006 007 008 009 010 011 012 013 014 015 016 017 018 019 020
tower$ python -c "print ' '.join(['%03u' % i for i in xrange(2, 21)])" 002 003 004 005 006 007 008 009 010 011 012 013 014 015 016 017 018 019 020
tower$ perl -e 'print join(" ", map { sprintf("%03u", $_) } (2..20)), "\n"' 002 003 004 005 006 007 008 009 010 011 012 013 014 015 016 017 018 019 020
2 Comments RSS · Twitter
August 14, 2003 3:58 PM
The folks at perlmonks are playing "golf" with your perl version.
http://www.perlmonks.org/index.pl?node_id=283960
Cool!
It looks like some of the versions add an extra space before the newline, which I think is cheating. :-)