#!/usr/bin/perl use strict; use warnings; sub f($) { print 'f called with ',0+@_,' arguments: ',join(', ',@_),"\n"; } sub g { print 'via g: '; &f; } f(42); &f(42); &f(); &f(42,99,333); g(42); g(); g(42,99,333); #### f called with 1 arguments: 42 f called with 1 arguments: 42 f called with 0 arguments: f called with 3 arguments: 42, 99, 333 via g: f called with 1 arguments: 42 via g: f called with 0 arguments: via g: f called with 3 arguments: 42, 99, 333