my $file = "$ARGV[0]"; # Better: (my $file = $ARGV[0]) or die "Syntax error ...\n";