Help for this page

Select Code to Download


  1. or download this
    print "$array[-1]\n";    # If you mean last element of array
    
    ...
        print "$hash{$key}\n" if $counter == $last;
    }
    # If you mean determine if this is last item in loop
    
  2. or download this
    use Scalar::Util 1.10 'looks_like_number';
    use List::Util 'max';
    ...
        push @numbers , $_ if looks_like_number( $_ );
    }
    print max(@numbers), "\n";