use File::Spec; my $abspath = File::Spec->rel2abs($relpath);