Help for this page

Select Code to Download


  1. or download this
    my %hash = map { split } @names_marks;
    
  2. or download this
    my %hash = ( 'bob', 1 );
    # or
    my %hash = ( bob => 1 );
    
  3. or download this
    my %hash;
    for( @names_marks ) { %hash = split }
    # or, expanding split
    for( @names_marks ) { %hash = split ' ', $_ }