Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > multiple changes on multiple lines

Reply
Thread Tools

multiple changes on multiple lines

 
 
Dave
Guest
Posts: n/a
 
      04-02-2005
Hello

I would appreciate tips where I can find a base for re programming or
where a can buy perl script with this functions

I have a file that need multiple changes on multiple lines


replaceblock.pl FileToChange.txt blockreplace.txt

example FileToChange.txt

line 1 /*
line 2 [00.893]
line 3 text2
line 4 text3
line 5 /* explanation
line 6 /* text
line 7 text [0.456.] text
line 8 text8
line 9 test ("text9"), text [35.989 , 67.88 , 33.02]
line 10 text text text
line 11 text [2.5] text
line 12 text 55
line 13 text and numbers with programming symbols....
line 14 text14

example blockreplace.txt

[start block] /* replacing line 2 and 3
[00.893]
text2
[end block]
[start replace block]
[2.15]
text2 with more text
[end replace block]

[start block] /* replacing line 9, 10 and 11
test ("text9"), text [35.989 , 67.88 , 33.02]
text text text
text [2.5] text
[end block]
[start replace block]
test ("texzz9"), tezz [15.00 , 60.00 , 30.00]
tezz tezz tezz
[end replace block]

[start block]...... "numbers of blocks change from file to file"


newbie in perl

Ihave made a script 7 years ago, and havent used perl since.

Thanks

/Dave
 
Reply With Quote
 
 
 
 
Gunnar Hjalmarsson
Guest
Posts: n/a
 
      04-02-2005
Dave wrote:
> I would appreciate tips where I can find a base for re programming


http://learn.perl.org/

> or where a can buy perl script with this functions


http://www.google.com/

(but I doubt you'll find anything)

--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Preserve blank lines when add multiple lines of text to a cell Cah Sableng Javascript 0 04-23-2007 04:46 AM
How to know two lines are a pare parallel lines lovecreatesbeauty C Programming 11 04-28-2006 03:32 AM
Asp.Net Calender, how to display 5 lines if there are only 5 lines in one month? Jack ASP .Net 9 10-12-2005 03:44 AM
Modems, Analog Lines and ... Electrical Lines? Sens Fan Happy In Ohio Computer Support 5 09-02-2004 04:15 AM
Re: how to read 10 lines from a 200 lines file and write to a new file?? Joe Wright C Programming 0 07-27-2003 08:50 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57