in reply to Re^11: Recomendations For Learning perl?
in thread Recomendations For Learning perl?

perl nameInWords.pl adam

  • Comment on Re^12: Recomendations For Learning perl?

Replies are listed 'Best First'.
Re^13: Recomendations For Learning perl?
by 1nickt (Canon) on Dec 09, 2016 at 02:37 UTC

    Hi adamZ88,

    Sorry, there was an error in the version I posted with a missing set of parens in one line. Should be:

    ( my $name = $ARGV[0] ) && length $ARGV[0] > 2 or die "Usage: `$0 <nam +e>` (min. 3 letters)";

    ( Without the parens, $name was assigned the value of $ARGV[0]  && length $ARGV[0] > 2, which is 'true', or, literally, 1 ... which is why you got those weird matches.)


    The way forward always starts with a minimal test.