Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Seaching for text in string and comparing to xml, if not found print text

by cLive ;-) (Prior)
on Feb 14, 2013 at 06:13 UTC ( #1018690=note: print w/replies, xml ) Need Help??


in reply to Seaching for text in string and comparing to xml, if not found print text

Hack way, regex, proper way, parse the XML.

if ($line =~ m|<ALERT_ID>(\d+)</ALERT_ID>|) { my $alert_id = $1; }

I'll leave the XML solution to you + CPAN + searching...

  • Comment on Re: Seaching for text in string and comparing to xml, if not found print text
  • Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1018690]
help
Chatterbox?
[Your Mother]: :P
[ambrus]: YourMother: my brother told me their cat wants to climb into the dishwasher if they leave the door open. Not when the dishwasher is started, but after it's done washing, because it's still warm and cats like warm.

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (12)
As of 2017-12-18 15:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (491 votes). Check out past polls.

    Notices?