J
Jack Penarth
I use the following code snippet on a file extracted from a
database(fixed length fields)before formatting the output for
printing.
Field3 is the prime record identifier and often contains duplicate
entries. How can I modify my code so that only the first instance
(record) is used and the remaining records ditched?
Code snippet follows:
while (<FILE>) {
($field1, $field2, $field3, $field4, $field5, $field6, $field7,
$field7, $field8, $field9, $field10, $field11, $field12, $field13,
$field14, $field15, $field16) = unpack($format1, $_)
write(OUT_PUT);
TIA
John
database(fixed length fields)before formatting the output for
printing.
Field3 is the prime record identifier and often contains duplicate
entries. How can I modify my code so that only the first instance
(record) is used and the remaining records ditched?
Code snippet follows:
while (<FILE>) {
($field1, $field2, $field3, $field4, $field5, $field6, $field7,
$field7, $field8, $field9, $field10, $field11, $field12, $field13,
$field14, $field15, $field16) = unpack($format1, $_)
write(OUT_PUT);
TIA
John