#!/usr/local/bin/perl use strict; use warnings; my @ARGV = (0,2,3,4); my $dir = defined($ARGV[0]) ? shift(@ARGV) : "/tmp"; print $dir;