Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
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 chanting in the Monastery: (5)
As of 2014-10-21 01:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (94 votes), past polls