Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Extracting info from matrix

by shemp (Deacon)
on Aug 10, 2005 at 19:18 UTC ( [id://482726]=note: print w/replies, xml ) Need Help??


in reply to Extracting info from matrix

If your value of $b always looks like your example, in that its a sequence of numbers with whitespace in between, you could just split them on whitespace. (Im not sure if the square brackets are actually part of the string or not)

Anyway, something like this:

# if the brackets are actually there: $b =~ s/\[|\]//g; my @values = split /\s+/, $b;

I use the most powerful debugger available: print!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://482726]
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: (2)
As of 2024-04-25 23:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found