[Omaha.pm] A split-ting headache...
Andy Lester
andy at petdance.com
Sun Jul 16 10:29:57 PDT 2006
> $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 at petdance.com => www.petdance.com => AIM:petdance
More information about the Omaha-pm
mailing list