Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^2: Why am I getting "premature end of script header"?

by ikegami (Patriarch)
on Nov 28, 2006 at 18:57 UTC ( [id://586553]=note: print w/replies, xml ) Need Help??


in reply to Re: Why am I getting "premature end of script header"?
in thread Why am I getting "premature end of script header"?

That doesn't work. See Re^3: Why am I getting "premature end of script header"? - eval { use } for an explanation. What one could do is replace the aformentioned

BEGIN { eval(" use LWP::UserAgent (); use HTTP::Request::Common; "); if ($@) { ... } } ...

with

BEGIN { eval { require LWP::UserAgent; require HTTP::Request::Common; import HTTP::Request::Common; }; if ($@) { ... } } ...

The difference between the two is just a question of style.

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (4)
As of 2024-04-16 04:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found