Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

unexpected close() success on (non-) filehandle

by mkmcconn (Chaplain)
on Nov 21, 2001 at 17:59 UTC ( #126764=perlquestion: print w/replies, xml ) Need Help??

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.
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (2)
As of 2023-06-06 22:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How often do you go to conferences?






    Results (29 votes). Check out past polls.

    Notices?