Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Keyed list in perl

by lima1 (Curate)
on Mar 13, 2007 at 11:02 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://604503]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (3)
As of 2024-04-18 23:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found