From 0d9b5ce097876a6d823703f80e7323f66e483f8a Mon Sep 17 00:00:00 2001 From: "Janet B. Anderson" Date: Mon, 1 Oct 2001 17:48:05 +0000 Subject: [PATCH] Added basename function. --- config/tools/cp.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/config/tools/cp.pl b/config/tools/cp.pl index da6812736..bc202c6ae 100755 --- a/config/tools/cp.pl +++ b/config/tools/cp.pl @@ -3,6 +3,7 @@ # UNIX-cp in Perl use File::Copy; +use File::Basename; sub Usage { @@ -26,7 +27,8 @@ if (-d $target) { foreach $file ( @sources ) { - copy ($file, "$target/$file"); + $base=basename($file); + copy ($file, "$target/$base"); } } else