Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Keyed list in perl

by lima1 (Curate)
on Mar 13, 2007 at 11:02 UTC ( #604503=note: print w/replies, xml ) Need Help??


in reply to Keyed list in perl

Do you want to parse the complete file into a nested data structure? There are plenty of modules on CPAN. Not sure which one is the best here (Parse::RecDescent is nice) Or is it just a pattern matching problem:
my $filecontent = "{type line} {series {{1 {{x_data {1 2 3 4 5}} {y"; my ( $xdata ) = $filecontent =~ / x_data .*? ({.*?})/xms; my @x; while ($xdata =~ /(\d+)/g) { push @x, $1; }
?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://604503]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2020-11-25 17:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?