in reply to Re: Re: Getting args
in thread Getting args

You were close.
if ($var =~ /$ARGV[0]/) { ... }

A more exact match:
if ($var =~ /^$ARGV[0]$/) { ... }

Updated: $ARGV[1] is the SECOND argument. $ARGV[0] is the first one.