#!/usr/bin/perl
for (split(/:/, $ENV{'PATH'})) { 
        opendir( dir , $_);
        foreach my $file (readdir( dir ) ) {
           next unless  (-f "$_/$file") ;
           print "$_/$file\n";
        }
        closedir dir; 
}
