[ABE.pm] perl 5.10 rules! - say what?

Ricardo SIGNES rjbs-perl-abe at lists.manxome.org
Thu May 31 20:50:31 PDT 2007


* Walt Mankowski <waltman at pobox.com> [2007-05-31T22:49:03]
> >   print "Nice to meet you, ", $ENV{USER}, ".\n";
> >   say "Nice to meet you, ", $ENV{USER}, ".";
> 
> You could, of course, have saved *six* keystrokes by changing that
> first line to
> 
>   print "Nice to meet you, $ENV{USER}.\n";

Yes, I just didn't feel like thinking of something noninterpolable like:

  print "Nice to meet you, ", $session->user, ".\n";

Mention @{[]} and you die.

> I agree with Mike in wishing they'd called it "puts" like ruby and
> stdio.h do.  "say" just seems a bit too cutesy.

I agree that "say" is annoying -- especially since it conflicts with
Log::Speak, which we use extensively at work.  "puts" would be a reasonable
alternative, but my feelings on this matter are not strong.

> >   use feature ':5.10'; # turn on all 5.10 features in this block or file
> > 
> >   perl -E 'say "Hello, world!"' # like perl -e, but with all features
> 
> There go all the keystrokes you just saved!  :)

...unless I run all programs as one-liners with -E!

Yeah, I am not a fan of use feature.

-- 
rjbs


More information about the ABE-pm mailing list