in reply to grep fields

I might be misunderstanding your question - do you want to build a new array of records which match in the nth column? I would probably do this instead (and being explicit about where the variables come from always helps me later when I'm banging my head against the wall).
for my $rec ( @recs ) { my @rec = split(/:/,$rec); next unless @rec; push (@goodrecs,$rec) if( $rec[$n] =~ /$pattern/ ); }
However, if you wanted to write grep statement to achieve your wish of matching the nth field (which I assume is delimited by ':' this should work (of course where $n and @recs are defined ahead of time).
my @goodrecs = grep { my @rec = split(/:/,$_); $rec[$n] =~ /$pattern/; } @recs;