$file = "testdir /"; #oops, typo! system( "rm -rf $file" ); #double oops system( "rm -rf '$file'" ); #will probably get an error # from the command, but your # root dir is still there.