#!/usr/bin/perl use strict; use warnings; use Getopt::Long; GetOptions( 'h' => \my $help, # weitere Optionen, z.B. 'f=s' => \my $filename, # verlangt einen string, z.B. -f hallo.pdf 's=n' => \my $size, # verlangt eine Zahl, z.B. -s 33 ); if ( $help ) { print "Hilfe..."; exit; } print "File: $filename -> Size: $size\n";