$ cat 632370.pl use strict; use warnings; use File::Spec::Functions; my $root = File::Spec->rootdir(); my $home = catfile( $root, qw ( t3file3 datools tools MTP ) ); my $logfile = catfile ( $home, q{logappend.txt} ); print $home; print $logfile; __END__