in reply to parsing arguments
The solution provided in this reply does not fit your needs, but it is still worth to mention, as it works for data that is slightly more restricted than yours.
The idea is to quickly form a xml string, and simply utilize XML::Simple or any other XML parser to parse it. In this way, you don't need to duplicate what others already did for you.
use strict; use warnings; use XML::Simple; use Data::Dumper; my $str = "lexwhere=\"'in('DIS', 'DIM', 'DIR')'\" title=\"'this is a t +itle'\""; my $str_xml = "<str " . $str . " />"; print $str_xml, "\n"; my $ref = XMLin($str_xml); print Dumper($ref);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: parsing arguments
by zakzebrowski (Curate) on Oct 08, 2003 at 01:16 UTC | |
by b10m (Vicar) on Oct 08, 2003 at 11:19 UTC | |
by zakzebrowski (Curate) on Oct 08, 2003 at 18:18 UTC | |
by mifflin (Curate) on Oct 13, 2003 at 19:27 UTC |