in reply to Parsing of a string
How about:
($num) = $string =~ /\bMTV\s*=\s*(0x[0-9a-fA-F]+)/; die("Bad Input!") unless defined $num; print("Found $num (", hex($num), " in decimal)\n"); [download]