in reply to Re: Usage of flags in scripts
in thread Usage of flags in scripts

Or you could-

#!/usr/bin/perl -l

-instead of-

use 5.010; # Just to use say()

To get print to act like say which is a bit more on point for the OP. :)

Replies are listed 'Best First'.
Re^3: Usage of flags in scripts
by McDarren (Abbot) on Jan 01, 2009 at 03:17 UTC
    or even...
    sub say { # Perl Hacks #86 print @_, "\n"; }
      Except that this doesn't handle saying to filehandles properly:
      $ perl -e 'sub say { print @_, "\n" } say STDOUT "Hi"' Can't locate object method "say" via package "IO::Handle" at -e line 1
Re^3: Usage of flags in scripts
by Lawliet (Curate) on Jan 01, 2009 at 02:21 UTC

    Haha, that is neat. I need to reread perlrun more often ;)

    And you didn't even know bears could type.