in reply to splitting headache

I think it is impossible to use this format with split. Either simplify format or use something else.

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
    Thanks for the answer. This also works great and, although not as fast as the regex method, it is probably easier for regex ludites like myself to get to grips with. Thanks again.