Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^3: Perl RE; how to capture, and replace based on a block?

by hdb (Monsignor)
on Dec 18, 2013 at 07:29 UTC ( #1067600=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $str = "
    </div>
    ...
    ";
    
    print "Success\n" if $str =~ /\<\/div\>\n\<\/body\>/;
    
  2. or download this
    local $/;
    my $str = <>;
    print "Success\n" if $str =~ /\<\/div\>\n\<\/body\>/;
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2018-11-21 20:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My code is most likely broken because:
















    Results (250 votes). Check out past polls.

    Notices?