in reply to String concatenation issues with 00?

G'day bobdabuilda,

The code and output you've posted do not match. Running the exact code you posted, I get this output:

o 200806050852 b7199767 b24211012077030 200902232359 o 200806050852 b7199767 b24211012077030 20090223235900 o:20080605085200:b7199767:b24211012077030:20090223235900 o 201103251457 b6235734 b2421100997663 201204022359 o 201103251457 b6235734 b2421100997663 20120402235900 o:20110325145700:b6235734:b2421100997663:20120402235900 ...

Presumably, your dodgy OUTPUT: ... was produced by other code we've not seen.

Given the type of data you're working with, I recommend you take a look at Text::CSV.

— Ken

Replies are listed 'Best First'.
Re^2: String concatenation issues with 00?
by james28909 (Deacon) on Nov 19, 2015 at 03:07 UTC

    The output is like that because foreach line of <DATA> he is printing it three different times. Go ahead and remove the first two print statements and behold the desired output!

    EDIT: nevermind. Maybe he is calling the wrong script. I do it all the time! Ill copy a script to another directory and make updates to it, then save and run it while still in the other directory, and wonder why the output never changes haha

      Between reading your response and replying, you've updated your post. That's fine but just to clear up any misunderstanding:

      I was demonstrating that the posted code did not produce the posted output. In fact, it did produce the desired output (along with a couple of test print lines).

      — Ken

        Yep, understood :)