in reply to Re^4: a simple exercise in readability
in thread a simple exercise in readability

My eyes could be playing me tricks again but I think your

die $help unless $ARGV[1];

and it's previous incarnations will die erroneously if the user wants to sum from, say, -7 to 0. Perhaps unless defined $ARGV[1]; would be better?

Cheers,

JohnGG

Replies are listed 'Best First'.
Re^6: a simple exercise in readability
by apotheon (Deacon) on Jan 15, 2007 at 17:08 UTC

    Good catch. Thanks -- I've edited the code on my system at home, though I'll leave the error as it is where you noticed it here at PerlMonks.

    print substr("Just another Perl hacker", 0, -2);
    - apotheon
    CopyWrite Chad Perrin