(...) my @try = ( # search the ORACLE_HOME we're using first # --- Traditional full-install locations "$OH/rdbms/public", # prefer public over others "$OH/rdbms", "$OH/plsql", # oratypes.h sometimes here (eg HPUX 11.23 Itanium Oracle 9.2.0), # --- Oracle SDK Instant Client locations "$OH/sdk/include", # --- Oracle RPM Instant Client locations "/usr/include/oracle/$client_version_full/client", # Instant Client for RedHat FC4 "/usr/include/oracle/$client_version_trim/client", # Instant Client for RedHat FC4 "/include/oracle/$client_version_full/client", # Instant Client for RedHat FC3 "/include/oracle/$client_version_trim/client", # Instant Client for RedHat FC3 ); unshift @try, $::opt_h if $::opt_h; @try = grep { -d $_ } @try; my %h_file; find( sub { return unless /^o(ci.{3,4}|ratypes)\.h$/i; my $dir = $File::Find::dir; $h_file{$_} ||= $dir; # record first one found print "Found $dir/$_\n" if $::opt_d; }, @try); (...)