in reply to splitting headache
This format looks like a CSV with a dot as record separator. You could just use Text::CSV_XS:
my $data = "'Pugh.Pugh'.Barney.McGrew.Cuthbert.Dibble.Grub"; use Text::CSV_XS; my $csv = Text::CSV_XS->new({ sep_char => '.', quote_char => "'" }); $csv->parse($data) or die "Cannot parse data"; my @fields = $csv->fields;
--
Ilya Martynov
(http://martynov.org/)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: splitting headache
by Wibble (Beadle) on Feb 26, 2002 at 14:33 UTC |