#!perl use LWP::Simple; #being a good boy use strict; use warnings; my %categories = (); my $page = get 'http://www.inshift.com/Products.html'; while ($page=~m/href=\"(\w+?)".+?class=\"rightnav\"\>(\w+?)\</sg){ $categories{$1}=$2; #this print doesn't come up at all! print "[$1] and [$2]"; } my @pairlist = keys(%categories); my $idkey = (); foreach $idkey (@pairlist) { #this one doesn't show up at all either print "$idkey,$categories{$idkey}\n"; }
In reply to Key/Value pair from GET by inblosam
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |