- or download this
print "not ref:\n";
test(dogs=>'bark', cats=>'miaow');
...
ref($_[0]) ? $params = shift : $params = {@_};
print Dumper($params);
}
- or download this
not ref:
$VAR1 = {
...
'HASH(0x81194e0)' => undef
};
- or download this
not ref:
hello
...
'dogs' => 'bark',
'cats' => 'miaow'
};
- or download this
if(ref($_[0])){
$params = shift;
...
else{
$params = {@_};
}
- or download this
not ref:
$VAR1 = {
...
'cats' => 'miaow',
'dogs' => 'bark'
};