my $such = '| 0001 active -184 -74 |'; my ($value1, $value4) = $such =~ m/^\|\s+(\d)\d\d(\d)/; print "gefunden $value1 und $value4\n";