in reply to Using LWP::Simple with a callback (progress indicator)

Update: After bart's reply I have edited my original post

Hi bart,
Cool, but a couple of points:

  1. No use strict;... tsk tsk ;)
  2. opening a filehandle without checking i.e.
    open HTML, ">monastery_gates.html" or die "Can't open HTML: $!";

    -- bart added use Fatal 'open';
  3. While we're on the subject you haven't closed it either
    close HTML or die "Can't close HTML: $!";
I think these are important enough to warrant pointing them out.

No offence meant.

~barrd

Replies are listed 'Best First'.
Re: Re: Using LWP::Simple with a callback (progress indicator)
by bart (Canon) on Sep 16, 2003 at 11:36 UTC
    Heh, odd... I do have the error checking in the version here at home. I'll edit that. (Done — in a slightly unusual manner :))

    As for the rest... *waves hand* this is just a snippet. You have to know when this stuff matters.

      Okey cokey bart,
      Sorry, didn't realise it was intended as a snippet. Please accept my apologies but I was just trying to point out some common errors for any 'newbies' who may have read it. I am not of course implying that you are a 'newbie' :).

      Peace, ~barrd

      Update:

      (Done — in a slightly unusual manner :))
      Indeed, I've never seen it done "that" way before ;)