in reply to Skipping parameters in sprintf %, elegantly

But to make your code self-documenting, the best practice might actually be

my($package, $file, $line) = caller(); sprintf "file=%s line=%s param=%d\n", $file, $line, $param;