Jul 8, 2011, 12:58 PM
Post #4 of 4
Split creates an array of fields. The '2' is a subscript into that array. (By default, subscripts start at zero. The '2' refers to the third field.) The whole test could be done with a regular expression, but extracting the required field with split makes it much easier. If your files are so huge that processing speed is important, you probably should implement it both ways to find which is faster.
Re: [nandini_bn] extraction of data from a particular column
[In reply to]
$_ = <>;
The perl -p is not a good idea for production software, but it is an easy way for me to show you a complete program that does the processing that you asked for.