Created
July 9, 2009 22:48
-
-
Save dblevins/144068 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
sub which { | |
my $cmd = shift; | |
if (eval "require File::Which; 1") { | |
return File::Which::which($cmd); | |
} else { | |
return `which $cmd`; | |
} | |
} | |
print "pbcopy is available\n" if which("pbcopy"); | |
print "xclip is available\n" if which("xclip"); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment