Help for this page

Select Code to Download


  1. or download this
    my @numbers = ( 0..10 );
    my @prime_numbers = @numbers[2,3,5,7];
    
  2. or download this
    my %london = (
        'Area'          =>  1572,       # Sq Km
    ...
    );
    
    my @lat_long = @london{'Lat','Long'};
    
  3. or download this
    my @location_fields = qw( Lat Long Elevation );
    
    # Using the %london hash defined above
    my %london_location = %london{ @location_fields };
    
  4. or download this
    my %london_location = map {$_=>$london{$_}} @location_fields;