aboutsummaryrefslogtreecommitdiff
path: root/sboclean
diff options
context:
space:
mode:
authorJacob Pipkin <j@dawnrazor.net>2012-06-05 13:07:38 -0500
committerJacob Pipkin <j@dawnrazor.net>2012-06-05 13:07:38 -0500
commit7760aed5b109683578bdaee93f82283249d1f7a1 (patch)
tree79e26deea305ecde061b90109479929ce8373f61 /sboclean
parenta158c22df50796bbf02d876d6197635a1899aba6 (diff)
downloadsbotools-7760aed5b109683578bdaee93f82283249d1f7a1.tar.xz
removal of excess code when reading from STDIN
Diffstat (limited to 'sboclean')
-rwxr-xr-xsboclean7
1 files changed, 3 insertions, 4 deletions
diff --git a/sboclean b/sboclean
index ba710c3..e31f3ea 100755
--- a/sboclean
+++ b/sboclean
@@ -51,12 +51,11 @@ sub remove_stuff {
my $dir = shift;
opendir (my $dh, $dir);
FIRST: while (my $ls = readdir $dh) {
- next if $ls =~ /^\.[\.]{0,1}$/;
+ next FIRST if $ls =~ /^\.[\.]{0,1}$/;
my $full = "$dir/$ls";
if ($interactive eq 'TRUE') {
- print "Remove $full? [yn] ";
- my $test = <STDIN>;
- next FIRST unless $test =~ /^[Yy]/;
+ print "Remove $full? [n] ";
+ next FIRST unless <STDIN> =~ /^[Yy]/;
}
unlink $full if -f $full;
remove_tree $full if -d $full;