perl -MConfig -le 'print q|LIBS:|;' \ -e 'print for grep { -d } (split /\s+/, $Config{loclibpth});'\ -e 'print q|INCLUDES:|;'\ -e 'print for grep { -d } (split /\s+/, $Config{locincpth});' # Output on one Ubuntu GNU/Linux box was: # LIBS: # /usr/local/lib # INCLUDES: # /usr/local/include