Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Inserting content into a file at a particular location

by murugu (Curate)
on Aug 25, 2010 at 06:16 UTC ( #857083=note: print w/ replies, xml ) Need Help??


in reply to Inserting content into a file at a particular location

Code is untested.

my ($offset) = grep {$lines[$_]=~/USER\s+NOTE/} (0..$#lines); splice(@lines,$offset+1,0,"@$global_variables_list");

Regards,
Murugesan Kandasamy
use perl for(;;);


Comment on Re: Inserting content into a file at a particular location
Download Code
Re^2: Inserting content into a file at a particular location
by perlpal (Scribe) on Aug 25, 2010 at 09:15 UTC

    Used this piece of code but for some reason my script still hangs at this point.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (8)
As of 2015-01-26 03:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My top resolution in 2015 is:

















    Results (186 votes), past polls