Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

RE: Re: Writing to files

by chromatic (Archbishop)
on Apr 10, 2000 at 21:01 UTC ( #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? | Other CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2022-08-17 23:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?