develooper Front page | perl.perl5.porters | Postings from March 2003

Re: $_ not optional with lexical prints

Thread Previous | Thread Next
From:
H.Merijn Brand
Date:
March 20, 2003 09:45
Subject:
Re: $_ not optional with lexical prints
Message ID:
20030320184213.DFD8.H.M.BRAND@hccnet.nl
On Thu 20 Mar 2003 18:21, Spider Boardman <spider@leggy.zk3.dec.com> wrote:
> On Thu, 20 Mar 2003 17:47:01 +0100, "H.Merijn Brand" wrote (in part):
> 
> hmb> It does know that $v is bound to an I/O channel.
> 
> The *parser* doesn't know that.

I've not digged in the sources, but is it not the case that eventually an
internal call is made to the perl representative of "print" with just a bunch
of arguments, and that *this* function has to look what is passed?

> On the other hand, the fact that C<print {$v}> is a syntax error instead
> of assuming the default post-indirob arglist, while probably also not
> quite a bug, is something I find annoying.

And FWIW it's not the first time that I was bitten by this `feature' :/
Call me a donkey for repeatedly expecting something to work the way it
does not, but sometimes it's hard not to follow your mind ...

-- 
H.Merijn Brand        Amsterdam Perl Mongers (http://amsterdam.pm.org/)
using perl-5.6.1, 5.8.0 & 633 on HP-UX 10.20 & 11.00, AIX 4.2, AIX 4.3,
  WinNT 4, Win2K pro & WinCE 2.11.  Smoking perl CORE: smokers@perl.org
http://archives.develooper.com/daily-build@perl.org/   perl-qa@perl.org
send smoke reports to: smokers-reports@perl.org, QA: http://qa.perl.org



Thread Previous | 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