my $FTPPath = "/my/ftp/path"; my $command = 'cd $FTPPath'; my $command_new = eval "\"$command\""; print "$command_new\n";