When you're done with a file, call close : close « File « Perl






When you're done with a file, call close

    

close(filehandle);

#!/usr/bin/perl -w

# Test of open and die with $!.

$filename = "nofile";

open(TMP, $filename)
    or die "Can't open \"$filename\" due to $! ";

   
    
    
    
  








Related examples in the same category

1.Closing the Filehandle