./html.pl -root="/home/data/multiple/" -out="/home/data/output" -file="/home/data/file.txt" #### use strict; use warnings; use Getopt::Long qw(GetOptions); sub usage { if (@_) { my ($msg) = @_; chomp($msg); print(STDERR "$msg\n"); } GetOptions( 'root=s' => \my $dir, 'out=s' => \my $out, 'file=s' => \my $file, ) or usage();