Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

unexpected close() success on (non-) filehandle

by mkmcconn (Chaplain)
on Nov 21, 2001 at 17:59 UTC ( [id://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?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (1)
As of 2024-04-25 00:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found