Re: RFC 39 (v2) Perl should have a print operator

[email protected] (Jonathan Scott Duff) Thu, 17 Aug 2000 18:35:28 -0500
Newsgroups perl.perl6.language.io
Message-ID <[email protected]>
On Thu, Aug 17, 2000 at 03:30:09PM -0700, Jon Ericson wrote:
> Nathan Wiger wrote:
> >    3. Can you support here documents with this syntax?
> 
> I haven't thought about this yet, but you can always use print.

Should be the same:

	><<'FOO'
	blah
	blah
	FOO<


> >    4. How does this nest within other perl statements, namely:
> > 
> >          print "Bob is ", $bob->color if $green;
> >          print $r->param($name) . " is on\n" unless $this;
> 
> 	>"Bob is ", $bob->color< if $green;
> 	>$r->param($name) . " is on\n"< unless $this;
> 
> Unfortunately, the nesting rules get a little complicated.  

I'll say!

> Here's what I'm working on for v3: >LIST< should return LIST.  In other
> words, you can stick print operators just about anywhere:
> 
> 	my @file = map {s|/home/jericson/||; >$_<} glob '~/*';

Neat.

> 	print $fh >"This also goes to stdout.\n"<;

I'd rather something like the following work instead though:

	print @filehandles "This goes to several filehandles\n";
	print $fh1, $fh2, $fh3 "This goes to several filehandles\n";

-Scott
-- 
Jonathan Scott Duff
[email protected]