use strict; package SAR; &get_args (@ARGV); #Ok here you're passing a copy #of @ARGV into get_args's @_. #BTW your don't need & the #trailing ()'s make strict happy sub get_args { my @help = ; #Why read this now #You don't know if you need #it yet. ($ARGV[0] eq "/?") && (die @help); #Ok you passed the contents of #@ARGV into your sub in @_ but #you ignore it and read the #global @ARGV directly. #copy @_ that way you don't have #to worry about modifing the #global @ARGV. #my @array = @_; #die @help if ($array[0] eq "/?") }