From d6b83f8450f6632e353e8389f2aae1ce9524ba32 Mon Sep 17 00:00:00 2001 From: Andreas Guldstrand Date: Sat, 12 Dec 2015 17:45:39 +0100 Subject: SBO::Lib: Fix in(), and use it in more places --- sboclean | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sboclean') diff --git a/sboclean b/sboclean index 36f86e6..3f0e495 100755 --- a/sboclean +++ b/sboclean @@ -13,7 +13,7 @@ use 5.16.0; use strict; use warnings FATAL => 'all'; -use SBO::Lib qw/ usage_error script_error /; +use SBO::Lib qw/ usage_error script_error in /; use File::Basename; use Getopt::Long qw(:config bundling); use File::Path qw(remove_tree); @@ -73,7 +73,7 @@ sub remove_stuff { my $dir = shift; opendir(my $dh, $dir); FIRST: while (my $ls = readdir $dh) { - next FIRST if $ls =~ /^(\.){1,2}$/; + next FIRST if in($ls => qw/ . .. /); rm_full("$dir/$ls"); } } -- cgit v1.2.3