in reply to Re: How to remove the $1 hard coding
in thread How to remove the $1 hard coding

I think you want
push @sps, $res[ $columnNumber + 1 ];
since abhishes was using $columnNumber == 2 for $2 then $columnNumber appears to be one-based not zero-based like an array.

--

flounder