rmdir: directory "SAS_util0001000021A9_sasux101": Directory rmdir: directory "SAS_util000100002E19_sasux101": Directory rmdir: directory "SAS_util000100005891_sasux101": Directory Heres the code I used but its wrong, I need to extract everything within the quotes into a variable or an array. while ($line = ) { if ($line =~ /[\"\w+\_w+\_w+\"]/) { $keep = $1; push(@test,$keep); } }