open(FILE, "<$logfile"); # specify read explicitly with < print "$logfile:\n"; print while(); close(FILE);