- or download this
sub trigger{print "Triggered: ",map {defined $_ ? " $_" : 'UNDEF'}@_,"
+\n"}
- or download this
# rest of the code as before..
print "\tclearing with undef \@arr:\n" and undef @arr;
...
Triggered: Arraytrigger=ARRAY(0x6ab224) 0 a
clearing with @arr=():
Triggered: Arraytrigger=ARRAY(0x6ab224)
- or download this
my $ref = \$arr[0];
print "\tsetting by reference:\n" and $ref=11;
...
setting by reference:
- or download this
print "\@arr [@arr]\n";