As it happens, on my platform (z/OS UNIX), the "sh" actually IS a form of korn shell (it was ported to the mainframe by MKS, apparently), so there is a 'whence'. What's weird is that doing something like $path = `whence $cmd | uniq` actually works, though the pipe to uniq is pointless. Something about piping it makes the value come back. Oh well, probably something weird in my UNIX environment. Thanks for the responses.
- DAP > -----Original Message----- > From: Brandon Willis [mailto:[EMAIL PROTECTED] > Sent: Thursday, June 26, 2003 9:36 PM > Cc: [EMAIL PROTECTED] > Subject: Re: using whence > > > `$cmd` or it identical twin qx($cmd) both shell out and actually do an > sh -c. So if you are looking for something specifically in ksh you'll > have to run ksh from within the qx(). > > |b > > On Thu, 2003-06-26 at 16:21, David Parker wrote: > > Hi. I have a perl script that calls various programs. I > would like to be able to verify that a given program is being > called from the right place - what I would use "whence" for > in the korn shell. > > > > I tried > > > > $path = `whence $cmdname`; > > > > but I don't get anything in $path. I'm undoubtedly missing > something - I'm a beginner! > > > > Thanks in advance for any clues.... > > > > - DAP > > > -------------------------------------------------------------- > ------------ > > David Parker > > Rocket Software > > (617) 614-2128 > > > > > > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]