Snippet, indeed! I've taken to incorporating this as the final line in my required files as the final TRUE return value, instead of the typical '1;'. Categorize this under quasi-useless.
do { 'not remove' };
Like I said, quasi-useless. =)

Replies are listed 'Best First'.
Re: required TRUE return value
by beppu (Hermit) on Jan 18, 2001 at 20:18 UTC
    I try to be creative with the required true value at the end of modules. Some one's I (or one of my friends) have used are:
    • "larry is my hero"
    • 1337
    • 42
    • "I feel an anti-pattern coming"
    Ok, they're not that creative, but ...the possibilities are endless. One unfortunate thing, though, is that doing a "perl -wc" on it will return a warning unless the final thing is a boring "1".

    This needs to be fixed, I think.

Re: required TRUE return value
by petral (Curate) on Jan 23, 2001 at 22:09 UTC
    Not to put too fine a point on it, but it happens that your particular choice
    will return false if you forget the quotes!

    Personally, I've taken to leaving off the semi-colon, so any (most)
    following code would become an error.

    p
Re: required TRUE return value
by extremely (Priest) on Jan 19, 2001 at 05:35 UTC
    Thanks to discussions on The Monastery Gates I've wound up using \$a; or even "ig";. These work even with use strict and -w. =)

    --
    $you = new YOU;
    honk() if $you->love(perl)