Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Editing the contents of a variable

by Anonymous Monk
on Aug 21, 2012 at 12:49 UTC ( [id://988717]=note: print w/replies, xml ) Need Help??


in reply to Editing the contents of a variable

#!/usr/bin/perl use 5.010; use strict; use warnings; for( "yada yada <name> string-to-capture </name> foo bar baz", 'another<name>string</name>' ){ my $var=join(q{},split(q{ },(m{<name>(.*?)</name>}is)[0]//next)); print "<$var>\n"; }

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (2)
As of 2024-04-24 17:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found