########
# toke.c
use warnings 'syntax' ;
-print ("")
+print ("");
+print ("") and $x = 1;
+print ("") or die;
+print ("") // die;
+print (1+2) * 3 if 0; # only this one should warn
+print (1+2) if 0;
EXPECT
-print (...) interpreted as function at - line 3.
+print (...) interpreted as function at - line 7.
########
# toke.c
no warnings 'syntax' ;
########
# toke.c
use warnings 'syntax' ;
-printf ("")
+printf ("");
+printf ("") . '';
EXPECT
-printf (...) interpreted as function at - line 3.
+printf (...) interpreted as function at - line 4.
########
# toke.c
no warnings 'syntax' ;
########
# toke.c
use warnings 'syntax' ;
-sort ("")
+sort ("");
+sort ("") . '';
EXPECT
-sort (...) interpreted as function at - line 3.
+sort (...) interpreted as function at - line 4.
########
# toke.c
no warnings 'syntax' ;
Warning: Use of "rand" without parentheses is ambiguous at - line 10.
########
# toke.c
+use warnings "ambiguous";
+print for keys %+; # should not warn
+EXPECT
+########
+# toke.c
sub fred {};
-fred ;
EXPECT
Possible unintended interpolation of @mjd_previously_unused_array in string at - line 3.
########
# toke.c
-# The \q should warn, the \_ should NOT warn.
-use warnings 'misc';
-"foo" =~ /\q/;
-"bar" =~ /\_/;
-no warnings 'misc';
-"foo" =~ /\q/;
-"bar" =~ /\_/;
-EXPECT
-Unrecognized escape \q passed through at - line 4.
-########
-# toke.c
# 20020328 mjd-perl-patch+@plover.com at behest of jfriedl@yahoo.com
use warnings 'regexp';
"foo" =~ /foo/c;