Hello,
I have a text file which looks exactly like this:
FIRST Level Description
EQT.FIRST.Id: 2
EQT.FIRST.eqtID_01.allowedType: 4TEST
EQT.FIRST.eqtID_02.allowedType: 5TEST
SECOND Level Description
And from this file I want to read the values:01,02 and 4TEST,5TEST
Here is my code but it doesn't work properly:
my $data_file = "test.txt";
open(FILE, "< $data_file");
while(<FILE>)
{
if ( /FIRST Level Description/.. /SECOND Level Description/ )
{ if (/EQT.FIRST.eqtID_(\d+).allowedType:([A-Z0-9]+)/)
{ ($str1,$str2 ) = ($1,$2); }
print "$str1 \n $str2";
}}
Thank you for your time.