Help for this page

Select Code to Download


  1. or download this
    sub get_array { my @x = (4, 5, 6); return @x; }
    sub get_list { return (10, 11, 12, get_array()); }
    ...
    __END__
    last list item: 6
    list in scalar: 3
    
  2. or download this
    sub context_in_position {
        my ($position_name) = @_;
    ...
    list() in list:
    context in position 'a': list
    context in position 'b': list