diff options
author | Guillaume Rousse <guillomovitch@mandriva.org> | 2008-02-10 14:33:31 +0000 |
---|---|---|
committer | Guillaume Rousse <guillomovitch@mandriva.org> | 2008-02-10 14:33:31 +0000 |
commit | 6cff9ea43f861c345db9416b2c32119018a170d8 (patch) | |
tree | 400c40fa8c8831b56dfb12ee75d74e762c2df344 | |
parent | 7bf5de146582b3389b9545776a9bb9c6932f7a82 (diff) | |
download | spec-helper-6cff9ea43f861c345db9416b2c32119018a170d8.tar spec-helper-6cff9ea43f861c345db9416b2c32119018a170d8.tar.gz spec-helper-6cff9ea43f861c345db9416b2c32119018a170d8.tar.bz2 spec-helper-6cff9ea43f861c345db9416b2c32119018a170d8.tar.xz spec-helper-6cff9ea43f861c345db9416b2c32119018a170d8.zip |
use File::Basename module for dirname() and basename() functions
-rwxr-xr-x | compress_files | 17 |
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. |