diff options
author | Jacob Pipkin <j@dawnrazor.net> | 2012-06-05 13:07:38 -0500 |
---|---|---|
committer | Jacob Pipkin <j@dawnrazor.net> | 2012-06-05 13:07:38 -0500 |
commit | 7760aed5b109683578bdaee93f82283249d1f7a1 (patch) | |
tree | 79e26deea305ecde061b90109479929ce8373f61 /sboclean | |
parent | a158c22df50796bbf02d876d6197635a1899aba6 (diff) | |
download | sbotools-7760aed5b109683578bdaee93f82283249d1f7a1.tar.xz |
removal of excess code when reading from STDIN
Diffstat (limited to 'sboclean')
-rwxr-xr-x | sboclean | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -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; |