in reply to Parsing of a string

Assuming the number you're looking for always starts with 0x and this sequence doesn't show up anywhere else in the code, use this:
my $data = join '', <DATA>; if($data =~ /(0x\w+)/) { print "$1\n"; } __DATA__ 1:05:02.599,xx:MTV = 0x2f7c:COOL_CALL, an option = 11
Also assuming that the hex number is terminated by a non-word ([^a-zA-Z0-9_]) character.