Perhaps you should try to use LWP::Simple instead... it will indeed work almost as your made up example. It won't tell you the content-type... but do you really need it? I rarely do.
Use:
In reply to Re^3: LWP help
by bart
in thread LWP help
by hnd
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |