Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: read a file twice...

by clintp (Curate)
on Apr 15, 2002 at 15:56 UTC ( [id://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); }

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2024-03-30 07:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found