sub foo { croak "foo() only takes one argument" if (@_ > 1); print "$_[0]\n"; }