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

Re: $_ not optional with lexical prints

Thread Previous | Thread Next
H.Merijn Brand
March 20, 2003 09:45
Re: $_ not optional with lexical prints
Message ID:
On Thu 20 Mar 2003 18:21, Spider Boardman <> 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 (
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:
send smoke reports to:, QA:

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About