Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

RE: Re: Writing to files

by chromatic (Archbishop)
on Apr 10, 2000 at 21:01 UTC ( [id://7246]=note: print w/replies, xml ) Need Help??


in reply to Re: Writing to files
in thread Writing to files

I had better luck with this: perl -i -p -e 'print "first line\n" if $. == 1;' data It depends on the particular magic of $., of course.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2024-04-26 06:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found