while (my $line = <$read_handle>) { if ($line =~ /class\=/ and $line =~ /CAN signal/) { my $Inca_Name; my $Inca_Vchk; my $Inca_Comment; # collect Signal Informations ($Inca_Vchk, $Inca_Name, $Inca_Comment)= $line =~ /^\<[A-Z]\s+[a-z]\=\'([a-z])\'\>\<[A-Z]\>[^0-9]<\/[A-Z]\>\<[A-Z]\>\'([a_zA-Z0-9_])\'\s+([^0-9])\<[^0-9]/; } }