#!/usr/local/bin/perl -w use strict; my $dir = '/tmp/'; my $sub_dir; my $file = 'foo.txt'; my $path = "${dir}${sub_dir}${file}"; print "$path\n";