Title: Message
See answers:

my    %fh = ( aa => 1, bb =>2, cc => 3) ;  # note that each instance of $fh{$fhkey} has a different value

foreach my $fhkey ( keys %fh){
    open  ( $fh{$fhkey}, ">$fhkey" )  ;    ## >>>>>so, you open 3 file handles, one named "1", one named "2", and one named "3" 
}
  
 
>non-working code               
my    %fh = ( aa => 1, bb =>1, cc => 1) ;    # note - only change, each $fh{} has value of 1

foreach my $fhkey ( keys %fh){
    open  ( $fh{$fhkey}, ">$fhkey" )  ;   
}  ## >>>>Mmmm, because you only open one uniquely named file handle?  Specifically, named "1"?
 
 
_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to