in reply to Re: substitutions on a single line
in thread substitutions on a single line

i have been trying your suggestion but with no success. This is what i have, the while loop should read each individual line?:
while (<FILE1>) { ($hash, $input, $for, $aa) = split( /\s+/, $_) if /^\# \input\b.*/; $. == 1 && $aa =~ /LEU\b/ && s/ (.*)/$z31eu $z2leu $z1leu $1/; print output "$_"; }

Replies are listed 'Best First'.
Re: Re: Re: substitutions on a single line
by davido (Cardinal) on Apr 14, 2004 at 16:40 UTC
    For one thing I'm not sure what $z31eu, $z21eu, and $z11eu contain, and I also don't know that your regexen are actually matching what you expect them to.

    At any rate, I would start lacing your program's logic with prints to see which step fails, and then look at the contents of the suspect variables at that point to see why your logic is failing.


    Dave