--- /usr/sbin/prepareclient.orig	2003-12-17 18:02:33.000000000 -0600
+++ /usr/sbin/prepareclient	2003-12-30 12:42:33.000000000 -0600
@@ -332,7 +332,8 @@
 # a pure perl version of which
 sub which {
     my $prog = shift;
-    foreach my $path (split(':',$ENV{PATH})) {
+    foreach my $path (split(':',$ENV{PATH},-1)) {
+        $path ||= ".";
         if(-x "$path/$prog") {
             return 1;
         }
--- /usr/bin/mkautoinstallcd.orig	2003-12-17 18:03:32.000000000 -0600
+++ /usr/bin/mkautoinstallcd	2003-12-30 12:42:49.000000000 -0600
@@ -321,7 +321,8 @@
 
 sub which {
     my $file = shift;
-    foreach my $path (split(/:/,$ENV{PATH})) {
+    foreach my $path (split(/:/,$ENV{PATH},-1)) {
+        $path ||= ".";
         if(-x "$path/$file") {
             return 1;
         }
--- /usr/lib/systemimager/perl/SystemImager/Common.pm.orig	2003-12-17 18:02:44.000000000 -0600
+++ /usr/lib/systemimager/perl/SystemImager/Common.pm	2003-12-30 12:42:57.000000000 -0600
@@ -206,7 +206,8 @@
 sub which {
     my ($class, $file, $path) = @_;
     
-    foreach my $dir (split(/:/,$path)) {
+    foreach my $dir (split(/:/,$path,-1)) {
+      $dir ||= ".";
       if(-x "$dir/$file") {
         return 1;
       }
--- /usr/lib/systemconfig/Util/Cmd.pm.orig	2003-12-23 11:45:39.000000000 -0600
+++ /usr/lib/systemconfig/Util/Cmd.pm	2003-12-30 12:43:09.000000000 -0600
@@ -41,7 +41,7 @@
 
 sub which {
     my $exename = shift;
-    for (map {"$_/$exename"} split(/:/,$ENV{PATH})) {
+    for (map {($_||".")."/$exename"} split(/:/,$ENV{PATH},-1)) {
         return $_ if(-e and -x);
     }
 }
