Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: How to use fseek in perl ??

by mwah (Hermit)
on Oct 24, 2007 at 11:53 UTC ( [id://646873]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    for Unix:
     perl -i.bak -0777 -lpe 's/\nef\n/\nef\na test content\n<blank line>\n
    +/' a.txt
    
    for Windows:
     perl -i.bak -0777 -lpe "s/\nef\n/\nef\na test content\n<blank line>\n
    +/" a.txt
    
  2. or download this
    Unix:
     perl -i.bak -pe 'print "a test content\n<blank line>\n" if $.==4' a.t
    +xt
    
    Windows:
     perl -i.bak -pe "print qq{a test content\n<blank line>\n} if $.==4" a
    +.txt
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (7)
As of 2024-03-28 10:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found