Help for this page

Select Code to Download


  1. or download this
    sub trigger{print "Triggered: ",map {defined $_ ? " $_" : 'UNDEF'}@_,"
    +\n"}
    
  2. 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)
    
  3. or download this
    my $ref = \$arr[0];
    print "\tsetting by reference:\n"     and   $ref=11;
    ...
            setting by reference:
    
  4. or download this
    print "\@arr [@arr]\n";