An older style is to use a bareword as the filehandle, as open(FH, "<", "input.txt") or die "Can't open < input.txt: $!"; Then you can use FH as the filehandle, in close FH and and so on. Note that it's a global variable, so this form is not recommended in new code.