Help for this page

Select Code to Download


  1. or download this
    my ($value,$key) = $_ =~ /^([^\|]+)\|(.*)/;
    
  2. or download this
    my ($key,$value) = split(/\|/,$_,2);
    next if $seen{$value};
    print "$key: $value\n";
    $seen{$value}++;
    
  3. or download this
    my $index = index($_,'|');
    my $key   = substr($_,0,$index);
    my $value = substr($_,$index);