Przemyslaw Iskra <[EMAIL PROTECTED]> [02-12-2008 00:39]: > On Mon, Dec 01, 2008 at 11:46:04PM +0100, glen wrote: >> +TODO: cook perlish which(), or hardcode > should be enough:
> sub which($)
> {
> my $file = shift || return undef;
> foreach my $dir ( split /:/, ( $ENV{PATH} || return undef ) ) {
use File::Spec ();
foreach my $dir ( File::Spec->path ) {
> my $path = $dir . '/' . $file;
my $path = File::Spec->catfile( $dir, $file );
--
Radosław Zieliński <[EMAIL PROTECTED]>
pgp5gjIs8annO.pgp
Description: PGP signature
_______________________________________________ pld-devel-en mailing list [email protected] http://lists.pld-linux.org/mailman/listinfo/pld-devel-en
