in reply to automating linux commands in perl
system() has a return code. You should always test it after a command.
All code given here is UNTESTED unless otherwise stated.