use strict; use warnings; my @a0; my @a1 = 1; my @a2 = 0..5; check(@a0); check(@a1); check(@a2); sub check { if (@_ == 1) { #if ((scalar @_) == 1) { print "exactly 1\n"; } else { print "diff from 1\n"; } } __END__ diff from 1 exactly 1 diff from 1