Created
March 4, 2011 17:07
-
-
Save nihen/855125 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
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