Help for this page

Select Code to Download


  1. or download this
    my %month;
    my @month = qw(Jan Feb Mar Apr May June July Aug Sept Oct Nov Dec);
    
    @month{0..$#month} = @month;
    
  2. or download this
    print "Enter keys (sep with space): ";
    chomp (my $key = <STDIN>);
    ...
    
    my %hash;
    @hash{ split '\s',$key } = split '\s',$val;