$logfile = "C:\\somepath\\somefile"; open (LOGFILE, "$logfile) || die "Can't open $logfile: $!"; do something with the file close (LOGFILE);