Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Backtracking

by sapnac (Beadle)
on Jun 24, 2005 at 14:33 UTC ( #469720=note: print w/replies, xml ) Need Help??


in reply to Backtracking

I bet many there are many other better ways;
Here is a quick way; # Global declarations open(spooler,"test.html") or die "Can't open file\n"; while($spool=<spooler>){ $spool; @value=split(/<*>*</,$spool); $i=0;$j=0; while ($i<= $#value) { if ($value[$i] =~ /lt=c24/i ) { $value[$i] =~ s/lt=c24>//g; @val1=split(/ /,$value[$i]); } if($value[$i] =~ /^jtitle>/i) { #$value[$i] =~ s/^jtitle>//ig; $val2[$j]=$value[$i]; $j++; } $i++; } } for($n=0;$n<$j; $n++) { print $val1[$n]." <".$val2[$n]."<jtitle>\n"; }
Hope it helps!

Log In?
Username:
Password:

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

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

    No recent polls found

    Notices?