Tanoti has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl use strict; my $app_text = "one:partridge\ntwo:\nturtle doves\nthree:french hens\n +"; foreach my $line (split /\n/, $app_text) { print "$line\n"; }
one:partridge two: turtle doves three:french hens
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Pattern match for split() - need match but not match syntax
by citromatik (Curate) on May 06, 2008 at 14:11 UTC | |
by Tanoti (Initiate) on May 06, 2008 at 14:52 UTC | |
|
Re: Pattern match for split() - need match but not match syntax
by Narveson (Chaplain) on May 06, 2008 at 14:59 UTC | |
by johngg (Canon) on May 06, 2008 at 18:15 UTC | |
|
Re: Pattern match for split() - need match but not match syntax
by GrandFather (Saint) on May 06, 2008 at 22:23 UTC |