use IO::File; IO::File->new(">$ENV{HOME}/.bash_history") or die "Can't empty history: $!\n";