Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
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 chilling in the Monastery: (3)
As of 2023-03-24 23:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which type of climate do you prefer to live in?






    Results (62 votes). Check out past polls.

    Notices?