Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: How can I create an array of filehandles?

by CharlesClarkson (Curate)
on Jun 11, 2001 at 09:35 UTC ( [id://87404]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    open my $fh, '>', $file_name or die "Cannot open $file_name: $!";
    
  2. or download this
    my %handles = get_write_handles(qw/col1.txt col2.txt col3.txt/);
    
    ...
      }
      return %file_handles;
    }
    
  3. or download this
    print { $handles{'in.txt'} } "something\n";
    
  4. or download this
    foreach (values %handles) {
      print $_ "something\n";
    }
    
  5. or download this
    sub get_read_handles {
      my @file_names = @_;
    ...
      }
      return @file_handles;
    }
    
  6. or download this
    sub get_append_handles {
      my @file_names = @_;
    ...
      }
      return @file_handles;
    }
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (9)
As of 2024-04-18 17:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found