brycen has asked for the wisdom of the Perl Monks concerning the following question:
# Dear Monks, # use strict; subroutine(10); subroutine(20); sub subroutine { my $param = shift; #Starting with this printf "package=%s file=%s line=%s param=%d\n",caller(),$param; #Is there a more elegant way to skip the package=%s parameter: printf 'file=%2$s line=%3$d param=%4$d %5$s',caller(),$param,"\n"; #Such as a % command that would eat the given parameter? printf "%Zfile=%s line=%s param=%d\n",caller(),$param; }
|
|---|