develooper Front page | perl.perl6.language | Postings from April 2005

say and print (pugs)

Thread Next
From:
Ovid
Date:
April 7, 2005 23:07
Subject:
say and print (pugs)
Message ID:
20050408060706.8683.qmail@web60801.mail.yahoo.com
You know, this should be simple and maybe I'm overlooking something
obvious.  I was trying out Pugs and my first program worked great:

  for 1 .. 6 -> $var {
    say $var;
  }

The second version didn't:

  for 1 .. 6  {
    say;
  }

For the life of me, I can't recall if "say" (or "print", for that
matter) should default to the current topic.  So I figured I would
check the docs.  Grepping for "say" or "print" is like trying to sip
from a firehose.  I realize it's unlikely that we have an index for the
Perl6 docs, but though it would be nice.  I guess we can wait for the
phantom volunteer on that :)

In any event, where the heck do I find the docs for "say" and "print"? 
Perl6::say doesn't default to $_, but I'm not sure if that
implementation is correct, either.

Cheers,
Ovid

-- 
If this message is a response to a question on a mailing list, please send
follow up questions to the list.

Web Programming with Perl -- http://users.easystreet.com/ovid/cgi_course/

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About