Help for this page

Select Code to Download


  1. or download this
    my @retval;
    print "the last index of \@retval is $#retval\n";
    ...
    push @retval, 'another value';
    print "the last index of \@retval is $#retval\n";
    print "the number of *elements* in \@retval is ", scalar @retval, "\n"
    +;
    
  2. or download this
    package Item;
    use Data::Dumper;
    ...
    item 1,10
    item 2,20
    item 3,30