Help for this page

Select Code to Download


  1. or download this
    while (<SRC>) {
       $prod{$1} = [$2,$3,$4] if m{(.+?)\|(.+?)\|(.+?)\|(.+)};
    }
    
  2. or download this
    while (<SRC>) {
       @{ $prod{$1} } = split('\|', $2) if m/^(.+?)\|(.+)/;
    }
    
  3. or download this
    while (<SRC>) {
       my @row = split(/\|/, $_);
       $prod{$row[0]} = \@row[1..$#row]; #using a slice;
    }