Help for this page

Select Code to Download


  1. or download this
    my %hash = $fh.slurp.comb(/ ^^ (\T*) \t (\N*) /);
    
  2. or download this
    my %hash = $fh.slurp ~~ m:g/ ^^ (\T*) \t (\N*) /;
    
  3. or download this
    my %hash = ($0,$1 if / ^^ (\T*) \t (\N*) / for $fh.lines);
    
  4. or download this
    my %hash = do for $fh.lines {
        / ^^ (\T*) \t (\N*) / and $0,$1;
    }
    
  5. or download this
    my %hash = gather for $fh.lines {
        take / ^^ (\T*) \t (\N*) / || ();
    }