On Wed, Sep 28, 2011 at 8:51 AM, Johan Vromans <jvromans@squirrel.nl> wrote:
> Eric Brine <ikegami@adaelis.com> writes:
>
> > Ways of using sprintf when the format is in $arg[0]:
>
> Yes, we all know that. It's just stupid you can't write:
>
> sub my_printf { print ">> " . sprintf(@_) }
>
> but need
>
> sub my_printf { print ">> " . sprintf( $_[0], @_[1..$#_] ) }
>
> (OTOH, this *does* look like Real Perl [tm] ...
>
Except the same thing applies to every single builtin (e.g. length, splice,
substr, exit, etc.)
Thread Previous
|
Thread Next