Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Writing to a file at a specific point.

by mojobozo (Monk)
on Nov 15, 2002 at 16:20 UTC ( #213185=note: print w/ replies, xml ) Need Help??


in reply to Writing to a file at a specific point.

Well, as I couldn't figure out how to go back and update my original post, I'm doing it thusly!
My solution (ala Mr. Muskrat): I slurped the file into a $var, split it on the magic line ("add here" , basically) into an @file, then opened the file again, printed into it $file[0], my new crap, magic line, $file[1]. close file. BINGO!
My thanks to all who have helped me. This has definitely been a learning experience and I'm getting more and more intimate with perl. Almost to second base... (oh, baby)
_____________________________________________________
mojobozo
word (wrd)
interj. Slang. Used to express approval or an affirmative response to
something. Sometimes used with up. Source


Comment on Re: Writing to a file at a specific point.
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (9)
As of 2014-10-02 09:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    What is your favourite meta-syntactic variable name?














    Results (52 votes), past polls