Beefy Boxes and Bandwidth Generously Provided by pair Networks Ovid
Perl: the Markov chain saw
 
PerlMonks  

Re: read a file twice...

by clintp (Curate)
on Apr 15, 2002 at 15:56 UTC ( #159245=note: print w/ replies, xml ) Need Help??


in reply to read a file twice...

In the spirit of TIMTOWDI and filed under "don't do this at home":

#!/usr/bin/perl -w push(@ARGV, "filetoread", "filetoread"); while(<>) { print; } continue { # This block not necessary, but for fun only print "Second verse, same as the first!\n" if (eof ARGV && @ARGV); }


Comment on Re: read a file twice...
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://159245]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (17)
As of 2014-04-16 14:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (428 votes), past polls