Siechfred: get mit LWP::Simple

Beitrag lesen

Wo liegt mein Denkfehler?

Lies die Doku, da ist explizit ausgeführt, wofür LWP::Simple gut ist und wofür nicht:

"This module is meant for people who want a simplified view of the libwww-perl library. It should also be suitable for one-liners. If you need more control or access to the header fields in the requests sent and responses received, then you should use the full object-oriented interface provided by the LWP::UserAgent module."

Willst Du an die Statuscodes rankommen bzw. willst die Methoden is_success bzw. is_error darauf anwenden *und* bei LWP::Simple bleiben, dann nimm getstore/getprint oder mirror. Da ich nicht weiß, was Du mit den eingelesenen Daten vorhast, entscheide selber. Allerdings zeigt meine bisherige Perl-Praxis, dass man LWP::UserAgent in 99% der Fälle vorziehen sollte.

Siechfred

--
Obacht, hinter jedem noch so kleinen Busch könnte ein Indianer sitzen!