Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
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 wandering the Monastery: (4)
As of 2014-07-31 05:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (245 votes), past polls