use File::Spec::Functions qw/rel2abs/; print rel2abs("../bob/");' __END__ /home/myuser/../bob