3 we seem to have lost a few ambiguous warnings!!
5 Prototype after '@' for main::foo
8 Illegal character in prototype for main::foo
11 \1 better written as $1
12 use warnings 'syntax' ;
16 Semicolon seems to be missing
33 Multidimensional syntax %.*s not supported
36 You need to quote \"%s\""
37 sub fred {} ; $SIG{TERM} = fred;
39 Can't use \\%c to mean $%c in expression
40 $_ = "ab" ; s/(ab)/\1/e;
42 Unquoted string "abc" may clash with future reserved word at - line 3.
46 Possible attempt to separate words with commas
49 Possible attempt to put comments in qw() list
52 %s (...) interpreted as function
57 Old package separator used in string
62 Ambiguous use of %c{%s%s} resolved to %c%s%s
67 Ambiguous use of %c{%s} resolved to %c%s
69 sub fred {} $a = ${fred}
75 Bareword \"%s\" refers to nonexistent package
78 Ambiguous call resolved as CORE::%s(), qualify as such or use &
82 Unrecognized escape \\%c passed through
88 Postfix dereference is experimental
90 %s number > %s non-portable
91 my $a = 0b011111111111111111111111111111110 ;
92 $a = 0b011111111111111111111111111111111 ;
93 $a = 0b111111111111111111111111111111111 ;
101 Integer overflow in binary number
102 my $a = 0b011111111111111111111111111111110 ;
103 $a = 0b011111111111111111111111111111111 ;
104 $a = 0b111111111111111111111111111111111 ;
112 Use of /c modifier is meaningless without /g
114 Use of /c modifier is meaningless in s///
118 Use of "%s" without parentheses is ambiguous [check_uni]
121 Ambiguous use of -%s resolved as -&%s() [yylex]
122 sub fred {} ; - fred ;
124 Precedence problem: open %.*s should be open(%.*s) [yylex]
127 Operator or semicolon missing before %c%s [yylex]
128 Ambiguous use of %c resolved as operator %c
133 use open qw( :utf8 :std );
135 eval "sub fòò (@\$\0) {}";
137 Prototype after '@' for main::fòò : @$\0 at (eval 1) line 1.
138 Illegal character in prototype for main::fòò : @$\0 at (eval 1) line 1.
141 use open qw( :utf8 :std );
143 eval "sub foo (@\0) {}";
144 eval "sub foo2 :prototype(@\0) {}";
146 Prototype after '@' for main::foo : @\0 at (eval 1) line 1.
147 Illegal character in prototype for main::foo : @\0 at (eval 1) line 1.
148 Prototype after '@' for main::foo2 : @\x{0} at (eval 2) line 1.
149 Illegal character in prototype for main::foo2 : @\x{0} at (eval 2) line 1.
152 if (ord('A') == 193) {
153 print "SKIPPED\n# Different results on EBCDIC";
158 use open qw( :utf8 :std );
160 BEGIN { $::{"foo"} = "\@\$\0L\351on" }
161 BEGIN { eval "sub foo (@\$\0L\x{c3}\x{a9}on) {}"; }
163 Prototype after '@' for main::foo : @$\x{0}L... at (eval 1) line 1.
164 Illegal character in prototype for main::foo : @$\x{0}L... at (eval 1) line 1.
167 use open qw( :utf8 :std );
169 BEGIN { eval "sub foo (@\0) {}"; }
171 Prototype after '@' for main::foo : @\0 at (eval 1) line 1.
172 Illegal character in prototype for main::foo : @\0 at (eval 1) line 1.
175 eval "sub foo (@\xAB) {}";
177 Prototype after '@' for main::foo : @\x{ab} at (eval 1) line 1.
178 Illegal character in prototype for main::foo : @\x{ab} at (eval 1) line 1.
181 use open qw( :utf8 :std );
183 BEGIN { eval "sub foo (@\x{30cb}) {}"; }
185 Prototype after '@' for main::foo : @\x{30cb} at (eval 1) line 1.
186 Illegal character in prototype for main::foo : @\x{30cb} at (eval 1) line 1.
192 Missing ']' in prototype for main::f : [ at - line 2.
193 Missing ']' in prototype for main::f : [ at - line 3.
196 package bar { sub bar { eval q"sub foo ([)" } }
199 Missing ']' in prototype for bar::foo : [ at (eval 1) line 1.
203 $a =~ s/$foo/fool/seq;
207 Unknown regexp modifier "/e" at - line 2, near "=~ "
208 Unknown regexp modifier "/q" at - line 2, near "=~ "
209 Unknown regexp modifier "/q" at - line 3, near "=~ "
210 Execution of - aborted due to compilation errors.
214 use open qw( :utf8 :std );
216 $a =~ s/$foo/fool/seネq;
220 Unknown regexp modifier "/e" at - line 4, near "=~ "
221 Unknown regexp modifier "/ネ" at - line 4, near "=~ "
222 Unknown regexp modifier "/q" at - line 4, near "=~ "
223 Unknown regexp modifier "/ネ" at - line 5, near "=~ "
224 Unknown regexp modifier "/q" at - line 5, near "=~ "
225 Execution of - aborted due to compilation errors.
228 use warnings 'syntax' ;
230 no warnings 'syntax' ;
233 \1 better written as $1 at - line 3.
236 use warnings 'semicolon' ;
239 no warnings 'semicolon' ;
243 Semicolon seems to be missing at - line 3.
246 use warnings 'syntax' ;
258 Reversed += operator at - line 3.
259 Reversed -= operator at - line 4.
260 Reversed *= operator at - line 5.
261 Reversed %= operator at - line 6.
262 Reversed &= operator at - line 7.
263 Reversed .= operator at - line 8.
264 Reversed ^= operator at - line 9.
265 Reversed |= operator at - line 10.
266 Reversed <= operator at - line 11.
267 syntax error at - line 8, near "=."
268 syntax error at - line 9, near "=^"
269 syntax error at - line 10, near "=|"
270 Unterminated <> operator at - line 11.
273 no warnings 'syntax' ;
285 syntax error at - line 8, near "=."
286 syntax error at - line 9, near "=^"
287 syntax error at - line 10, near "=|"
288 Unterminated <> operator at - line 11.
291 use warnings 'syntax' ;
293 no warnings 'syntax' ;
296 Multidimensional syntax $a[1,2] not supported at - line 3.
299 use warnings 'syntax' ;
300 sub fred {} ; $SIG{TERM} = fred;
301 no warnings 'syntax' ;
304 You need to quote "fred" at - line 3.
308 use open qw( :utf8 :std );
309 use warnings 'syntax' ;
310 sub frèd {} ; $SIG{TERM} = frèd;
311 no warnings 'syntax' ;
314 You need to quote "frèd" at - line 5.
318 use open qw( :utf8 :std );
319 use warnings 'syntax' ;
320 sub ふれど {} ; $SIG{TERM} = ふれど;
321 no warnings 'syntax' ;
324 You need to quote "ふれど" at - line 5.
327 use warnings 'syntax' ;
330 s//\(2)/e; # should be exempt
331 s/${\2}//; # same here
333 no warnings 'syntax' ;
337 Can't use \1 to mean $1 in expression at - line 4.
340 use warnings 'reserved' ;
345 no warnings 'reserved' ;
348 Unquoted string "abc" may clash with future reserved word at - line 3.
356 Possible attempt to separate words with commas at - line 3.
364 Possible attempt to put comments in qw() list at - line 3.
368 @a = qw(a, b, c # #) ;
370 @a = qw(a, b, c # #) ;
372 Possible attempt to separate words with commas at - line 3.
373 Possible attempt to put comments in qw() list at - line 3.
376 use warnings 'syntax' ;
378 print ("") and $x = 1;
381 print (1+2) * 3 if 0; # only this one should warn
384 print (...) interpreted as function at - line 7.
387 no warnings 'syntax' ;
393 use warnings 'syntax' ;
397 printf (...) interpreted as function at - line 4.
400 no warnings 'syntax' ;
406 use warnings 'syntax' ;
410 sort (...) interpreted as function at - line 4.
413 no warnings 'syntax' ;
418 use warnings 'syntax';
423 no warnings 'syntax' ;
428 Old package separator used in string at - line 3.
429 (Did you mean "$foo\'bar" instead?)
430 Old package separator used in string at - line 4.
431 (Did you mean "@foo\'bar" instead?)
432 Old package separator used in string at - line 5.
433 (Did you mean "$#foo\'bar" instead?)
435 use warnings 'syntax'; use utf8;
440 no warnings 'syntax' ;
445 Old package separator used in string at - line 3.
446 (Did you mean "$fooл\'barл" instead?)
447 Old package separator used in string at - line 4.
448 (Did you mean "@fooл\'barл" instead?)
449 Old package separator used in string at - line 5.
450 (Did you mean "$#fooл\'barл" instead?)
453 use warnings 'ambiguous' ;
455 no warnings 'ambiguous' ;
458 Ambiguous use of ${time[...]} resolved to $time[...] at - line 3.
461 use warnings 'ambiguous' ;
464 Ambiguous use of ${time{...}} resolved to $time{...} at - line 3.
467 use warnings 'ambiguous' ;
475 Ambiguous use of ${time{...}} resolved to $time{...} at - line 5.
479 use warnings 'ambiguous' ;
493 Ambiguous use of ${time[...]} resolved to $time[...] at - line 5.
494 Ambiguous use of ${time[...]} resolved to $time[...] at - line 10.
498 no warnings 'ambiguous' ;
504 use warnings 'ambiguous' ;
507 $a = $#{time} ; # This one is special cased in toke.c
510 $a = defined &{time} ; # To avoid calling &::time
511 no warnings 'ambiguous' ;
514 $a = $#{time} ; # This one is special cased in toke.c
517 $a = defined &{time} ; # To avoid calling &::time
519 Ambiguous use of ${time} resolved to $time at - line 3.
520 Ambiguous use of @{time} resolved to @time at - line 4.
521 Ambiguous use of @{time} resolved to @time at - line 5.
522 Ambiguous use of %{time} resolved to %time at - line 6.
523 Ambiguous use of *{time} resolved to *time at - line 7.
524 Ambiguous use of &{time} resolved to &time at - line 8.
527 use warnings 'ambiguous' ;
550 Ambiguous use of ${time} resolved to $time at - line 4.
551 Ambiguous use of @{time} resolved to @time at - line 7.
552 Ambiguous use of @{time} resolved to @time at - line 10.
553 Ambiguous use of %{time} resolved to %time at - line 13.
554 Ambiguous use of *{time} resolved to *time at - line 16.
555 Ambiguous use of &{time} resolved to &time at - line 19.
559 use warnings 'ambiguous' ;
562 no warnings 'ambiguous' ;
565 Ambiguous use of ${fred} resolved to $fred at - line 4.
568 use warnings 'syntax' ;
569 $a = _123; print "$a\n"; #( 3 string)
570 $a = 1_23; print "$a\n";
571 $a = 12_3; print "$a\n";
572 $a = 123_; print "$a\n"; # 6
573 $a = _+123; print "$a\n"; # 7 string)
574 $a = +_123; print "$a\n"; #( 8 string)
575 $a = +1_23; print "$a\n";
576 $a = +12_3; print "$a\n";
577 $a = +123_; print "$a\n"; # 11
578 $a = _-123; print "$a\n"; #(12 string)
579 $a = -_123; print "$a\n"; #(13 string)
580 $a = -1_23; print "$a\n";
581 $a = -12_3; print "$a\n";
582 $a = -123_; print "$a\n"; # 16
583 $a = 123._456; print "$a\n"; # 17
584 $a = 123.4_56; print "$a\n";
585 $a = 123.45_6; print "$a\n";
586 $a = 123.456_; print "$a\n"; # 20
587 $a = +123._456; print "$a\n"; # 21
588 $a = +123.4_56; print "$a\n";
589 $a = +123.45_6; print "$a\n";
590 $a = +123.456_; print "$a\n"; # 24
591 $a = -123._456; print "$a\n"; # 25
592 $a = -123.4_56; print "$a\n";
593 $a = -123.45_6; print "$a\n";
594 $a = -123.456_; print "$a\n"; # 28
595 $a = 123.456E_12; printf("%.0f\n", $a); # 29
596 $a = 123.456E1_2; printf("%.0f\n", $a);
597 $a = 123.456E12_; printf("%.0f\n", $a); # 31
598 $a = 123.456E_+12; printf("%.0f\n", $a); # 32
599 $a = 123.456E+_12; printf("%.0f\n", $a); # 33
600 $a = 123.456E+1_2; printf("%.0f\n", $a);
601 $a = 123.456E+12_; printf("%.0f\n", $a); # 35
602 $a = 123.456E_-12; print "$a\n"; # 36
603 $a = 123.456E-_12; print "$a\n"; # 37
604 $a = 123.456E-1_2; print "$a\n";
605 $a = 123.456E-12_; print "$a\n"; # 39
606 $a = 1__23; print "$a\n"; # 40
607 $a = 12.3__4; print "$a\n"; # 41
608 $a = 12.34e1__2; printf("%.0f\n", $a); # 42
609 no warnings 'syntax' ;
610 $a = _123; print "$a\n";
611 $a = 1_23; print "$a\n";
612 $a = 12_3; print "$a\n";
613 $a = 123_; print "$a\n";
614 $a = _+123; print "$a\n";
615 $a = +_123; print "$a\n";
616 $a = +1_23; print "$a\n";
617 $a = +12_3; print "$a\n";
618 $a = +123_; print "$a\n";
619 $a = _-123; print "$a\n";
620 $a = -_123; print "$a\n";
621 $a = -1_23; print "$a\n";
622 $a = -12_3; print "$a\n";
623 $a = -123_; print "$a\n";
624 $a = 123._456; print "$a\n";
625 $a = 123.4_56; print "$a\n";
626 $a = 123.45_6; print "$a\n";
627 $a = 123.456_; print "$a\n";
628 $a = +123._456; print "$a\n";
629 $a = +123.4_56; print "$a\n";
630 $a = +123.45_6; print "$a\n";
631 $a = +123.456_; print "$a\n";
632 $a = -123._456; print "$a\n";
633 $a = -123.4_56; print "$a\n";
634 $a = -123.45_6; print "$a\n";
635 $a = -123.456_; print "$a\n";
636 $a = 123.456E_12; printf("%.0f\n", $a);
637 $a = 123.456E1_2; printf("%.0f\n", $a);
638 $a = 123.456E12_; printf("%.0f\n", $a);
639 $a = 123.456E_+12; printf("%.0f\n", $a);
640 $a = 123.456E+_12; printf("%.0f\n", $a);
641 $a = 123.456E+1_2; printf("%.0f\n", $a);
642 $a = 123.456E+12_; printf("%.0f\n", $a);
643 $a = 123.456E_-12; print "$a\n";
644 $a = 123.456E-_12; print "$a\n";
645 $a = 123.456E-1_2; print "$a\n";
646 $a = 123.456E-12_; print "$a\n";
647 $a = 1__23; print "$a\n";
648 $a = 12.3__4; print "$a\n";
649 $a = 12.34e1__2; printf("%.0f\n", $a);
652 Misplaced _ in number at - line 6.
653 Misplaced _ in number at - line 11.
654 Misplaced _ in number at - line 16.
655 Misplaced _ in number at - line 17.
656 Misplaced _ in number at - line 20.
657 Misplaced _ in number at - line 21.
658 Misplaced _ in number at - line 24.
659 Misplaced _ in number at - line 25.
660 Misplaced _ in number at - line 28.
661 Misplaced _ in number at - line 29.
662 Misplaced _ in number at - line 31.
663 Misplaced _ in number at - line 32.
664 Misplaced _ in number at - line 33.
665 Misplaced _ in number at - line 35.
666 Misplaced _ in number at - line 36.
667 Misplaced _ in number at - line 37.
668 Misplaced _ in number at - line 39.
669 Misplaced _ in number at - line 40.
670 Misplaced _ in number at - line 41.
671 Misplaced _ in number at - line 42.
754 use warnings 'syntax';
755 $a = 1_; print "$a\n";
756 $a = 01_; print "$a\n";
757 $a = 0_; print "$a\n";
758 $a = 0x1_; print "$a\n";
759 $a = 1.2_; print "$a\n";
760 $a = 1._2; print "$a\n";
761 $a = 1._; print "$a\n";
763 Misplaced _ in number at - line 3.
764 Misplaced _ in number at - line 4.
765 Misplaced _ in number at - line 5.
766 Misplaced _ in number at - line 6.
767 Misplaced _ in number at - line 7.
768 Misplaced _ in number at - line 8.
769 Misplaced _ in number at - line 9.
779 use warnings 'bareword' ;
782 no warnings 'bareword' ;
786 Bareword "FRED::" refers to nonexistent package at bar line 25.
790 use open qw( :utf8 :std );
791 use warnings 'bareword' ;
794 no warnings 'bareword' ;
798 Bareword "FRÈD::" refers to nonexistent package at bar line 25.
802 use open qw( :utf8 :std );
803 use warnings 'bareword' ;
806 no warnings 'bareword' ;
810 Bareword "ϞϞϞ::" refers to nonexistent package at bar line 25.
813 use warnings 'ambiguous' ;
816 no warnings 'ambiguous' ;
819 Ambiguous call resolved as CORE::time(), qualify as such or use & at - line 4.
838 Warning: Use of "rand" without parentheses is ambiguous at - line 2.
844 no warnings 'ambiguous' ;
846 use warnings 'ambiguous' ;
851 Warning: Use of "rand" without parentheses is ambiguous at - line 3.
852 Warning: Use of "rand" without parentheses is ambiguous at - line 8.
853 Warning: Use of "rand" without parentheses is ambiguous at - line 10.
859 my $b = whatever + 4 ;
861 Warning: Use of "myrand" without parentheses is ambiguous at - line 4.
864 use warnings "ambiguous";
865 print for keys %+; # should not warn
868 # toke.c [This does not warn any more.]
871 sub hank : lvalue {$_}
872 --hank; # This should *not* warn [perl #77240]
875 # toke.c [This does not warn any more.]
880 no warnings 'ambiguous' ;
882 use warnings 'ambiguous' ;
888 # toke.c [This does not warn any more.]
890 use open qw( :utf8 :std );
895 # toke.c [This does not warn any more.]
898 use open qw( :utf8 :std );
902 no warnings 'ambiguous' ;
904 use warnings 'ambiguous' ;
910 # toke.c [This does not warn any more.]
912 use open qw( :utf8 :std );
917 # toke.c [This does not warn any more.]
920 use open qw( :utf8 :std );
924 no warnings 'ambiguous' ;
926 use warnings 'ambiguous' ;
934 open local *FOO; # should be ok
936 Precedence problem: open FOO should be open(FOO) at - line 2.
940 use open qw( :utf8 :std );
943 Precedence problem: open FÒÒ should be open(FÒÒ) at - line 4.
947 use open qw( :utf8 :std );
950 Precedence problem: open ᒍOO should be open(ᒍOO) at - line 4.
952 # toke.c (and [perl #16184])
953 open FOO => "<&0"; close FOO;
960 no warnings 'precedence' ;
962 use warnings 'precedence' ;
966 open Foo::BAR; # this should not warn
968 Precedence problem: open FOO should be open(FOO) at - line 3.
969 Precedence problem: open FOO should be open(FOO) at - line 8.
970 Precedence problem: open FOO should be open(FOO) at - line 10.
975 use open qw( :utf8 :std );
978 no warnings 'precedence' ;
980 use warnings 'precedence' ;
985 Precedence problem: open FÒÒ should be open(FÒÒ) at - line 5.
986 Precedence problem: open FÒÒ should be open(FÒÒ) at - line 10.
987 Precedence problem: open FÒÒ should be open(FÒÒ) at - line 12.
991 use open qw( :utf8 :std );
995 no warnings 'precedence' ;
997 use warnings 'precedence' ;
1002 Precedence problem: open ᒍÒÒ should be open(ᒍÒÒ) at - line 5.
1003 Precedence problem: open ᒍÒÒ should be open(ᒍÒÒ) at - line 10.
1004 Precedence problem: open ᒍÒÒ should be open(ᒍÒÒ) at - line 12.
1010 no warnings 'ambiguous' ;
1012 use warnings 'ambiguous' ;
1016 # These should not warn [perl #117535]:
1018 no warnings 'deprecated';
1022 Operator or semicolon missing before *foo at - line 3.
1023 Ambiguous use of * resolved as operator * at - line 3.
1024 Operator or semicolon missing before *foo at - line 8.
1025 Ambiguous use of * resolved as operator * at - line 8.
1026 Operator or semicolon missing before *foo at - line 10.
1027 Ambiguous use of * resolved as operator * at - line 10.
1028 $* is no longer supported as of Perl 5.30 at - line 14.
1034 no warnings 'ambiguous' ;
1036 use warnings 'ambiguous' ;
1040 # This should not produce ambiguity warnings [perl #117535]:
1044 Operator or semicolon missing before %foo at - line 3.
1045 Ambiguous use of % resolved as operator % at - line 3.
1046 Operator or semicolon missing before %foo at - line 8.
1047 Ambiguous use of % resolved as operator % at - line 8.
1048 Operator or semicolon missing before %foo at - line 10.
1049 Ambiguous use of % resolved as operator % at - line 10.
1050 Bareword found where operator expected at - line 12, near "$%foo"
1051 (Missing operator before foo?)
1052 Bareword found where operator expected at - line 13, near "$ %foo"
1053 (Missing operator before foo?)
1054 Illegal modulus zero at - line 3.
1060 no warnings 'ambiguous' ;
1062 use warnings 'ambiguous' ;
1066 # These should not warn produce ambiguity warnings [perl #76910]:
1071 Operator or semicolon missing before &foo at - line 3.
1072 Ambiguous use of & resolved as operator & at - line 3.
1073 Operator or semicolon missing before &foo at - line 8.
1074 Ambiguous use of & resolved as operator & at - line 8.
1075 Operator or semicolon missing before &foo at - line 10.
1076 Ambiguous use of & resolved as operator & at - line 10.
1077 Bareword found where operator expected at - line 13, near "$&foo"
1078 (Missing operator before foo?)
1079 Bareword found where operator expected at - line 14, near "$ &foo"
1080 (Missing operator before foo?)
1081 Undefined subroutine &main::foo called at - line 3.
1085 use open qw( :utf8 :std );
1089 no warnings 'ambiguous' ;
1091 use warnings 'ambiguous' ;
1096 Operator or semicolon missing before *foo at - line 5.
1097 Ambiguous use of * resolved as operator * at - line 5.
1098 Operator or semicolon missing before *foo at - line 10.
1099 Ambiguous use of * resolved as operator * at - line 10.
1100 Operator or semicolon missing before *foo at - line 12.
1101 Ambiguous use of * resolved as operator * at - line 12.
1104 use warnings 'misc' ;
1106 no warnings 'misc' ;
1109 Unrecognized escape \m passed through at - line 3.
1112 use warnings 'misc' ;
1114 no warnings 'misc' ;
1117 Useless use of \E at - line 3.
1120 use feature 'postderef_qq';
1128 use warnings 'portable' ;
1129 my $a = 0b011111111111111111111111111111110 ;
1130 $a = 0b011111111111111111111111111111111 ;
1131 $a = 0b111111111111111111111111111111111 ;
1135 $a = 0037777777776 ;
1136 $a = 0037777777777 ;
1137 $a = 0047777777777 ;
1138 no warnings 'portable' ;
1139 $a = 0b011111111111111111111111111111110 ;
1140 $a = 0b011111111111111111111111111111111 ;
1141 $a = 0b111111111111111111111111111111111 ;
1145 $a = 0037777777776 ;
1146 $a = 0037777777777 ;
1147 $a = 0047777777777 ;
1149 Binary number > 0b11111111111111111111111111111111 non-portable at - line 5.
1150 Hexadecimal number > 0xffffffff non-portable at - line 8.
1151 Octal number > 037777777777 non-portable at - line 11.
1154 use warnings 'overflow' ;
1155 my $a = 0b011111111111111111111111111111110 ;
1156 $a = 0b011111111111111111111111111111111 ;
1157 $a = 0b10000000000000000000000000000000000000000000000000000000000000000 ;
1160 $a = 0x10000000000000000 ;
1161 $a = 0037777777776 ;
1162 $a = 0037777777777 ;
1163 $a = 002000000000000000000000;
1164 no warnings 'overflow' ;
1165 $a = 0b011111111111111111111111111111110 ;
1166 $a = 0b011111111111111111111111111111111 ;
1167 $a = 0b10000000000000000000000000000000000000000000000000000000000000000 ;
1170 $a = 0x10000000000000000 ;
1171 $a = 0037777777776 ;
1172 $a = 0037777777777 ;
1173 $a = 002000000000000000000000;
1175 Integer overflow in binary number at - line 5.
1176 Integer overflow in hexadecimal number at - line 8.
1177 Integer overflow in octal number at - line 11.
1180 use warnings 'ambiguous';
1181 "@mjd_previously_unused_array";
1182 no warnings 'ambiguous';
1183 "@mjd_previously_unused_array2";
1185 Possible unintended interpolation of @mjd_previously_unused_array in string at - line 3.
1189 use open qw( :utf8 :std );
1190 use warnings 'ambiguous';
1191 "@mjd_previously_unused_àrray";
1192 no warnings 'ambiguous';
1193 "@mjd_previously_unused_àrray2";
1195 Possible unintended interpolation of @mjd_previously_unused_àrray in string at - line 5.
1199 use open qw( :utf8 :std );
1200 use warnings 'ambiguous';
1201 "@mjd_previously_unused_ぁrrぁy";
1202 no warnings 'ambiguous';
1203 "@mjd_previously_unused_ぁrrぁy2";
1205 Possible unintended interpolation of @mjd_previously_unused_ぁrrぁy in string at - line 5.
1213 # 20020328 mjd-perl-patch+@plover.com at behest of jfriedl@yahoo.com
1214 use warnings 'regexp';
1217 no warnings 'regexp';
1221 Use of /c modifier is meaningless without /g at - line 4.
1224 # 20020328 mjd-perl-patch+@plover.com at behest of jfriedl@yahoo.com
1225 use warnings 'regexp';
1229 no warnings 'regexp';
1233 Use of /c modifier is meaningless in s/// at - line 5.
1234 Use of /c modifier is meaningless in s/// at - line 6.
1238 # 20020414 mjd-perl-patch+@plover.com # -a flag should suppress these warnings
1245 # 20020414 mjd-perl-patch+@plover.com # -a flag should suppress these warnings
1248 Possible unintended interpolation of @F in string at - line 4.
1249 Name "main::F" used only once: possible typo at - line 4.
1253 # 20020414 mjd-perl-patch+@plover.com
1258 # 20020414 mjd-perl-patch+@plover.com
1259 # In 5.7.3, this emitted "Possible unintended interpolation" warnings
1260 use warnings 'ambiguous';
1267 eval q/if ($a) { } elseif ($b) { }/;
1268 no warnings "syntax";
1269 eval q/if ($a) { } elseif ($b) { }/;
1271 elseif should be elsif at (eval 1) line 1.
1276 no warnings "syntax";
1279 Number found where operator expected at (eval 1) line 1, near "5 6"
1280 (Missing operator before 6?)
1283 use warnings "syntax"; no warnings "deprecated";
1292 no warnings "syntax";
1300 !=~ should be !~ at - line 4.
1301 !=~ should be !~ at - line 5.
1302 !=~ should be !~ at - line 6.
1303 !=~ should be !~ at - line 7.
1304 !=~ should be !~ at - line 8.
1305 !=~ should be !~ at - line 9.
1308 use warnings "syntax";
1309 sub proto_after_array(@$);
1310 sub proto_after_arref(\@$);
1311 sub proto_after_arref2(\[@$]);
1312 sub proto_after_arref3(\[@$]_);
1313 sub proto_after_hash(%$);
1314 sub proto_after_hashref(\%$);
1315 sub proto_after_hashref2(\[%$]);
1316 sub underscore_last_pos($_);
1317 sub underscore2($_;$);
1318 sub underscore_fail($_$); sub underscore_fail2 : prototype($_$);
1319 sub underscore_after_at(@_);
1322 use feature 'state';
1323 state sub estate (@$);
1328 no warnings "syntax";
1329 sub proto_after_array(@$);
1330 sub proto_after_hash(%$);
1331 sub underscore_fail($_$);
1333 Prototype after '@' for main::proto_after_array : @$ at - line 3.
1334 Prototype after '%' for main::proto_after_hash : %$ at - line 7.
1335 Illegal character after '_' in prototype for main::underscore_fail : $_$ at - line 12.
1336 Illegal character after '_' in prototype for main::underscore_fail2 : $_$ at - line 12.
1337 Prototype after '@' for main::underscore_after_at : @_ at - line 13.
1338 Prototype after '@' for hour : @$ at - line 14.
1339 Prototype after '@' for migh : @$ at - line 15.
1340 Prototype after '@' for estate : @$ at - line 17.
1341 Prototype after '@' for hour : @$ at - line 19.
1342 Prototype after '@' for migh : @$ at - line 20.
1343 Prototype after '@' for estate : @$ at - line 21.
1346 use warnings "ambiguous";
1347 "foo\nn" =~ /^foo$\n/;
1348 "foo\nn" =~ /^foo${\}n/;
1349 my $foo = qr/^foo$\n/;
1350 my $bar = qr/^foo${\}n/;
1351 no warnings "ambiguous";
1352 "foo\nn" =~ /^foo$\n/;
1353 "foo\nn" =~ /^foo${\}n/;
1354 my $foo = qr/^foo$\n/;
1355 my $bar = qr/^foo${\}n/;
1357 Possible unintended interpolation of $\ in regex at - line 3.
1358 Possible unintended interpolation of $\ in regex at - line 5.
1361 use warnings 'syntax' ;
1365 no warnings 'syntax' ;
1370 Missing braces on \o{} at - line 3, within string
1371 Missing right brace on \o{} at - line 4, within string
1372 Empty \o{} at - line 5, within string
1373 BEGIN not safe after errors--compilation aborted at - line 6.
1376 use warnings 'digit' ;
1377 my $a = "\o{1238456}";
1378 no warnings 'digit' ;
1379 my $a = "\o{1238456}";
1381 Non-octal character '8' terminates \o early. Resolved as "\o{123}" at - line 3.
1385 print ref ? "yes\n" : "no\n" foreach [], ''; # ? is unambiguosly an operator
1392 $a =~ ?rand?; # ? is not a regex match
1394 syntax error at - line 3, near "=~ ?"
1395 Execution of - aborted due to compilation errors.
1399 if (ord('A') == 193) {
1400 print "SKIPPED\n# result varies depending on which ebcdic platform";
1407 no warnings 'syntax';
1411 "\c," is more clearly written simply as "l" at - line 9.
1412 "\c`" is more clearly written simply as "\ " at - line 10.
1416 if (ord('A') == 193) {
1417 print "SKIPPED\n# test is ASCII-specific";
1425 Use ";" instead of "\c{" at - line 9, within string
1426 Execution of - aborted due to compilation errors.
1430 if (ord('A') == 65) {
1431 print "SKIPPED\n# test is EBCDIC-specific";
1439 Sequence "\c{" invalid at - line 9, within string
1440 Execution of - aborted due to compilation errors.
1446 Character following "\c" must be printable ASCII at - line 2, within string
1447 Execution of - aborted due to compilation errors.
1450 use warnings 'syntax' ;
1456 no warnings 'syntax' ;
1459 Regexp modifiers "/d" and "/u" are mutually exclusive at - line 3, near "= "
1460 Regexp modifiers "/l" and "/a" are mutually exclusive at - line 4, near "= "
1461 Regexp modifier "/l" may not appear twice at - line 5, near "= "
1462 Regexp modifier "/a" may appear a maximum of twice at - line 7, near "= "
1463 BEGIN not safe after errors--compilation aborted at - line 8.
1467 eval "no warnings 'deprecated'; print q\xabfoo";
1468 if ($@ =~ /Can't find string terminator "\xab" anywhere before EOF/) {
1472 print "not ok $@\n";
1479 use open qw( :utf8 :std );
1480 use warnings 'ambiguous' ;
1483 no warnings 'ambiguous' ;
1486 Ambiguous use of ${frèd} resolved to $frèd at - line 6.
1490 use open qw( :utf8 :std );
1491 use warnings 'ambiguous' ;
1494 no warnings 'ambiguous' ;
1497 Ambiguous use of ${f렏} resolved to $f렏 at - line 6.
1501 use open qw( :utf8 :std );
1505 CORE::렏 is not a keyword at - line 5.
1510 eval this_method_is_fake ();
1512 Undefined subroutine &main::this_method_is_fake called at - line 4.
1515 # [perl #107002] Erroneous ambiguity warnings
1516 sub { # do not actually call require
1517 require a::b . 1; # These used to produce erroneous
1518 require a::b + 1; # ambiguity warnings.
1523 # [perl #113094], [perl #119101], since reverted so no warnings generated
1525 print "aa" =~ m{^a\{1,2\}$}, "A\n";
1526 print "aa" =~ m{^a\x\{61\}$}, "B\n";
1527 print "a\\x{6F}" =~ m{^a\\x\{6F\}$}, "C\n";
1528 print "a\\o" =~ m{^a\\\x\{6F\}$}, "D\n";
1529 print "a\\\\x{6F}" =~ m{^a\\\\x\{6F\}$}, "E\n";
1530 print "a\\\\o" =~ m{^a\\\\\x\{6F\}$}, "F\n";
1531 print "aa" =~ m{^a{1,2}$}, "G\n";
1532 print "aq" =~ m[^a\[a-z\]$], "H\n";
1533 print "aq" =~ m(^a\(q\)$), "I\n";
1535 Non-hex character '\\' terminates \x early. Resolved as "\x00\\" in regex; marked by <-- HERE in m/^a\x <-- HERE \{61\}$/ at - line 5.
1536 Non-hex character '\\' terminates \x early. Resolved as "\x00\\" in regex; marked by <-- HERE in m/^a\\\x <-- HERE \{6F\}$/ at - line 7.
1537 Non-hex character '\\' terminates \x early. Resolved as "\x00\\" in regex; marked by <-- HERE in m/^a\\\\\x <-- HERE \{6F\}$/ at - line 9.
1549 #[perl #119123] disallow literal control character variables
1552 }; # shouldn't warn on {\n, even though \n is a control character
1556 # [perl #120288] -X at start of line gave spurious warning, where X is not
1557 # a filetest operator
1563 # [perl #124113] Compile-time warning with UTF8 variable in array index
1568 my $v = $array[ 0 + $𝛃 ];
1569 $v = $array[ $𝛃 + 0 ];
1573 # Allow Unicode here doc boundaries
1576 my $v = <<EnFraçais;
1584 # Fix 'Use of "..." without parentheses is ambiguous' warning for
1585 # Unicode function names. If not under PERL_UNICODE, this will generate
1586 # a "Wide character" warning
1589 sub 𝛃(;$) { return 0; }
1593 (Wide character.*\n)?Warning: Use of "𝛃" without parentheses is ambiguous
1595 # RT #4346 Case 1: Warnings for print (...)
1596 # TODO RT #4346: Warnings for print(...) are inconsistent
1601 print (...) interpreted as function at - line 3.
1602 print (...) interpreted as function at - line 4.
1606 # RT #4346 Case 2: Warnings for print (...)
1611 print (...) interpreted as function at - line 3.
1612 print (...) interpreted as function at - line 4.
1616 # RT #4346 Case 3: Warnings for print (...)
1617 # TODO RT #4346: Warnings for print(...) are inconsistent
1622 print (...) interpreted as function at - line 3.
1623 print (...) interpreted as function at - line 4.
1627 # RT #4346 Case 4: Warnings for print (...)
1628 # TODO RT #4346: Warnings for print(...) are inconsistent
1633 print (...) interpreted as function at - line 3.
1634 print (...) interpreted as function at - line 4.
1638 # NAME Non-grapheme delimiters
1640 if (ord('A') == 193) {
1641 print "SKIPPED\n# ebcdic platforms generates different Malformed UTF-8 warnings.";
1646 my $a = qr ̂foobar̂;
1648 Use of unassigned code point or non-standalone grapheme for a delimiter is not allowed at - line 8, near "= "
1649 Execution of - aborted due to compilation errors.
1651 # NAME [perl #130567] Assertion failure
1653 if (ord('A') != 65) {
1654 print "SKIPPED\n# test is ASCII-specific";
1658 no warnings "uninitialized";
1661 s//"\x{180};;s\221(*$@$`\241\275";/gee;
1662 s//"s\221\302\302\302\302\302\302\302$@\241\275";/gee;
1665 # NAME [perl #130666] Assertion failure
1666 no warnings "uninitialized";
1667 BEGIN{$^H=-1};my $l; s
\0$0[$l]
\0\0
1670 # NAME [perl #129036] Assertion failure
1671 BEGIN{$0="";$^H=hex join""=>A00000}p?
1674 syntax error at - line 1, at EOF
1675 Execution of - aborted due to compilation errors.
1677 # NAME [perl #130655]
1682 # NAME [perl #134064]
1684 if (ord('A') == 193) {
1685 print "SKIPPED\n# test is ASCII-specific, but could be extended to EBCDIC";
1692 print "The eval did not crash the program\n"
1695 Malformed UTF-8 character: .*non-continuation.*
1696 The eval did not crash the program
1698 # NAME [perl #133850] print $fh $1 in s///e expression
1702 s/(x)/ print $fh $1 /e;
1705 # NAME [perl #133850] side case
1709 my $x = "${print $fh $y; \'x'}";
1712 # NAME [perl #133850] another case
1718 Ambiguous use of ${time} resolved to $time at - line 4.
1720 # NAME [perl #133850] another case
1726 Scalar value @x{"a"} better written as $x{"a"} at - line 4.
1728 # NAME Warn on 32-bit code points
1729 # SKIP ? $Config{uvsize} < 8
1730 use warnings 'portable';
1731 my $a = "\x{8000_0000}";
1732 my $b = "\o{20_000_000_000}";
1734 Code point 0x80000000 is not Unicode, requires a Perl extension, and so is not portable at - line 2.
1735 Code point 0x80000000 is not Unicode, requires a Perl extension, and so is not portable at - line 3.
1737 # NAME Check that our Multidimensional array heuristic doesn't false positive on function calls
1742 # force a numeric warning, but we should NOT see a Multidimensional warning here
1743 my $trigger_num_warn= $array[index $str,$substr] + 1;
1744 # this should trigger a Multidimensional warning
1745 my $should_warn_multi= $array[0x1,0x2];
1747 Multidimensional syntax $array[0x1,0x2] not supported at - line 8.
1748 Argument "B" isn't numeric in addition (+) at - line 6.
1750 # NAME extra paired delimiters Latin1 range in UTF-8
1751 BEGIN { binmode STDERR, ":utf8" }
1753 use feature 'extra_paired_delimiters';
1754 no warnings 'experimental::extra_paired_delimiters';
1755 my $good = q<this string uses ASCII delimiter; no warning>;
1756 my $good2 = q«this string has mirrored delimiters in either order»;
1757 my $good3 = q»and reversed«;
1758 no feature 'extra_paired_delimiters';
1759 my $warn3 = q«this string starts and ends with the lhs terminator«;
1760 my $warn4 = q»this string starts and ends with the rhs mirror»;
1762 Use of '«' is deprecated as a string delimiter at - line 9.
1763 Use of '»' is deprecated as a string delimiter at - line 10.
1765 # NAME extra paired delimiters above Latin1 range
1766 BEGIN { binmode STDERR, ":utf8" }
1768 use feature 'extra_paired_delimiters';
1769 no warnings 'experimental::extra_paired_delimiters';
1770 my $good = q<this string uses ASCII delimiter; no warning>;
1771 my $good2 = q《this string has a mirrored terminator》;
1772 my $warn2 = q》this string starts and ends with the rhs mirror》;
1773 my $good3 = q‹this string has mirrored delimiters in either order›;
1774 my $good3 = q›and reversed‹;
1775 no feature 'extra_paired_delimiters';
1776 my $warn3 = q《this string starts and ends with the lhs terminator《;
1777 my $warn4 = q》this string starts and ends with the rhs mirror》;
1778 my $warn5 = q‹this string starts and ends with the lhs terminator‹;
1779 my $warn6 = q›this string starts and ends with the rhs mirror›;
1781 Use of '》' is deprecated as a string delimiter at - line 7.
1782 Use of '《' is deprecated as a string delimiter at - line 11.
1783 Use of '》' is deprecated as a string delimiter at - line 12.
1784 Use of '‹' is deprecated as a string delimiter at - line 13.
1785 Use of '›' is deprecated as a string delimiter at - line 14.