It's silly to keep using the bad variables instead of /p if you're going to use the English names.
perl -lane '$F[1]=~s/(chr\w[^_]?)_.*\b/$1/p;print ${^PREMATCH}. "\t". +$F[1] ."\t" .${^POSTMATCH}'
In reply to Re^2: $` $' in bash??
by ikegami
in thread $` $' in bash??
by ZWcarp
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |