Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Searching a sequence of tags using regex

by prasadbabu (Prior)
on Jul 13, 2006 at 11:33 UTC ( [id://560908]=note: print w/replies, xml ) Need Help??


in reply to Searching a sequence of tags using regex

Hi rsriram,

Here is one way to solve that problem, you are using the increment operator in find pattern of the regex which is not allowed, instead you increment before that and use the variable alone.

while (<DATA>) { $i++; push(@fnote, $1) if ($_ =~ /<FN$i>(.+)\n/); } $, = "\n"; print @fnote;

Prasad

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (8)
As of 2024-04-23 08:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found