if (@_&& ref @_ ne ‘ARRAY’) {
No, not quite, ref @_ won't do what you want. If you wanted to check that a function was called with exactly one argument that is an arrayref: if ( @_==1 && ref $_[0] eq 'ARRAY' ) { ... }
In reply to Re^2: Class::Struct accessor function after Perl V5.16
by haukex
in thread Class::Struct accessor function after Perl V5.16
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |