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 ) ) { my $path = $dir . '/' . $file; return $path if -x $path; } } you may change "return undef" to "die" to make it paranoid if needed -- ____ Sparky{PI] -- Przemyslaw _ ___ _ _ ........... LANG...Pl..Ca..Es..En /____) ___ ___ _ _ || Iskra | | _ \| | | : WWW........ppcrcd.pld-linux.org \____\| -_)'___| ||^'||//\\// < | _/| | | : JID......sparky<at>jabberes.org (____/|| (_-_|_|| ||\\ || |_ |_| |_| _| : Mail....sparky<at>pld-linux.org _______________________________________________ pld-devel-en mailing list pld-devel-en@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-devel-en