http://qs321.pair.com?node_id=586553


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.