[Gllug] Variadic arguments in perl

Dave Cross dave at dave.org.uk
Tue Oct 24 19:08:04 UTC 2006


- Tethys wrote:

> $str = sprintf(@_);
> 
> doesn't work. Any ideas?

$str = sprintf($_[0], @_[1 .. $#_]);

And they say Perl is unreadable :)

Dave...
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list