in reply to Re: Lotto checker...
in thread Lotto checker...

Venerable answers.
Flexing my mind and stretching my Perl.

Many Thanks, Monks!

P.D.
kcott: just concat "\n" at print argument

Replies are listed 'Best First'.
Re^3: Lotto checker...
by kcott (Archbishop) on Apr 16, 2014 at 22:14 UTC
    "kcott: just concat "\n" at print argument"

    No. There's no need to do that.

    Look at the full code and output I posted in the spoiler. Note that the output doesn't require additional newlines. Did you run it? Did you get a different result?

    See the first line of that code:

    #!/usr/bin/env perl -l

    Look at "perlrun: Command Switches" to see what the '-l' switch does.

    -- Ken

      Right, Ken.

      I got confused because I ran it with

      /usr/bin/env perl -l

      and got

      /usr/bin/env: perl -l: No such file or directory

      Now, running it with just

      /usr/bin/perl -l

      I get the right result.

      So, no need to append "\n" and another new thing I've learned.


      Thanks a lot!