#!/usr/bin/perl use warnings; use strict; use feature qw{ say }; use Getopt::Long; GetOptions('file=s' => \ my $file, 'dir=s' => \ my $dir); say "Running $ARGV[0] with the following arguments:"; say for @ARGV[1 .. $#ARGV]; #### $ 1229381.pl --file file.1 --dir dir.2 -- some-job x y z Running some-job with the following arguments: x y z