CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
Inserting into a file

 



lamboap
Deleted

Jan 16, 2001, 9:36 AM

Post #1 of 2 (137 views)
Inserting into a file Can't Post

If anyone can help me with this seemingly easy task, I'd really appreciate it! I'd like to create a script which parses through a file to match a line with a given 'string parameter'. If such a match is made, then I'd like to INSERT a second line either before or after that string, this is determined by a third argument(+ or -). So ideally, I would enter " insert.pl 'searchstring' 'insertstring' 'either + or -'

any ideas would help me a long way!



sleuth
Enthusiast

Jan 16, 2001, 1:30 PM

Post #2 of 2 (131 views)
Re: Inserting into a file [In reply to] Can't Post

 
Please check he faq, there is some code Japhy wrote out that you can modify to do this.

Sleuth


 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives