develooper Front page | perl.perl5.porters | Postings from September 2010

Re: [perl #77094] printf("a\n" =~ /b/)

Thread Previous
From:
Aristotle Pagaltzis
Date:
September 8, 2010 14:27
Subject:
Re: [perl #77094] printf("a\n" =~ /b/)
Message ID:
20100908212733.GA2140@klangraum.plasmasturm.org
* Zefram <zefram@fysh.org> [2010-08-10 18:15]:
> I wrote:
> >sprintf.  The common underlying function is do_sprintf().
>
> But it turns out that CORE::sprintf has a $@ prototype, and so
> doesn't invoke this bug after all.  I reckon the underlying bug
> is CORE::printf having been given the prototypish behaviour of
> CORE::print rather than that of CORE::sprintf.  This accounts
> for both this stack bug and the undocumented use of $_.

Which it must, because like `print` but unlike `sprintf`, it can
optionally take an FH as indirect argument.

-- 
*AUTOLOAD=*_;sub _{s/::([^:]*)$/print$1,(",$\/"," ")[defined wantarray]/e;chop;$_}
&Just->another->Perl->hack;
#Aristotle Pagaltzis // <http://plasmasturm.org/>

Thread Previous


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