Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!cs.utexas.edu!uunet!mcsun!hp4nl!mhres!squirrel!pronto!jv From: jv@mh.nl (Johan Vromans) Newsgroups: comp.lang.perl Subject: Re: Shortest Perl and Awk programs Message-ID: <1991Apr1.093713.13741@pronto.mh.nl> Date: 1 Apr 91 09:37:13 GMT References: <9004@rsiatl.Dixie.Com> Sender: jv@pronto.mh.nl (Johan Vromans) Reply-To: Johan Vromans Organization: Multihouse Automation, the Netherlands Lines: 21 In-Reply-To: eeh@Dixie.Com's message of 31 Mar 91 18:54:53 GMT In article <9004@rsiatl.Dixie.Com> eeh@Dixie.Com (Ed Howland) writes: > "What is the shortest awk program that just copies > its input to its output?" I came up with : > > !0 > > What would be the shortest perl program to do this? % perl -pe < file If command-line options are not allowed: % perl -e 'print <>' < file Johan -- Johan Vromans jv@mh.nl via internet backbones Multihouse Automatisering bv uucp: ..!{uunet,hp4nl}!mh.nl!jv Doesburgweg 7, 2803 PL Gouda, The Netherlands phone/fax: +31 1820 62911/62500 ------------------------ "Arms are made for hugging" -------------------------