Perl will usually automatically close any open file handles at the end of the script, so most of the time, you don't have to bother. The only trouble comes when you need to open a large number of files concurrently. Most operating systems have a limited number of file handles available, so if you fail to close any open file handles, you may run out, which isn't easy to recover from. Conveniently, in newer versions of Perl, storing a file handle in a lexical variable will cause the file handle to be automatically closed when the variable goes out of scope, e.g.
if(open my $fh, '<', $file){
# process file
}
# file will be closed when we reach here
Check out open and close for more info.
Update: Links fixed.