for my $sql qw(sakila-schema.sql sakila-data.sql) { my $file = "sakila-db/$sql"; my $contents = read_file($file); print "\t$file\n"; open my $fh, '|-', 'mysql', @opt; print $fh $contents; } #### List form of pipe open not implemented at (eval 19) line 109 main::__ANON__('GLOB(0x2f641ec)', '|-', 'mysql', '--user=root', '--password=passw0rd', '--host=localhost', '--port=3306') called at etc/install_sakila.pl line 56 #### DELIMITER $$ CREATE FUNCTION inventory_held_by_customer(p_inventory_id INT) RETURNS INT READS SQL DATA BEGIN DECLARE v_customer_id INT; DECLARE EXIT HANDLER FOR NOT FOUND RETURN NULL; SELECT customer_id INTO v_customer_id FROM rental WHERE return_date IS NULL AND inventory_id = p_inventory_id; RETURN v_customer_id; END $$ DELIMITER ;