aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xcompress_files17
1 files changed, 1 insertions, 16 deletions
diff --git a/compress_files b/compress_files
index 24798be..ecc0d75 100755
--- a/compress_files
+++ b/compress_files
@@ -6,22 +6,7 @@ use strict;
use warnings;
use Cwd;
use File::Find;
-
-################################################################################
-# Returns the basename of the argument passed to it.
-sub basename {
- my $fn = shift;
- $fn =~ s!^.*/(.*?)$!$1!;
- return $fn;
-}
-
-################################################################################
-# Returns the directory name of the argument passed to it.
-sub dirname {
- my $fn = shift;
- $fn =~ s!^(.*)/.*?$!$1!;
- return $fn;
-}
+use File::Basename;
################################################################################
# Run a command that may have a huge number of arguments, like xargs does.