while ( my $line = code-um-zeile-einzulesen ) { if ( $line =~ /T\((.*)\)/ ) { my $number = (split ",", $1)[-1]; print "$number\n"; } }