Help for this page

Select Code to Download


  1. or download this
    my @array = (1, 2, 3, 4, 5, 6);
    my %hash = @array;
    
  2. or download this
    my %hash = ( 1 => 2, 3 => 4, 5 => 6 );
    
  3. or download this
    open my $file, '<', $filename or die "Unable to open '$filename': $!";
    my %edit;
    ...
      $edit{$key} = $_;
    }
    close $file;