also sprach John S. J. Anderson <jacobs@genehack.org> [2002.04.15.1243 +0200]: > jeff <jmr71769@earthlink.net> writes: > > > dpkg -l | sed -e 's/$/<br>/ > dpkg.html > > dpkg -l | perl -e 'while(<>) { s/$/<br>/ && print }' > dpkg.html > > <golf type="perl"> > dpkg -l | perl -lpe 's/$/<BR>/' > dpkg.html > </golf> > > Darn, I thought I could make it shorter than the sed version... he left out a quote with sed: two characters to go. perl -pe suffices: one character the length of the program doesn't really count: same length... -- martin; (greetings from the heart of the sun.) \____ echo mailto: !#^."<*>"|tr "<*> mailto:" net@madduck a c programmer asked whether computers have buddha's nature. as the answer, the master did "rm -rf" on the programmer's home directory. and then the c programmer became enlightened...
Attachment:
pgpLCKdpp2Zur.pgp
Description: PGP signature