gothamcity has asked for the wisdom of the Perl Monks concerning the following question:
Here's a segment of my data (results.txt):perl -i.bak -F\t -lane "$F[4] =~ s/.*y.*/yes/" results.txt
Basically, I'm trying to clean up the fifth column so that it is only 'yes' without extra information.name1 name2 NA NA ye[s]* no OK name1 name2 NA NA <ls>yes no OK name1 name2 NA NA <ls>yes<ln> no OK
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: In-place edit on tabular data not working
by Corion (Patriarch) on Oct 18, 2010 at 18:05 UTC | |
by gothamcity (Initiate) on Oct 18, 2010 at 18:43 UTC | |
|
Re: In-place edit on tabular data not working
by toolic (Bishop) on Oct 18, 2010 at 18:19 UTC | |
by gothamcity (Initiate) on Oct 18, 2010 at 18:48 UTC |