in reply to Re^2: search an array
in thread search an array

Out of curiousity I tried testing these out and neither seem to work ?
use DBI; use DBD::Oracle; $dsn = "dbi:Oracle:MYSID"; $dbuser = "myuser/mypass"; my $dbh = DBI->connect($dsn, $dbuser, '', { AutoCommit => 1, PrintErro +r => 0 }); unless($dbh) { die "Unable to connect ($DBI::errstr)\n"; exit 1; } @procs{ @{ $dbh->selectall_arrayref( "select spid from v\$process" ) } + } = (); my $xpid = 16405; if ( exists $procs{ $xpid } ) { print "Pid in use : $xpid\n"; }
The $xpid definitely exists in the v$process view. Is there something missing from this ?