in reply to Re: Process large text data in array
in thread Process large text data in array

This will result in weird behaviour if the string contains more than one equal sign (=) per column:

foo=bar=baz|bar=bambam

Replies are listed 'Best First'.
Re^3: Process large text data in array
by hdb (Monsignor) on Mar 10, 2015 at 14:56 UTC

    That is correct! If this case can happen and one insists on splitting on =, then the third parameter of split might be useful:

    @parts = split /=/, $line, 2;

    will return at most two parts, split on the first (if any) equal sign.

Re^3: Process large text data in array
by hankcoder (Scribe) on Mar 10, 2015 at 15:27 UTC

    Just to share with you all, before I store any values into my formatted data line, I do HTML::Entities::encode_numeric to make sure those unsafe characters encoded.

    id_1=[encoded value]|.....