Re:
if ( $in_string =~ /<HotelCode>$code/mgi || $in_string =~ /<mfResort>$code/mgi ) {
I prefer
if ( $in_string =~ /<(HotelCode|mfResort)>$code/mgi ) {
Or a full XML parse. :)
$0.02,
j