replaced random_words shell with perl script