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

Re^2: Regular Expression Matching Issue

by Punitha (Priest)
on Jan 03, 2008 at 04:06 UTC ( #660119=note: print w/ replies, xml ) Need Help??


in reply to Re: Regular Expression Matching Issue
in thread Regular Expression Matching Issue

I agreed with olus

You can 'join' @test or while reading from the file itself you can read the whole file in single scalar variable using undef as.

open(FH,'<',$new_file) || die $!; do {local undef $/;$test = <FH>}; close(FH); while($test =~ /<!--\s+\d+nd table -->\s*(.*?)\s*<!--\s+\/\d+nd table +-->/sgi){ $out_put = $1; print "$out_put\n"; }

I think this code is matching what did you expected

Punitha


Comment on Re^2: Regular Expression Matching Issue
Download Code
Re^3: Regular Expression Matching Issue
by Anonymous Monk on Jan 03, 2008 at 15:08 UTC
    Thanks, it works like that!!!

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (11)
As of 2015-07-05 17:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (67 votes), past polls