#!/usr/bin/perl use warnings; use strict; use Getopt::Long; my %pars = ( run_script => 0 ); GetOptions ( \%pars, 'run_script=f', ); print "Run script $pars{run_script}\n"; allen94-lt 11: ./getopt_ex.pl -r 5 Run script 5 allen94-lt 12: ./getopt_ex.pl Run script 0