Skip to content

Instantly share code, notes, and snippets.

@nihen
Created March 4, 2011 17:07
Show Gist options
  • Save nihen/855125 to your computer and use it in GitHub Desktop.
Save nihen/855125 to your computer and use it in GitHub Desktop.
use DBI;
use Data::Dumper;
my $dbh = DBI->connect(
"dbi:mysql:database=sandbox",
'',
'',
{AutoInactiveDestroy => 1, RaiseError => 1}
);
my $pid = fork;
die('fail fork') unless defined $pid;
if ( $pid ) {
wait;
say Dumper [$dbh->selectrow_array('select id from sandbox limit 1')];
}
else {
say Dumper [$dbh->selectrow_array('select id from sandbox limit 1')];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment