in reply to is this right ?
As others have said, you can't write ifs like that in Perl 5. Depending on exactly what it is you want, here's another way
for ( '"KOTB"', '"KBBA"', '"KBBC"', '"KBBM"', '"KBBT"' ) { if ( $fields[6] eq $_ ) { # do something } }
@fields[6] is better written $fields[6] (warnings should have told you about that). @fields[6] an array slice that's described in perldata.
|
|---|