$ ./2.analyse_text.pl --input-corpus 84-0.txt --ngram-length 4 --output-state 4.shelley.state args are --input-corpus 84-0.txt --ngram-length 4 --output-state 4.shelley.state Unknown option: input-corpus Unknown option: ngram-length Unknown option: output-state Usage : ./2.analyse_text.pl Something wrong with command-line parameters... $ cat 2.analyse_text.pl #!/usr/bin/env perl # FILE: analyse_text.pl # by bliako use 5.011; use warnings; use Getopt::Long; use Data::Dump qw/dump/; use lib '.'; use Markov::Ndimensional; my @args = @ARGV; say "args are @args"; my $input_corpus_filename = undef; my $input_state_filename = undef; my $output_state_filename = undef; my $output_stats_filename = undef; my $separator = '\s'; my $internal_separator = '|'; my $seed = undef; my $num_iterations = 100; if( ! Getopt::Long::GetOptions( 'input-state=s' => \$input_state_filename, 'separator=s' => \$separator, 'num-iterations=i' => $num_iterations, 'seed=s' => \$seed, 'help|h' => sub { print STDERR usage($0); exit(0) } ) ){ print STDERR usage($0) . "\n\nSomething wrong with command-line parameters...\n"; exit(1); } ...