I want to find a matching pattern field number/col number of a string.. For eg, if i have my code as below. Can someone help me to find the column number of a matching pattern..
my $data = "Region Item volume Month"
if ($data1 =~ /Item | volume/)
{
print "column number of item and volume";
}
I want to print the column number as 1 and 2