DELIMITER // DROP PROCEDURE IF EXISTS DebugMe // CREATE PROCEDURE DebugMe(OUT arg char(10)) BEGIN SET arg = "HELLO"; END // DELIMITER ; CALL DebugMe(@blah); SELECT @blah; Query OK, 0 rows affected (0.00 sec) +-------+ | @blah | +-------+ | HELLO | +-------+ 1 row in set (0.00 sec) #### use warnings; use strict; use DBI; my $dsn = 'DBI:mysql:database=test'; my $dbh = DBI->connect($dsn, @ARGV, {RaiseError => 1}); my $sth = $dbh->prepare('SELECT "Hello World"'); $sth->execute(); printf "SELECT rows = %d\n", scalar $sth->rows; printf "\t(@$_)\n" for $sth->fetchrow_arrayref; my $v; $sth = $dbh->prepare('CALL DebugMe(?)'); $sth->execute($v); $sth->execute(\$v); __END__ SELECT rows = 1 (Hello World) DBD::mysql::st execute failed: OUT or INOUT argument 1 for routine test.DebugMe is not a variable or NEW pseudo-variable in BEFORE trigger at sscce.pl line 14. DBD::mysql::st execute failed: OUT or INOUT argument 1 for routine test.DebugMe is not a variable or NEW pseudo-variable in BEFORE trigger at sscce.pl line 14.