C:\>type test.pl #!/usr/bin/perl use strict; our ( $HELLO, $WORLD ); # fake the behaviour of -s { no strict; my @other = (); while(my $term = shift @ARGV) { $term =~ s/^\-/\$/ ? eval $term : push @other, $term; } @ARGV = @other; } print "Got $HELLO $WORLD\n"; print "\@ARGV = ( @ARGV )\n"; C:\>perl test.pl -HELLO=hello -WORLD=world other arguments Got hello world @ARGV = ( other arguments )