in reply to Re: Split Decision
in thread Split Decision
'\n' will also work:
This works, and the reason becomes clear when you run it through B::Deparse:#!/usr/bin/perl my $string = "Bla\nBlo\nBloe"; print join("|", split('\n', $string));
$ perl -MO=Deparse split.pl my $string = "Bla\nBlo\nBloe"; print join('|', split(/\n/, $string, 0)); split.pl syntax OK
Arjen
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Split Decision
by BrowserUk (Patriarch) on Jan 06, 2005 at 14:47 UTC | |
by gellyfish (Monsignor) on Jan 06, 2005 at 14:54 UTC | |
by Aragorn (Curate) on Jan 06, 2005 at 14:58 UTC |
In Section
Seekers of Perl Wisdom