Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Applying regexes to streams: Perl enhancement idea

by tye (Sage)
on Jan 07, 2003 at 21:22 UTC ( [id://225083]=perlmeditation: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
        ( $match )= $string =~ /($pattern)/;
  2. or download this
    package Stream::Match;
    
    sub new {
    ...
    while(  $string= $o->nextMatch()  ) {
        print "$string\n";
    }
    
  3. or download this
    __END__
    # This is the code I originally posted
    ...
    while(  $string= $o->nextMatch()  ) {
        print "$string\n";
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlmeditation [id://225083]
Approved by krujos
Front-paged by mojotoad
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (7)
As of 2024-03-28 15:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found