Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

close and autodie on pipes

by apomatix (Novice)
on Jun 29, 2012 at 18:06 UTC ( #979163=perlquestion: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    use strict;
    ...
    close $fh;
    my $status = $? >> 8;
    print "$status\n";
    
  2. or download this
    Hello
    1
    
  3. or download this
    #!/usr/bin/perl
    use strict;
    ...
    close $fh;
    my $status = $? >> 8;
    print "$status\n";
    
  4. or download this
    Hello
    Can't close(GLOB(0x10082a098)) filehandle: '' at test.pl line 7
    
  5. or download this
    use strict;
    use autodie;
    ...
    #close $fh;
    my $status = $? >> 8;
    print "$status\n";
    
  6. or download this
    Hello
    0
    
  7. or download this
    use strict;
    use autodie;
    ...
     close $fh;}
    my $status = $? >> 8;
    print "$status\n";
    
  8. or download this
    Hello
    1
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://979163]
Approved by toolic
Front-paged by MidLifeXis
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2015-07-04 10:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (59 votes), past polls