in reply to Searching for working Sendmail

perl -e 'print `whereis sendmail`;'

Of course I was looking on CPAN first but there seems to be no File::WhereIs or the like.


holli

When you're up to your ass in alligators, it's difficult to remember that your original purpose was to drain the swamp.

Replies are listed 'Best First'.
Re^2: Searching for Sendmail
by cosmicperl (Chaplain) on Feb 16, 2009 at 11:35 UTC
    Maybe 'which' would be better. It does have a cpan module http://search.cpan.org/~pereinar/File-Which-0.05/Which.pm

      "which" (and, according to the perldoc, File::Which) will only look in directories in your $PATH, whereas "whereis" will also find binaries which are not in your path.


      All dogma is stupid.
        Good point, which is pretty useless if you are just running the command and the shell will check the path anyway.

        It's pretty tempting to write a File::whereis

        Lyle
Re^2: Searching for Sendmail
by cosmicperl (Chaplain) on Feb 16, 2009 at 13:49 UTC
    But more importantly. We still have the problem of detecting which of the returned list is actually working. They may have several copies or Sendmail or Qmail installed and only one working.


    Lyle