my $test = @$ref[3]; $test =~ m/00(\d{3})\.000(\d\d).00(\d{3})\.00000.00000 /; print $test."\n";