$bash_history = '~/.bash_history'; unlink ($bash_history) || die "Error:$!\n"; system("touch $bash_history"); chmod (0700,$bash_history) || die "Error:$!\n";