Hello,
I have a file with 3 columns. I want to get data corresponding to Col3 based on matching criteria in Col1.
For example my searchInFile.txt contains:
100 P 24
200 Q 31
300 R 65
200 S 41
I need to extract Col3 corresponding to all values that match 200 in Col1.
In Unix, I can do $foundValue = `grep ^$200 | cut -f 3 searchFile.txt` and keep appending to it.
How can I translate this to an equivalent code an in Perl?
Thanks,
Mika
I have a file with 3 columns. I want to get data corresponding to Col3 based on matching criteria in Col1.
For example my searchInFile.txt contains:
100 P 24
200 Q 31
300 R 65
200 S 41
I need to extract Col3 corresponding to all values that match 200 in Col1.
In Unix, I can do $foundValue = `grep ^$200 | cut -f 3 searchFile.txt` and keep appending to it.
How can I translate this to an equivalent code an in Perl?
Thanks,
Mika