Jan 9, 2012, 12:44 PM
Post #1 of 2
The variable $tempvar1 is delimited by vertical bars "|". I am trying to split the $tempvar1 and store it into the array @var.
Split function does not work with vertical bar "|"
@var = split("\|",$tempvar1);
This does not work. It just stores each letter of $tempvar1 into each element of the @var array.
It is not practical to replace the vertical bars in $tempvar1 to another character such as a comma or tab because there are commas and tabs already in $tempvar1. Plus I am performing this on a file with 20,000 lines delimited with "|".
What do I do?