in reply to How to get a value from a file and save in another file
use strict; my %seen; while(<DATA>){ chomp; my @parts = split /-/; print $_,"\n" if $parts[0] eq 'LA' && !$seen{$parts[0]-$parts[1]}+ ++; } __DATA__ LA-1-00 CON-1-0 LA-2-01 LA-03-2 LA-03-02
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to get a value from a file and save in another file
by Anonymous Monk on Apr 27, 2005 at 18:55 UTC |