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

Regexes on Streams

by tsee (Curate)
on Oct 10, 2003 at 22:25 UTC ( [id://298436]=perlmeditation: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use File::Stream;
    my $stream = File::Stream->new($filehandle);
    
    $/ = qr/\s*,\s*/;
    print "$_\n" while <$stream>;
    
  2. or download this
    use File::Stream::Improved;
    $/ = qr/regex/;
    my @records = <HANDLE>;
    # where HANDLE might also be $handle
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2024-03-29 11:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found