Help for this page

Select Code to Download


  1. or download this
    while(<FILE>) {
       push @stock,$_;
    ...
    
    # Would be better as...
    @stock = <FILE>;
    
  2. or download this
    while(@stock) {
     foreach $line (@stock) {
    
  3. or download this
    while (my $line = <FILE>) {
        # do stuff
    }
    
  4. or download this
    open $item[2], ">>some_filename";
           put_items_into_it;
        close $item[2]
    
  5. or download this
    my $cat = undef;
    while (my $line = <FILE>) {
    ...
        print OUTFILE ## Whatever ###;
    }
    close OUTFILE;
    
  6. or download this
    delete_that_line_from_stock;