in reply to Code Shortening (golf) [RESOLVED]

Save 2 by changing print to say.

A link to whatever site you're looking at would be handy.

Replies are listed 'Best First'.
Re^2: Code Shortening (golf)
by Young Monk (Novice) on Oct 18, 2010 at 19:22 UTC
    But for using "say", we must include a line before the script like "use 5.10" rite? (not quite sure about the version)
      If you write a one-liner, using -E instead of -e enables the new features like say.
      Perl 6 - links to (nearly) everything that is Perl 6.
        Unfortunately, in spoj, one-liners are not allowed!

        So, the only way to use those options are
        #!perl -nE #program goes here

        So, using those actually increases the size of the program for small tasks!