#!/usr/bin/perl # vi:ts=4 sw=4 et: use strict; use warnings; use Getopt::Long; # http://board.perl-community.de/cgi-bin/ikonboard/ikonboard.cgi?act=ST;f=6;t=4491 #> global variables #> ---------------------------------------------------------------------------- my $change = 0; #> main script #> ---------------------------------------------------------------------------- if ( !@ARGV ) { die "you didn't mention any options. see help for more.\n"; } else { my $result = GetOptions( "change" => \$change ); # check $result ... } if ( $change ) { print "Wanna change...\n"; } else { print "nothing to change...\n"; } __END__