use strict; use warnings; my @ARGV = qw(-infile data_in.bin -outfile data_out.bin); my %args = @ARGV; print "Infile: $args{-infile}\n", "Outfile: $args{-outfile}" if ( exists $args{-infile} && exists $args{-outfile} );