in reply to Re: Trash in my prints
in thread Trash in my prints

No go, how would I chomp a print ''; exit;, it still spits a lone \x0A

Replies are listed 'Best First'.
Re^3: Trash in my prints
by blue_cowdawg (Monsignor) on Aug 18, 2011 at 20:21 UTC
        No go, how would I chomp a print '';

    Whaaaa?

    You're leaving something out here. \0a (or 0xaH) is a line feed or EOL character. You must have something out there emitting an extra EOL.

    If $text represents the slurped in file and you do a chomp ($line) you should eliminate the EOL character.

    What platform are you running on and what platform did the files come from? I know that WinBloze adds extra \0a characters on normal text files and if you try reading them in Unix it will appear as extra EOLs.


    Peter L. Berghold -- Unix Professional
    Peter -at- Berghold -dot- Net; AOL IM redcowdawg Yahoo IM: blue_cowdawg

      It's in the middle of some mod_perl scripts, but it's the renderer so nothing should be output before and with that exit() i assure that nothing is output after the print.

      It's unix, I'm on ubuntu but it's also showing in BSD, so it must be something gone wrong in the script. With over 10k lines, I'd rather think of a way to fix it there right now.

      I know windows sometimes mangles your LFs to CRLFs. The file is not really the matter, as printing an empty string gets the LF there too. I'm thinking more of a record separator or something but I got debugger's block!

            It's in the middle of some mod_perl scripts,

        Show us some (significant) code.


        Peter L. Berghold -- Unix Professional
        Peter -at- Berghold -dot- Net; AOL IM redcowdawg Yahoo IM: blue_cowdawg