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

Re: splitting results

by BillKSmith (Prior)
on Dec 17, 2020 at 18:29 UTC ( #11125355=note: print w/replies, xml ) Need Help??


in reply to splitting results

The html you finally posted shows that you only have one row. It contains a lot of white space. You have parsed and dereferenced it correctly. All that is left is to clean up the white space and rearrange it.
use strict; use warnings; use Data::Dumper; my $foo = 0; my $row = [ 'info', ' john ', ' 100 - 200 ', ' kent ', ]; print Dumper($row); foreach (@$row){ s/\A\s+//; s/\s+\z//; } print Dumper($row); my ($dat1, $dat2) = ${$row}[2] =~ m/(\d+)\D+(\d+)/; print "data:$row->[0] $row->[1]:$dat1 $row->[3]:$dat2", "\n";
Bill

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (2)
As of 2021-04-15 01:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?