in reply to substitutions on a single line
Maybe I'm getting senile before my time here, but I am not sure what you are asking.
Looking at the regex you are the first change I would propose would be the use of s/\s+(.*)$/$z3leu $z$leu $z1leu $1/ in your substitution. I set up a quick test that looks like:
just to prove out the regex. However, I don't know what those other variables are about.$done=0; while (<DATA>){ $_ =~ s/\s+(.*)$/$1/ unless $done; print; $done=1; } __END__ 0.123 0.654 - so write before these values only 0.987 0.678
Note that I have a "flag" set to make it only act on the first line.
I hope this helps, but I'm not 100% sure what you are after...
|
|---|