in reply to Re: Concatenation appends to front of variable
in thread Concatenation appends to front of variable

Ahh, thank you. I had tried chomp to no avail earlier and never pressed beyond that when it didn't work.
Chop solved my problem!
Dan H.
  • Comment on Re^2: Concatenation appends to front of variable

Replies are listed 'Best First'.
Re^3: Concatenation appends to front of variable
by ikegami (Patriarch) on May 29, 2009 at 22:52 UTC
    s/\s+$//; will get rid of trailing LF, CR or CRLF (and any trailing space and tabs) safely.
Re^3: Concatenation appends to front of variable
by GrandFather (Saint) on May 30, 2009 at 03:35 UTC

    Avoid chop. It is a rather blunt tool and will cause wailing and gnashing of teeth. If chomp didn't do the job then most likely the line ends are not what you think they are. Are you processing Windows generated files on a *nix box perchance?


    True laziness is hard work