[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Omaha.pm] A split-ting headache...



$new_string = join("\n", split("|", $string));

Of course, it should be:

$new_string = join("\n", split(/\|/, $string));

Yeah, if you always write your split()s with the /x/ instead of "x", then it makes it easier to remember that it's ALWAYS a regex, even if it's in quotes.

--
Andy Lester => andy@petdance.com => www.petdance.com => AIM:petdance