in reply to XML header parsing error

You are trying to print a hash value with this line, but your variable is a scaler:

$results{"$num"/"$value"};

Maybe you want something like this:

if( $results =~ /$num."\/".$value/m ) {

Also use strict and warnings. You have some typos.