Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Handling A File In Human-Compatible Chunks

by Cody Pendant (Prior)
on Jun 27, 2005 at 11:38 UTC ( #470222=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    open( X, 'x.txt' );
    my ( $chunk, $line );
    while (<X>) {
    ...
    }
    doSomethingWithChunk($chunk);
    # process whatever's left in $chunk at the end
    
  2. or download this
    my $p = new Algorithm::Permute(['a'..'d']);
      while (@res = $p->next) {
        # do something with @res
      }
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2023-10-01 11:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?