in reply to Re^2: P248 programming perl
in thread P248 programming perl

wow, 2 questions:

1)Why does the Doggy.pm need the "#1;"?

2)And how did you get your post to collapse like that?

P.S. Perlmonks rule! thanks for the help guys.

Replies are listed 'Best First'.
Re^4: P248 programming perl
by holli (Abbot) on Jul 05, 2005 at 06:32 UTC
    1)Why does the Doggy.pm need the "#1;"?
    A module needs to end with a true value, 1; is the standard convention for that. You could also use "this is false";. It just has to be true. :)
    2)And how did you get your post to collapse like that?
    Enclose the poste in <readmore title="foo">text</readmore> tags



    holli, /regexed monk/
Re^4: P248 programming perl
by tlm (Prior) on Jul 06, 2005 at 01:10 UTC

    1)Why does the Doggy.pm need the "#1;"?

    Just to clarify holli's point, the value of the last statement in the module file to be evaluated must be true. That's why, in Doggie.pm the "1;" line is not the last line of the file; the subsequent lines consist entirely of subroutine definitions, which are not evaluated.

    the lowliest monk