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

Re: Redirection and encoding, broken or WAD?

by robin (Chaplain)
on Jan 05, 2006 at 21:01 UTC ( #521341=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    Though if you try to re-open C<STDOUT> or C<STDERR> as an "in memory"
    file, you have to close it first:
    
        close STDOUT;
        open STDOUT, '>', \$variable or die "Can't open STDOUT: $!";
    
  2. or download this
    # close STDOUT;  # with this it works
    open STDOUT, ">:encoding(cp37)", "foo.out" or die "Cannot redirect STD
    +OUT\n";
    print "yadda yadda\n";
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (7)
As of 2022-09-27 08:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I prefer my indexes to start at:




    Results (118 votes). Check out past polls.

    Notices?