I'm a newbie to Perl and I've been struggling with Google to get a answer.
The first field in the array is the key. Upon finding a duplicate key (not an entire line just the first field).Only print out the entire record if the 6th field is not equal to "Prod"
For example in the sample below 844147f2 is repeated twice. But I only want to print out the line that does not have "prod" as the value of the 6th field.
array data (2000 lines) sample:
844147f2| rdcbackn6| SUNW,Sun-Fire-V490| Sun Fire V490| EMSBCK| IDENinfra| 5.10| U1p1
844147f2| rdcbackn6| SUNW,Sun-Fire-V490| Sun Fire V490| EMSBCK| Prod| 5.10| U1p1
84414840| olibackn3| SUNW,Sun-Fire-V490| Sun Fire V490| EMSBCK| IDENinfra| 5.10| U1p1
84414840| olibackn3| SUNW,Sun-Fire-V490| Sun Fire V490| EMSBCK| Prod| 5.10| U1p1
84414860| rdcbackn1| SUNW,Sun-Fire-V490| Sun Fire V490| EMSBCK| IDENinfra| 5.10| U1p1
84414860| rdcbackn1| SUNW,Sun-Fire-V490| Sun Fire V490| EMSBCK| Prod| 5.10| U1p1
84414866| rdcbackn8| SUNW,Sun-Fire-V490| Sun Fire V490| EMSBCK| IDENinfra| 5.10| U1p1
84414866| rdcbackn8| SUNW,Sun-Fire-V490| Sun Fire V490| EMSBCK| Prod| 5.10| U1p1
Thanks in advance
J
The first field in the array is the key. Upon finding a duplicate key (not an entire line just the first field).Only print out the entire record if the 6th field is not equal to "Prod"
For example in the sample below 844147f2 is repeated twice. But I only want to print out the line that does not have "prod" as the value of the 6th field.
array data (2000 lines) sample:
844147f2| rdcbackn6| SUNW,Sun-Fire-V490| Sun Fire V490| EMSBCK| IDENinfra| 5.10| U1p1
844147f2| rdcbackn6| SUNW,Sun-Fire-V490| Sun Fire V490| EMSBCK| Prod| 5.10| U1p1
84414840| olibackn3| SUNW,Sun-Fire-V490| Sun Fire V490| EMSBCK| IDENinfra| 5.10| U1p1
84414840| olibackn3| SUNW,Sun-Fire-V490| Sun Fire V490| EMSBCK| Prod| 5.10| U1p1
84414860| rdcbackn1| SUNW,Sun-Fire-V490| Sun Fire V490| EMSBCK| IDENinfra| 5.10| U1p1
84414860| rdcbackn1| SUNW,Sun-Fire-V490| Sun Fire V490| EMSBCK| Prod| 5.10| U1p1
84414866| rdcbackn8| SUNW,Sun-Fire-V490| Sun Fire V490| EMSBCK| IDENinfra| 5.10| U1p1
84414866| rdcbackn8| SUNW,Sun-Fire-V490| Sun Fire V490| EMSBCK| Prod| 5.10| U1p1
Thanks in advance
J