Help for this page

Select Code to Download


  1. or download this
    my %hash;
    while ( <FILE> )
    ...
          or next;
        $hash{$key} = 'whatever';
    }
    
  2. or download this
    my %hash;
    while ( <FILE> )
    ...
        next unless $key;
        $hash{$key} = $value;
    }
    
  3. or download this
    /^(\w+)\|/;
    $hash{$1)='blah';
    
  4. or download this
    if ( /^(\w+)\|/ ) { $hash{$1} = 'blah' }