in reply to In-place edit on tabular data not working

All you did was change one element of the @F array. You did not change $_. You need to reconstruct $_, and as Corion said, use -p instead of -n:
perl -i.bak -lape '$F[4] =~ s/.*y.*/yes/; $_ = join "\t", @F' results. +txt

-p says to use print, which prints $_ by default.

Replies are listed 'Best First'.
Re^2: In-place edit on tabular data not working
by gothamcity (Initiate) on Oct 18, 2010 at 18:48 UTC
    Thank you so much! Reconstructing the $_ for worked. I see the mistake I was making: the modified $F4 wasn't making it back to $_ for output.