I am trying to parse a file in the following format.
Case1: 0x5sdf258:648s4df ..;. ABCD hhbdch ; extra text
Case2: 0xdef58e1:18w4we1 .... HCDC ajdknlmk ;extra text
I want to remove the extra text after the semicolon, So I use the following line
$row =~ s/;.*//g;
This works in case 2 but fails in case 1. Is there a method in which I can perform my task in both the cases?