my $logdir = "/log/file/location"; my $logfile = "your.log"; my $fpath = "$logdir/$logfile"; open my $fh, '<', $fpath or die "I could not read $fpath: $!\n";