use Carp qw(croak); # use namespace::clean; # <-- Das nur wenn du ein OOP Modul hast sub splitTypeId { my ( $arg ) = @_; my ( $type, $id ) = $arg =~ m/ \A (\w) (\d+) \z /xms; my %map = ( n => 'node', w => 'way', r => 'relation', ); $type = $map{$type} || croak "Invalid Type ($type) is ($arg) a correct string for splitTypeId() ?\n"; return $type, $id; }