You can't really compare PHP with a Perl script.
PHP is usually run via a webserver and more precise via a module of the webserver, which will re-use certains processes/threads.
And only when something is re-used it can use an already made connection (so a script that is run via CGI can't re-use a connection made the previous time the page was loaded), using two connections from inside the same script would be possible but that isn't the default behaviour (or atleast not for a normal Perl script).
If you would run perl via the apache module mod_perl and you have loaded Apache::DBI then the default would be to use the connect method of Apache::DBI which will try to use a previous created connection