Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^4: Using warn() when STDERR is closed

by almut (Canon)
on Jul 15, 2010 at 18:39 UTC ( [id://849827]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    
    ...
    open AA,     ">/tmp/myfd2" or die $!;   # gets fd 2
    open STDERR, ">/tmp/myfd3" or die $!;   # gets fd 3
    warn "Hello";
    
  2. or download this
    $ strace -eopen,write ./849816.pl
    ...
    ...
    open("/tmp/myfd3", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 3
    write(3, "Hello at ./849816.pl line 6.\n", 29) = 29
          ^
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (5)
As of 2024-04-24 03:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found