Added bash version
Added perl version of script; may not follow best practices because, frankly, I do not know any perl