in reply to shell problem

This might not be the best way, but you could pipe it into a different shell.
#!/usr/bin/perl -w use strict; open BASH, "|/bin/bash"; print BASH "tar -cf - $_ | (cd $new_disk; tar -xBpf -)"; close BASH;