diff --git a/src/pl/plperl/expected/plperl.out b/src/pl/plperl/expected/plperl.out
index 29c1d11c447e6087fee85565c0bf458cbc21486d..d23a3020a33155b74621d72e801fed84ce657ceb 100644
--- a/src/pl/plperl/expected/plperl.out
+++ b/src/pl/plperl/expected/plperl.out
@@ -626,8 +626,8 @@ DO $$ open my $fh, "</nonesuch"; $$ LANGUAGE plperl;
 ERROR:  'open' trapped by operation mask at line 1.
 CONTEXT:  PL/Perl anonymous code block
 -- check that eval is allowed and eval'd restricted ops are caught
-DO $$ eval q{chdir '.'}; warn "Caught: $@"; $$ LANGUAGE plperl;
-WARNING:  Caught: 'chdir' trapped by operation mask at line 2.
+DO $$ eval q{chdir '.';}; warn "Caught: $@"; $$ LANGUAGE plperl;
+WARNING:  Caught: 'chdir' trapped by operation mask at line 1.
 CONTEXT:  PL/Perl anonymous code block
 -- check that compiling do (dofile opcode) is allowed
 -- but that executing it for a file not already loaded (via require) dies
diff --git a/src/pl/plperl/expected/plperl_init.out b/src/pl/plperl/expected/plperl_init.out
index a21ea0b6214b891bad9a27999a0454a90836a456..133828e9f38b31414ecb0727444056fbb26fa7a9 100644
--- a/src/pl/plperl/expected/plperl_init.out
+++ b/src/pl/plperl/expected/plperl_init.out
@@ -1,14 +1,14 @@
 -- test plperl.on_plperl_init errors are fatal
 -- This test tests setting on_plperl_init after loading plperl
 LOAD 'plperl';
-SET SESSION plperl.on_plperl_init = ' system("/nonesuch") ';
+SET SESSION plperl.on_plperl_init = ' system("/nonesuch"); ';
 SHOW plperl.on_plperl_init;
- plperl.on_plperl_init 
------------------------
-  system("/nonesuch") 
+ plperl.on_plperl_init  
+------------------------
+  system("/nonesuch"); 
 (1 row)
 
 DO $$ warn 42 $$ language plperl;
-ERROR:  'system' trapped by operation mask at line 2.
+ERROR:  'system' trapped by operation mask at line 1.
 CONTEXT:  while executing plperl.on_plperl_init
 PL/Perl anonymous code block
diff --git a/src/pl/plperl/sql/plperl.sql b/src/pl/plperl/sql/plperl.sql
index ad361614c488fa7f04dbd10a6f4844f8cf506d1b..dc6b1694644c55e993bd78419f6f3be04ca4a011 100644
--- a/src/pl/plperl/sql/plperl.sql
+++ b/src/pl/plperl/sql/plperl.sql
@@ -405,7 +405,7 @@ DO $$ qx("/nonesuch"); $$ LANGUAGE plperl;
 DO $$ open my $fh, "</nonesuch"; $$ LANGUAGE plperl;
 
 -- check that eval is allowed and eval'd restricted ops are caught
-DO $$ eval q{chdir '.'}; warn "Caught: $@"; $$ LANGUAGE plperl;
+DO $$ eval q{chdir '.';}; warn "Caught: $@"; $$ LANGUAGE plperl;
 
 -- check that compiling do (dofile opcode) is allowed
 -- but that executing it for a file not already loaded (via require) dies
diff --git a/src/pl/plperl/sql/plperl_init.sql b/src/pl/plperl/sql/plperl_init.sql
index d60268d033ecf8cc6ef636ed933a5d6983fd1bab..4ebf3f86eb7795a0ec8702eff09484144cf57072 100644
--- a/src/pl/plperl/sql/plperl_init.sql
+++ b/src/pl/plperl/sql/plperl_init.sql
@@ -3,7 +3,7 @@
 -- This test tests setting on_plperl_init after loading plperl
 LOAD 'plperl';
 
-SET SESSION plperl.on_plperl_init = ' system("/nonesuch") ';
+SET SESSION plperl.on_plperl_init = ' system("/nonesuch"); ';
 
 SHOW plperl.on_plperl_init;