my $tempdir = "/temp/"; my $tempfile = "tempfile"; and then open FH "$tempdir$tempfile";