Marijn Pessers wrote:
> Hello Bill,
> 
> Thanks for your response, but something still is wrong.
> 
> When I try your code (I checked and as far as I can see I adapted mine to
> your example) I get this error message:

As far as I can see isn't good enough.

> Can't call method "content" on an undefined value at
> ./neopost_fetch_machinetype_new.pl line 98, <FILEHANDLE> line 1.
> 
> FILEHANLDE is the file I get the value from...
> 
> The code in the row that goes wrong is the following:
>       return $res->content;
> 
> I printed $res and got this result:
> HTTP::Response=HASH(0x858bb9c)

That should be OK.  Try dumping it instead and see if it's a response
object.  EG:
        use Data::Dumper; $Data::Dumper::Indent=1; $Data::Dumper::Sortkeys=1;
        print Data::Dumper->Dump([$res], [qw($res)]);

> I think I can't call content directly from the $res. What must change?

If $res is indeed a response object, you should be fine.

Run my code exactly as is and only modify the $remote and $path to
the proper values.  Then if that works, you can modify it to your needs.
If it fails, post all the failing info and the line that is in error,
not just the line number or the whole script (keep it small but complete).
_______________________________________________
Perl-Win32-Web mailing list
Perl-Win32-Web@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to