use strict; use warnings; use 5.020; use Getopt::Long; my $foo; my $bar; GetOptions( 'foo:s' => \$foo, 'bar=i' => \$bar, ) or die "Optionsfehler"; say $_ for @ARGV;