Help for this page

Select Code to Download


  1. or download this
    my %pairs = map { chomp; map @$_ == 2 ? @$_ : (), [split /\t/, $_, 2] 
    +} <FH>;
    
  2. or download this
    my %pairs = map { chomp; map @$_ == 2 ? @$_ : 
                    (@$_ == 1 ? $_->[0] => undef : ()),
                    [split /\t/, $_, 2] } <FH>;
    
  3. or download this
    my %pairs = map { chomp; map @$_ == 2 ? @$_ : 
                    (@$_ == 1 ? @$_, undef : ()),
                    [split /\t/, $_, 2] } <FH>;