in reply to Removal of A Directory

You have quote-itis. First, you don't need to quote simple strings as hash keys:
$dir = $in{sub_dir};
Second, placing variables inside single quotes does not expand them to their value. And you don't need to use double quotes either:
rmtree([$dir_location, $dir], 1, 1);
But I have an odd feeling you mean to do:
rmtree([ "$dir_location/$dir" ], 1, 1);


japhy -- Perl and Regex Hacker