CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Advanced:
What is the result of this code....?

 



yapp
User

Nov 5, 2001, 12:26 AM

Post #1 of 2 (1200 views)
What is the result of this code....? Can't Post

I know what this code does:

Code
open(STDERR, ">&STDOUT")

That re-opens STDERR to STDOUT, causing all prints to STDERR appear in STDOUT.

But what does this code, and what is the result/effect of it in a CGI program?

Code
open(STDERR, ">&STDIN")

Yet an Other Perl Programmer

_________________________________
Find out more about programming
http://www.cool-programming.f2s.com


fashimpaur
User / Moderator

Nov 5, 2001, 4:31 AM

Post #2 of 2 (1199 views)
Re: What is the result of this code....? [In reply to] Can't Post

Well, the only thing I can think of that this does is causes all errors reported to STDERR to be ignored. If you actually try this by carping something after the open command, and then read the STDIN, there are 0 bytes there. I guess if you don't care if your program ever writes an error then you might want to use this ???

HTH,

Dennis

$a="c323745335d3221214b364d545a362532582521254c3640504c37292f493759214b3635554c3040606a0",print unpack"u*",pack "h*",$a,"\n\n"

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives