if (@ARGV !=1)
@ARGV is a list, it will not work because you are comparing the array to an integer. The correct term you'd need is $#ARGV.
If ($#ARGV != 1) { do stuff }
($var) = @ARGV; you are distributing @ARGV into ($var), var is now a list therefore you cant use it this way: print "\n$var (MD5)" . " : " . md5_hex("$var")."\n"; you'd need to access the elements for example $var[0]