Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Searching and replacing text
Hi Everyone,

This is my first post to the list.... Please be gentle :)

Just so we are all clear... I am completely lost right from the start
with this one. It is far beyond my current Perl skills and I need some
serious help :)

I want to create a script that searches file_b for the first entry in
file_a (router1 in the below example) and once it finds it I would like
it to change the next occurrence of "Parent Submap: Any string" to
"Parent Submap: second entry in file_a (site1 in the below example)"

It would also need to be case-insensitive.=20

Can anyone give me a huge push in the right direction?=20

Thank you.=20

-Chris

-------------------------------------
External files:=20
file_a - list of routers and their location
Eg:=20
router1,site1

file_b - output from an openview map export, contains 1000's of entries
like the below example.=20
Eg:=20
SYMBOL: ROUTER1
Object Type: 4
Parent Submap: IP Internet
Symbol Type: cisco Router:cisco-Rtr1720Family
Label: ROUTER1
Symbol Position: 1:11764x11691+7126+653
Hidden Value: FALSE
Submap Exists: TRUE
Background Graphics:=20
Layout Style: 2
Layout On: TRUE
Submap Overlay: TRUE
Show Connection Labels: FALSE
END SYMBOL

Report this thread to moderator Post Follow-up to this message
Old Post
Chris Richards
08-03-04 02:02 PM


Re: Searching and replacing text
Chris Richards wrote:
> This is my first post to the list.... Please be gentle :)

Sure.

> Just so we are all clear... I am completely lost right from the
> start with this one. It is far beyond my current Perl skills

Oh?

> and I need some serious help :)

Then, this is the most serious (and gentle) help I can think of:

http://learn.perl.org/

<job specification snipped>

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

Report this thread to moderator Post Follow-up to this message
Old Post
Gunnar Hjalmarsson
08-03-04 02:02 PM


RE: Searching and replacing text
Fair enough.

-Chris

-----Original Message-----
From: Gunnar Hjalmarsson [mailto:noreply@gunnar.cc]=20
Sent: Monday, 2 August 2004 10:08 PM
To: beginners@perl.org
Subject: Re: Searching and replacing text

Chris Richards wrote:
> This is my first post to the list.... Please be gentle :)

Sure.

> Just so we are all clear... I am completely lost right from the start=20
> with this one. It is far beyond my current Perl skills

Oh?

> and I need some serious help :)

Then, this is the most serious (and gentle) help I can think of:

http://learn.perl.org/

<job specification snipped>

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

--
To unsubscribe, e-mail: beginners-unsubscribe@perl.org For additional
commands, e-mail: beginners-help@perl.org <http://learn.perl.org/>
<http://learn.perl.org/first-response>





Report this thread to moderator Post Follow-up to this message
Old Post
Chris Richards
08-03-04 02:02 PM


Re: Searching and replacing text
Could you post the code you have written thus far? It would be a great help.

-ZO

"Chris Richards" <chrisric@routemaster.net> wrote in message
 news:6AE9C6286E5CEA4CB504C9BACCB487162F9
8@gir2.routemaster.net...
Hi Everyone,

This is my first post to the list.... Please be gentle :)

Just so we are all clear... I am completely lost right from the start
with this one. It is far beyond my current Perl skills and I need some
serious help :)

I want to create a script that searches file_b for the first entry in
file_a (router1 in the below example) and once it finds it I would like
it to change the next occurrence of "Parent Submap: Any string" to
"Parent Submap: second entry in file_a (site1 in the below example)"

It would also need to be case-insensitive.



Report this thread to moderator Post Follow-up to this message
Old Post
Zeus Odin
08-03-04 02:02 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PERL Beginners archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 04:38 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.