Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    ...
            print "$key is the first item\n";
        }
    }
    
  2. or download this
    2 follows 1
    1 is the first item
    ...
    3 precedes 5
    10 is the last item
    9 precedes 10
    
  3. or download this
    my %lookup = map {$keys[$_] => {prev => $keys[$_ - 1], next => $keys[$
    +_ + 1]}} 0 .. $#keys;