Help for this page

Select Code to Download


  1. or download this
    #/usr/bin/perl -w
    use strict;
    
    ...
    
    open  $rh{$_}, ">test_$_.txt" or die $!   for keys %rh;
    print { $rh{$_}} $_.$string               for keys %rh;
    
  2. or download this
    close $_ or die $!                        for keys %rh;
  3. or download this
    close $rh{$_} or die $!                   for keys %rh;
    
    #error: 
    # Bad file descriptor at C:\Perl\scripts\test5.pl line 20.