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

Re: Parsing issues

by NetWallah (Canon)
on Nov 16, 2012 at 05:23 UTC ( #1004125=note: print w/replies, xml ) Need Help??

in reply to Parsing issues

The code below may give you some hints on how to process your data:
use strict; use warnings; my @differenthtml; $/="htmlpagemark"; while (<DATA>){ chomp; next if $_ eq "htmlpagemark"; next unless length($_) > 0; push @differenthtml, $_; } for my $item (0..$#differenthtml){ print "===Item $item ==\n$differenthtml[$item]\n" } __DATA__ htmlpagemark #/q/hp?s=%5EDJI&d=10&e=8&f=20 +12&g=d&a=0&b=2&c=199 +2&z=66&y=5214 # <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" #"http://www.w3.o +rg/TR/html4/strict.dtd"> # It also consists of a lot of more text before the next #"h t m l p a + g e m a r k" htmlpagemark http://another/URL More text #sorry if this question reveals to be noobish and simple #but i have n +o idea how to solve this issue + the= #contents of a read text file END

             "By three methods we may learn wisdom: First, by reflection, which is noblest; Second, by imitation, which is easiest; and third by experience, which is the bitterest."           -Confucius

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1004125]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (7)
As of 2018-05-23 05:38 GMT
Find Nodes?
    Voting Booth?