3 Found = in conditional, should be ==
6 Useless use of time in void context
7 Useless use of a variable in void context
8 Useless use of a constant in void context
13 Useless use of sort in scalar context
16 Applying %s to %s will act on scalar(%s)
17 my $a ; my @a = () ; my %a = () ; my $b = \@a ; my $c = \%a ;
32 Parentheses missing around "my" list at -e line 1.
35 Parentheses missing around "local" list at -e line 1.
38 Bareword found in conditional at -e line 1.
39 use warnings 'bareword'; my $x = print(ABC || 1);
41 Value of %s may be \"0\"; use \"defined\"
43 $x = 1 while $x = <FH> ;
45 Subroutine fred redefined at -e line 1.
46 sub fred{1;} sub fred{1;}
48 Constant subroutine %s redefined
49 sub fred() {1;} sub fred() {1;}
51 Format FRED redefined at /tmp/x line 5.
57 Array @%s missing the @ in argument %d of %s()
60 Hash %%%s missing the %% in argument %d of %s()
63 Statement unlikely to be reached
64 (Maybe you meant system() when you said exec()?
67 defined(@array) is deprecated
68 (Maybe you should just omit the defined()?)
70 defined (@a = (1,2,3)) ;
72 defined(%hash) is deprecated
73 (Maybe you should just omit the defined()?)
76 "my %s" used in sort comparison
78 $[ used in comparison (did you mean $] ?)
80 length() used on @array (did you mean "scalar(@array)"?)
81 length() used on %hash (did you mean "scalar(keys %hash)"?)
83 /---/ should probably be written as "---"
86 %s() called too early to check prototype [Perl_peep]
87 fred() ; sub fred ($$) {}
90 Package '%s' not found (did you use the incorrect case?)
92 Use of /g modifier is meaningless in split
94 Possible precedence problem on bitwise %c operator [Perl_ck_bitop]
98 Prototype mismatch: [cv_ckproto]
102 oops: oopsAV [oopsAV] TODO
103 oops: oopsHV [oopsHV] TODO
107 use warnings 'syntax' ;
109 no warnings 'syntax' ;
112 Found = in conditional, should be == at - line 3.
115 use warnings 'syntax' ;
116 use constant foo => 1;
118 no warnings 'syntax' ;
128 $main::foo = {}; %$main::foo->{"bar"};
129 $foo = {}; %$foo->{"bar"};
130 $main::foo = []; @$main::foo->[34];
131 $foo = []; @$foo->[34];
132 no warnings 'deprecated';
137 $main::foo = {}; %$main::foo->{"bar"};
138 $foo = {}; %$foo->{"bar"};
139 $main::foo = []; @$main::foo->[34];
140 $foo = []; @$foo->[34];
142 Using a hash as a reference is deprecated at - line 3.
143 Using a hash as a reference is deprecated at - line 4.
144 Using an array as a reference is deprecated at - line 5.
145 Using an array as a reference is deprecated at - line 6.
146 Using a hash as a reference is deprecated at - line 7.
147 Using a hash as a reference is deprecated at - line 8.
148 Using an array as a reference is deprecated at - line 9.
149 Using an array as a reference is deprecated at - line 10.
152 use warnings 'void' ; close STDIN ;
154 1 x 3 ; # OP_REPEAT (folded)
155 (1) x 3 ; # OP_REPEAT
157 wantarray ; # OP_WANTARRAY
167 defined $a ; # OP_DEFINED
170 length $a ; # OP_LENGTH
171 substr $a,1 ; # OP_SUBSTR
172 vec $a,1,2 ; # OP_VEC
173 index $a,1,2 ; # OP_INDEX
174 rindex $a,1,2 ; # OP_RINDEX
175 sprintf $a ; # OP_SPRINTF
179 #values %a ; # OP_VALUES
183 unpack "a", "a" ; # OP_UNPACK
184 pack $a,"" ; # OP_PACK
186 (@a)[0,1] ; # OP_LSLICE
189 sort(1,2) ; # OP_SORT
190 reverse(1,2) ; # OP_REVERSE
195 fileno STDIN ; # OP_FILENO
197 tell STDIN ; # OP_TELL
198 readlink 1; # OP_READLINK
200 localtime ; # OP_LOCALTIME
202 eval { getgrnam 1 }; # OP_GGRNAM
203 eval { getgrgid 1 }; # OP_GGRGID
204 eval { getpwnam 1 }; # OP_GPWNAM
205 eval { getpwuid 1 }; # OP_GPWUID
206 prototype "foo"; # OP_PROTOTYPE
207 $a ~~ $b; # OP_SMARTMATCH
212 Useless use of a constant ("111") in void context at - line 2.
213 Useless use of repeat (x) in void context at - line 3.
214 Useless use of wantarray in void context at - line 5.
215 Useless use of reference-type operator in void context at - line 12.
216 Useless use of reference constructor in void context at - line 13.
217 Useless use of single ref constructor in void context at - line 14.
218 Useless use of defined operator in void context at - line 15.
219 Useless use of hex in void context at - line 16.
220 Useless use of oct in void context at - line 17.
221 Useless use of length in void context at - line 18.
222 Useless use of substr in void context at - line 19.
223 Useless use of vec in void context at - line 20.
224 Useless use of index in void context at - line 21.
225 Useless use of rindex in void context at - line 22.
226 Useless use of sprintf in void context at - line 23.
227 Useless use of array element in void context at - line 24.
228 Useless use of array slice in void context at - line 26.
229 Useless use of hash element in void context at - line 29.
230 Useless use of hash slice in void context at - line 30.
231 Useless use of unpack in void context at - line 31.
232 Useless use of pack in void context at - line 32.
233 Useless use of join or string in void context at - line 33.
234 Useless use of list slice in void context at - line 34.
235 Useless use of sort in void context at - line 37.
236 Useless use of reverse in void context at - line 38.
237 Useless use of range (or flop) in void context at - line 41.
238 Useless use of caller in void context at - line 42.
239 Useless use of fileno in void context at - line 43.
240 Useless use of eof in void context at - line 44.
241 Useless use of tell in void context at - line 45.
242 Useless use of readlink in void context at - line 46.
243 Useless use of time in void context at - line 47.
244 Useless use of localtime in void context at - line 48.
245 Useless use of gmtime in void context at - line 49.
246 Useless use of getgrnam in void context at - line 50.
247 Useless use of getgrgid in void context at - line 51.
248 Useless use of getpwnam in void context at - line 52.
249 Useless use of getpwuid in void context at - line 53.
250 Useless use of subroutine prototype in void context at - line 54.
251 Useless use of smart match in void context at - line 55.
252 Useless use of numeric comparison (<=>) in void context at - line 56.
253 Useless use of __SUB__ in void context at - line 58.
256 use warnings 'void' ; close STDIN ;
257 my $x = sort (2,1,3);
261 Useless use of sort in scalar context at - line 3.
264 no warnings 'void' ; close STDIN ;
267 wantarray ; # OP_WANTARRAY
277 defined $a ; # OP_DEFINED
280 length $a ; # OP_LENGTH
281 substr $a,1 ; # OP_SUBSTR
282 vec $a,1,2 ; # OP_VEC
283 index $a,1,2 ; # OP_INDEX
284 rindex $a,1,2 ; # OP_RINDEX
285 sprintf $a ; # OP_SPRINTF
289 #values %a ; # OP_VALUES
293 unpack "a", "a" ; # OP_UNPACK
294 pack $a,"" ; # OP_PACK
296 (@a)[0,1] ; # OP_LSLICE
299 sort(1,2) ; # OP_SORT
300 reverse(1,2) ; # OP_REVERSE
305 fileno STDIN ; # OP_FILENO
307 tell STDIN ; # OP_TELL
308 readlink 1; # OP_READLINK
310 localtime ; # OP_LOCALTIME
312 eval { getgrnam 1 }; # OP_GGRNAM
313 eval { getgrgid 1 }; # OP_GGRGID
314 eval { getpwnam 1 }; # OP_GPWNAM
315 eval { getpwuid 1 }; # OP_GPWUID
316 prototype "foo"; # OP_PROTOTYPE
320 use warnings 'void' ;
321 for (@{[0]}) { "$_" } # check warning isn't duplicated
323 for (@{[0]}) { "$_" } # check warning isn't duplicated
325 Useless use of string in void context at - line 3.
328 use warnings 'void' ;
331 if ( ! $Config{d_telldir}) {
334 # telldir not present
339 telldir 1 ; # OP_TELLDIR
341 telldir 1 ; # OP_TELLDIR
343 Useless use of telldir in void context at - line 13.
346 use warnings 'void' ;
349 if ( ! $Config{d_getppid}) {
352 # getppid not present
357 getppid ; # OP_GETPPID
359 getppid ; # OP_GETPPID
361 Useless use of getppid in void context at - line 13.
364 use warnings 'void' ;
367 if ( ! $Config{d_getpgrp}) {
370 # getpgrp not present
375 getpgrp ; # OP_GETPGRP
377 getpgrp ; # OP_GETPGRP
379 Useless use of getpgrp in void context at - line 13.
382 use warnings 'void' ;
385 if ( ! $Config{d_times}) {
397 Useless use of times in void context at - line 13.
400 use warnings 'void' ;
403 if ( ! $Config{d_getprior} or $^O eq 'os2') { # Locks before fixpak22
406 # getpriority not present
411 getpriority 1,2; # OP_GETPRIORITY
413 getpriority 1,2; # OP_GETPRIORITY
415 Useless use of getpriority in void context at - line 13.
418 use warnings 'void' ;
421 if ( ! $Config{d_getlogin}) {
424 # getlogin not present
429 getlogin ; # OP_GETLOGIN
431 getlogin ; # OP_GETLOGIN
433 Useless use of getlogin in void context at - line 13.
436 use warnings 'void' ;
438 if ( ! $Config{d_socket}) {
441 # getsockname not present
442 # getpeername not present
443 # gethostbyname not present
444 # gethostbyaddr not present
445 # gethostent not present
446 # getnetbyname not present
447 # getnetbyaddr not present
448 # getnetent not present
449 # getprotobyname not present
450 # getprotobynumber not present
451 # getprotoent not present
452 # getservbyname not present
453 # getservbyport not present
454 # getservent not present
458 getsockname STDIN ; # OP_GETSOCKNAME
459 getpeername STDIN ; # OP_GETPEERNAME
460 gethostbyname 1 ; # OP_GHBYNAME
461 gethostbyaddr 1,2; # OP_GHBYADDR
462 gethostent ; # OP_GHOSTENT
463 getnetbyname 1 ; # OP_GNBYNAME
464 getnetbyaddr 1,2 ; # OP_GNBYADDR
465 getnetent ; # OP_GNETENT
466 getprotobyname 1; # OP_GPBYNAME
467 getprotobynumber 1; # OP_GPBYNUMBER
468 getprotoent ; # OP_GPROTOENT
469 getservbyname 1,2; # OP_GSBYNAME
470 getservbyport 1,2; # OP_GSBYPORT
471 getservent ; # OP_GSERVENT
474 getsockname STDIN ; # OP_GETSOCKNAME
475 getpeername STDIN ; # OP_GETPEERNAME
476 gethostbyname 1 ; # OP_GHBYNAME
477 gethostbyaddr 1,2; # OP_GHBYADDR
478 gethostent ; # OP_GHOSTENT
479 getnetbyname 1 ; # OP_GNBYNAME
480 getnetbyaddr 1,2 ; # OP_GNBYADDR
481 getnetent ; # OP_GNETENT
482 getprotobyname 1; # OP_GPBYNAME
483 getprotobynumber 1; # OP_GPBYNUMBER
484 getprotoent ; # OP_GPROTOENT
485 getservbyname 1,2; # OP_GSBYNAME
486 getservbyport 1,2; # OP_GSBYPORT
487 getservent ; # OP_GSERVENT
489 # some functions may not be there, so we exit without running
493 Useless use of getsockname in void context at - line 24.
494 Useless use of getpeername in void context at - line 25.
495 Useless use of gethostbyname in void context at - line 26.
496 Useless use of gethostbyaddr in void context at - line 27.
497 Useless use of gethostent in void context at - line 28.
498 Useless use of getnetbyname in void context at - line 29.
499 Useless use of getnetbyaddr in void context at - line 30.
500 Useless use of getnetent in void context at - line 31.
501 Useless use of getprotobyname in void context at - line 32.
502 Useless use of getprotobynumber in void context at - line 33.
503 Useless use of getprotoent in void context at - line 34.
504 Useless use of getservbyname in void context at - line 35.
505 Useless use of getservbyport in void context at - line 36.
506 Useless use of getservent in void context at - line 37.
509 use warnings 'void' ;
520 Useless use of a variable in void context at - line 3.
521 Useless use of a variable in void context at - line 4.
522 Useless use of a variable in void context at - line 5.
523 Useless use of a variable in void context at - line 6.
526 use warnings 'void' ;
529 "x" . "y"; # optimized to OP_CONST
530 2 + 2; # optimized to OP_CONST
531 use constant U => undef;
534 5 || print "bad\n"; # test OPpCONST_SHORTCIRCUIT
535 print "boo\n" if U; # test OPpCONST_SHORTCIRCUIT
539 "x" . "y"; # optimized to OP_CONST
540 2 + 2; # optimized to OP_CONST
542 Useless use of a constant ("abc") in void context at - line 3.
543 Useless use of a constant (7) in void context at - line 4.
544 Useless use of a constant ("xy") in void context at - line 5.
545 Useless use of a constant (4) in void context at - line 6.
546 Useless use of a constant (undef) in void context at - line 8.
547 Useless use of a constant ("\"\t\n") in void context at - line 9.
551 use open qw( :utf8 :std );
552 use warnings 'void' ;
554 "Ẋ" . "ƴ"; # optimized to OP_CONST
555 FOO; # Bareword optimized to OP_CONST
556 use constant ů => undef;
558 5 || print "bad\n"; # test OPpCONST_SHORTCIRCUIT
559 print "boo\n" if ů; # test OPpCONST_SHORTCIRCUIT
562 "Ẋ" . "ƴ"; # optimized to OP_CONST
564 Useless use of a constant ("\340\x{1e06}c") in void context at - line 5.
565 Useless use of a constant ("\x{1e8a}\x{1b4}") in void context at - line 6.
566 Useless use of a constant ("\x{ff26}\x{ff2f}\x{ff2f}") in void context at - line 7.
567 Useless use of a constant (undef) in void context at - line 9.
571 use warnings 'misc' ;
572 my $a ; my @a = () ; my %a = () ; my $b = \@a ; my $c = \%a ;my $d = 'test';
589 my $a ; my @a = () ; my %a = () ; my $b = \@a ; my $c = \%a ; my $d = 'test';
606 Applying pattern match (m//) to @a will act on scalar(@a) at - line 5.
607 Applying substitution (s///) to @a2 will act on scalar(@a2) at - line 6.
608 Applying transliteration (tr///) to @a3 will act on scalar(@a3) at - line 7.
609 Applying pattern match (m//) to @array will act on scalar(@array) at - line 8.
610 Applying substitution (s///) to @array will act on scalar(@array) at - line 9.
611 Applying transliteration (tr///) to @array will act on scalar(@array) at - line 10.
612 Applying pattern match (m//) to %a will act on scalar(%a) at - line 11.
613 Applying substitution (s///) to %a2 will act on scalar(%a2) at - line 12.
614 Applying transliteration (tr///) to %a3 will act on scalar(%a3) at - line 13.
615 Applying pattern match (m//) to %hash will act on scalar(%hash) at - line 14.
616 Applying substitution (s///) to %hash will act on scalar(%hash) at - line 15.
617 Applying transliteration (tr///) to %hash will act on scalar(%hash) at - line 16.
618 Useless use of /d modifier in transliteration operator at - line 17.
619 Replacement list is longer than search list at - line 18.
620 Can't modify array dereference in substitution (s///) at - line 6, near "s/a/b/ ;"
621 BEGIN not safe after errors--compilation aborted at - line 20.
624 use warnings 'parenthesis' ;
626 my @foo,%bar, $quux; # there's a TAB here
628 no warnings 'parenthesis' ;
631 Parentheses missing around "my" list at - line 3.
632 Parentheses missing around "my" list at - line 4.
635 use warnings 'parenthesis' ;
637 no warnings 'parenthesis' ;
640 Parentheses missing around "our" list at - line 3.
643 use warnings 'parenthesis' ;
644 local $a, $b = (1,2);
646 no warnings 'parenthesis' ;
647 local $c, $d = (1,2);
649 Parentheses missing around "local" list at - line 3.
650 Parentheses missing around "local" list at - line 4.
653 use warnings 'bareword' ;
655 no warnings 'bareword' ;
658 Bareword found in conditional at - line 3.
664 use warnings 'misc' ;
666 $x = 1 if $x = <FH> ;
668 $x = 1 if $x = <FH> ;
670 Value of <HANDLE> construct can be "0"; test with defined() at - line 4.
673 use warnings 'misc' ;
675 $x = 1 if $x = readdir FH ;
677 $x = 1 if $x = readdir FH ;
680 Value of readdir() operator can be "0"; test with defined() at - line 4.
683 use warnings 'misc' ;
688 Value of glob construct can be "0"; test with defined() at - line 3.
691 use warnings 'misc' ;
693 $x = 1 if $x = each %a ;
695 $x = 1 if $x = each %a ;
697 Value of each() operator can be "0"; test with defined() at - line 4.
700 use warnings 'misc' ;
701 $x = 1 while $x = <*> and 0 ;
703 $x = 1 while $x = <*> and 0 ;
705 Value of glob construct can be "0"; test with defined() at - line 3.
708 use warnings 'misc' ;
710 $x = 1 while $x = readdir FH and 0 ;
712 $x = 1 while $x = readdir FH and 0 ;
715 Value of readdir() operator can be "0"; test with defined() at - line 4.
720 ($_ = <FH>) // ($_ = 1);
726 use warnings 'redefine' ;
729 no warnings 'redefine' ;
732 Subroutine fred redefined at - line 4.
735 use warnings 'redefine' ;
738 no warnings 'redefine' ;
741 Constant subroutine fred redefined at - line 4.
747 Constant subroutine fred redefined at - line 3.
751 *fred = sub () { 2 };
753 Constant subroutine main::fred redefined at - line 3.
756 no warnings 'redefine' ;
762 no warnings 'redefine' ;
764 *fred = sub () { 2 };
768 use warnings 'redefine' ;
773 no warnings 'redefine' ;
777 Format FRED redefined at - line 5.
781 no warnings 'deprecated' ;
784 Array @FRED missing the @ in argument 1 of push() at - line 2.
788 no warnings 'deprecated' ;
791 Hash %FRED missing the % in argument 1 of keys() at - line 2.
794 use warnings 'syntax' ;
798 Statement unlikely to be reached at - line 4.
799 (Maybe you meant system() when you said exec()?)
801 # op.c, no warning if exec isn't a statement.
802 use warnings 'syntax' ;
803 $a || exec "$^X -e 1" ;
810 defined(@array) is deprecated at - line 2.
811 (Maybe you should just omit the defined()?)
816 defined(@array) is deprecated at - line 2.
817 (Maybe you should just omit the defined()?)
820 defined(@a = (1,2,3));
822 defined(@array) is deprecated at - line 2.
823 (Maybe you should just omit the defined()?)
828 defined(%hash) is deprecated at - line 2.
829 (Maybe you should just omit the defined()?)
834 defined(%hash) is deprecated at - line 2.
835 (Maybe you should just omit the defined()?)
838 no warnings 'syntax' ;
848 Prototype mismatch: sub main::fred () vs ($) at - line 3.
852 use open qw( :utf8 :std );
856 Prototype mismatch: sub main::frèd () vs ($) at - line 5.
860 use open qw( :utf8 :std );
862 eval "sub fòò (\$\0) {}";
864 Illegal character in prototype for main::fòò : $\0 at (eval 1) line 1.
868 use open qw( :utf8 :std );
870 eval "sub foo (\0) {}";
872 Illegal character in prototype for main::foo : \0 at (eval 1) line 1.
876 use open qw( :utf8 :std );
878 BEGIN { $::{"foo"} = "\$\0L\351on" }
879 BEGIN { eval "sub foo (\$\0L\x{c3}\x{a9}on) {}"; }
881 Illegal character in prototype for main::foo : $\x{0}L... at (eval 1) line 1.
885 use open qw( :utf8 :std );
887 BEGIN { eval "sub foo (\0) {}"; }
889 Illegal character in prototype for main::foo : \0 at (eval 1) line 1.
893 eval "sub foo (\xAB) {}";
895 Illegal character in prototype for main::foo : \x{ab} at (eval 1) line 1.
899 use open qw( :utf8 :std );
901 BEGIN { eval "sub foo (\x{30cb}) {}"; }
903 Illegal character in prototype for main::foo : \x{30cb} at (eval 1) line 1.
907 use open qw( :utf8 :std );
909 BEGIN { $::{"foo"} = "\x{30cb}" }
910 BEGIN { eval "sub foo {}"; }
912 Prototype mismatch: sub main::foo (ニ) vs none at (eval 1) line 1.
919 no warnings 'prototype' ;
922 use warnings 'prototype' ;
929 Prototype mismatch: sub main::fred () vs ($) at - line 4.
930 Prototype mismatch: sub main::freD () vs ($) at - line 11.
931 Prototype mismatch: sub main::FRED () vs ($) at - line 14.
933 # op.c [S_simplify_sort]
935 my @tests = split /^/, '
938 { use integer; sort {$a <=> $b} @a}
941 { use integer; sort {$b <=> $a} @a}
943 for my $pragma ('use warnings "syntax";', '') {
944 for my $vars ('', 'my $a;', 'my $b;', 'my ($a,$b);') {
945 for my $inner_stmt ('', 'print;', 'func();') {
946 eval "#line " . ++$line . "01 -\n$pragma\n$vars"
947 . join "", map s/sort \{\K/$inner_stmt/r, @tests;
953 use warnings 'syntax';
955 # These used to be errors!
956 sort { ; } $a <=> $b;
957 sort { ; } $a, "<=>";
959 sort $a, $b if $cmpany_name;
963 "my $a" used in sort comparison at - line 403.
964 "my $a" used in sort comparison at - line 404.
965 "my $a" used in sort comparison at - line 405.
966 "my $a" used in sort comparison at - line 406.
967 "my $a" used in sort comparison at - line 407.
968 "my $a" used in sort comparison at - line 408.
969 "my $a" used in sort comparison at - line 503.
970 "my $a" used in sort comparison at - line 504.
971 "my $a" used in sort comparison at - line 505.
972 "my $a" used in sort comparison at - line 506.
973 "my $a" used in sort comparison at - line 507.
974 "my $a" used in sort comparison at - line 508.
975 "my $a" used in sort comparison at - line 603.
976 "my $a" used in sort comparison at - line 604.
977 "my $a" used in sort comparison at - line 605.
978 "my $a" used in sort comparison at - line 606.
979 "my $a" used in sort comparison at - line 607.
980 "my $a" used in sort comparison at - line 608.
981 "my $b" used in sort comparison at - line 703.
982 "my $b" used in sort comparison at - line 704.
983 "my $b" used in sort comparison at - line 705.
984 "my $b" used in sort comparison at - line 706.
985 "my $b" used in sort comparison at - line 707.
986 "my $b" used in sort comparison at - line 708.
987 "my $b" used in sort comparison at - line 803.
988 "my $b" used in sort comparison at - line 804.
989 "my $b" used in sort comparison at - line 805.
990 "my $b" used in sort comparison at - line 806.
991 "my $b" used in sort comparison at - line 807.
992 "my $b" used in sort comparison at - line 808.
993 "my $b" used in sort comparison at - line 903.
994 "my $b" used in sort comparison at - line 904.
995 "my $b" used in sort comparison at - line 905.
996 "my $b" used in sort comparison at - line 906.
997 "my $b" used in sort comparison at - line 907.
998 "my $b" used in sort comparison at - line 908.
999 "my $a" used in sort comparison at - line 1003.
1000 "my $b" used in sort comparison at - line 1003.
1001 "my $a" used in sort comparison at - line 1004.
1002 "my $b" used in sort comparison at - line 1004.
1003 "my $a" used in sort comparison at - line 1005.
1004 "my $b" used in sort comparison at - line 1005.
1005 "my $b" used in sort comparison at - line 1006.
1006 "my $a" used in sort comparison at - line 1006.
1007 "my $b" used in sort comparison at - line 1007.
1008 "my $a" used in sort comparison at - line 1007.
1009 "my $b" used in sort comparison at - line 1008.
1010 "my $a" used in sort comparison at - line 1008.
1011 "my $a" used in sort comparison at - line 1103.
1012 "my $b" used in sort comparison at - line 1103.
1013 "my $a" used in sort comparison at - line 1104.
1014 "my $b" used in sort comparison at - line 1104.
1015 "my $a" used in sort comparison at - line 1105.
1016 "my $b" used in sort comparison at - line 1105.
1017 "my $b" used in sort comparison at - line 1106.
1018 "my $a" used in sort comparison at - line 1106.
1019 "my $b" used in sort comparison at - line 1107.
1020 "my $a" used in sort comparison at - line 1107.
1021 "my $b" used in sort comparison at - line 1108.
1022 "my $a" used in sort comparison at - line 1108.
1023 "my $a" used in sort comparison at - line 1203.
1024 "my $b" used in sort comparison at - line 1203.
1025 "my $a" used in sort comparison at - line 1204.
1026 "my $b" used in sort comparison at - line 1204.
1027 "my $a" used in sort comparison at - line 1205.
1028 "my $b" used in sort comparison at - line 1205.
1029 "my $b" used in sort comparison at - line 1206.
1030 "my $a" used in sort comparison at - line 1206.
1031 "my $b" used in sort comparison at - line 1207.
1032 "my $a" used in sort comparison at - line 1207.
1033 "my $b" used in sort comparison at - line 1208.
1034 "my $a" used in sort comparison at - line 1208.
1036 # op.c [S_simplify_sort]
1037 use warnings 'syntax'; use 5.01;
1039 sort { $a <=> $b } ();
1041 "state $a" used in sort comparison at - line 4.
1043 # op.c [Perl_ck_cmp]
1044 use warnings 'syntax' ;
1045 no warnings 'deprecated';
1082 $[ used in numeric lt (<) (did you mean $] ?) at - line 4.
1083 $[ used in numeric gt (>) (did you mean $] ?) at - line 5.
1084 $[ used in numeric le (<=) (did you mean $] ?) at - line 6.
1085 $[ used in numeric ge (>=) (did you mean $] ?) at - line 7.
1086 $[ used in numeric lt (<) (did you mean $] ?) at - line 8.
1087 $[ used in numeric gt (>) (did you mean $] ?) at - line 9.
1088 $[ used in numeric le (<=) (did you mean $] ?) at - line 10.
1089 $[ used in numeric ge (>=) (did you mean $] ?) at - line 11.
1090 $[ used in numeric lt (<) (did you mean $] ?) at - line 13.
1091 $[ used in numeric gt (>) (did you mean $] ?) at - line 14.
1092 $[ used in numeric le (<=) (did you mean $] ?) at - line 15.
1093 $[ used in numeric ge (>=) (did you mean $] ?) at - line 16.
1094 $[ used in numeric lt (<) (did you mean $] ?) at - line 17.
1095 $[ used in numeric gt (>) (did you mean $] ?) at - line 18.
1096 $[ used in numeric le (<=) (did you mean $] ?) at - line 19.
1097 $[ used in numeric ge (>=) (did you mean $] ?) at - line 20.
1099 # op.c [Perl_ck_length]
1100 use warnings 'syntax' ;
1109 length() used on @a (did you mean "scalar(@a)"?) at - line 3.
1110 length() used on %b (did you mean "scalar(keys %b)"?) at - line 4.
1111 length() used on @array (did you mean "scalar(@array)"?) at - line 5.
1112 length() used on %hash (did you mean "scalar(keys %hash)"?) at - line 6.
1113 length() used on %h (did you mean "scalar(keys %h)"?) at - line 8.
1114 length() used on @g (did you mean "scalar(@g)"?) at - line 9.
1117 use warnings 'syntax' ;
1118 join /---/, 'x', 'y', 'z';
1120 /---/ should probably be written as "---" at - line 3.
1124 use open qw( :utf8 :std );
1125 use warnings 'syntax' ;
1126 join /~~~/, 'x', 'y', 'z';
1128 /~~~/ should probably be written as "~~~" at - line 5.
1131 use warnings 'prototype' ;
1134 no warnings 'prototype' ;
1138 main::fred() called too early to check prototype at - line 3.
1140 # op.c [Perl_newATTRSUB]
1142 use warnings 'void' ;
1143 BEGIN { $| = 1; print "in begin\n"; }
1144 CHECK { print "in check\n"; }
1145 INIT { print "in init\n"; }
1146 END { print "in end\n"; }
1147 print "in mainline\n";
1151 delete $INC{"abc.pm"};
1160 Too late to run CHECK block at abc.pm line 3.
1161 Too late to run INIT block at abc.pm line 4.
1164 Too late to run CHECK block at abc.pm line 3.
1165 Too late to run INIT block at abc.pm line 4.
1171 # op.c [Perl_newATTRSUB]
1173 no warnings 'void' ;
1174 BEGIN { $| = 1; print "in begin\n"; }
1175 CHECK { print "in check\n"; }
1176 INIT { print "in init\n"; }
1177 END { print "in end\n"; }
1178 print "in mainline\n";
1193 use warnings 'syntax' ;
1196 no warnings 'syntax' ;
1200 Useless use of push with no values at - line 4.
1201 Useless use of unshift with no values at - line 5.
1204 # 20020401 mjd@plover.com at suggestion of jfriedl@yahoo.com
1205 use warnings 'regexp';
1206 split /blah/g, "blah";
1207 no warnings 'regexp';
1208 split /blah/g, "blah";
1210 Use of /g modifier is meaningless in split at - line 4.
1213 use warnings 'precedence';
1220 $a = $b <=> $c & $d;
1221 $a &= $b == $c; $a |= $b == $c; $a ^= $b == $c; # shouldn't warn
1222 no warnings 'precedence';
1229 $a = $b <=> $c & $d;
1231 Possible precedence problem on bitwise & operator at - line 3.
1232 Possible precedence problem on bitwise ^ operator at - line 4.
1233 Possible precedence problem on bitwise | operator at - line 5.
1234 Possible precedence problem on bitwise & operator at - line 6.
1235 Possible precedence problem on bitwise ^ operator at - line 7.
1236 Possible precedence problem on bitwise | operator at - line 8.
1237 Possible precedence problem on bitwise & operator at - line 9.
1241 use warnings 'precedence';
1248 $a = $b <=> $c & $d;
1249 no warnings 'precedence';
1256 $a = $b <=> $c & $d;
1258 Possible precedence problem on bitwise & operator at - line 4.
1259 Possible precedence problem on bitwise ^ operator at - line 5.
1260 Possible precedence problem on bitwise | operator at - line 6.
1261 Possible precedence problem on bitwise & operator at - line 7.
1262 Possible precedence problem on bitwise ^ operator at - line 8.
1263 Possible precedence problem on bitwise | operator at - line 9.
1264 Possible precedence problem on bitwise & operator at - line 10.
1268 # ok => local() has desired effect;
1269 # ignore=> local() silently ignored
1271 use warnings 'syntax';
1273 local(undef); # OP_UNDEF ignore
1274 sub lval : lvalue {};
1275 local(lval()); # OP_ENTERSUB
1276 local($x **= 1); # OP_POW
1277 local($x *= 1); # OP_MULTIPLY
1278 local($x /= 1); # OP_DIVIDE
1279 local($x %= 1); # OP_MODULO
1280 local($x x= 1); # OP_REPEAT
1281 local($x += 1); # OP_ADD
1282 local($x -= 1); # OP_SUBTRACT
1283 local($x .= 1); # OP_CONCAT
1284 local($x <<= 1); # OP_LEFT_SHIFT
1285 local($x >>= 1); # OP_RIGHT_SHIFT
1286 local($x &= 1); # OP_BIT_AND
1287 local($x ^= 1); # OP_BIT_XOR
1288 local($x |= 1); # OP_BIT_OR
1291 local($x *= 1); # OP_I_MULTIPLY
1292 local($x /= 1); # OP_I_DIVIDE
1293 local($x %= 1); # OP_I_MODULO
1294 local($x += 1); # OP_I_ADD
1295 local($x -= 1); # OP_I_SUBTRACT
1297 local($x?$y:$z) = 1; # OP_COND_EXPR ok
1298 # these two are fatal run-time errors instead
1299 #local(@$a); # OP_RV2AV ok
1300 #local(%$a); # OP_RV2HV ok
1301 local(*a); # OP_RV2GV ok
1302 local(@a[1,2]); # OP_ASLICE ok
1303 local(@a{1,2}); # OP_HSLICE ok
1304 local(@a = (1,2)); # OP_AASSIGN
1305 local($$x); # OP_RV2SV ok
1306 local($#a); # OP_AV2ARYLEN
1307 local($x = 1); # OP_SASSIGN
1308 local($x &&= 1); # OP_ANDASSIGN
1309 local($x ||= 1); # OP_ORASSIGN
1310 local($x //= 1); # OP_DORASSIGN
1311 local($a[0]); # OP_AELEMFAST ok
1313 local(substr($x,0,1)); # OP_SUBSTR
1314 local(pos($x)); # OP_POS
1315 local(vec($x,0,1)); # OP_VEC
1316 local($a[$b]); # OP_AELEM ok
1317 local($a{$b}); # OP_HELEM ok
1319 no warnings 'syntax';
1321 Useless localization of subroutine entry at - line 10.
1322 Useless localization of exponentiation (**) at - line 11.
1323 Useless localization of multiplication (*) at - line 12.
1324 Useless localization of division (/) at - line 13.
1325 Useless localization of modulus (%) at - line 14.
1326 Useless localization of repeat (x) at - line 15.
1327 Useless localization of addition (+) at - line 16.
1328 Useless localization of subtraction (-) at - line 17.
1329 Useless localization of concatenation (.) or string at - line 18.
1330 Useless localization of left bitshift (<<) at - line 19.
1331 Useless localization of right bitshift (>>) at - line 20.
1332 Useless localization of bitwise and (&) at - line 21.
1333 Useless localization of bitwise xor (^) at - line 22.
1334 Useless localization of bitwise or (|) at - line 23.
1335 Useless localization of integer multiplication (*) at - line 26.
1336 Useless localization of integer division (/) at - line 27.
1337 Useless localization of integer modulus (%) at - line 28.
1338 Useless localization of integer addition (+) at - line 29.
1339 Useless localization of integer subtraction (-) at - line 30.
1340 Useless localization of list assignment at - line 39.
1341 Useless localization of array length at - line 41.
1342 Useless localization of scalar assignment at - line 42.
1343 Useless localization of logical and assignment (&&=) at - line 43.
1344 Useless localization of logical or assignment (||=) at - line 44.
1345 Useless localization of defined or assignment (//=) at - line 45.
1346 Useless localization of substr at - line 48.
1347 Useless localization of match position at - line 49.
1348 Useless localization of vec at - line 50.
1355 my ($x5,@x6, %x7) if 0;
1358 # these shouldn't warn
1362 if (my $w2) { $a=1 }
1363 if ($a && (my $w3 = 1)) {$a = 2}
1366 Deprecated use of my() in false conditional at - line 2.
1367 Deprecated use of my() in false conditional at - line 3.
1368 Deprecated use of my() in false conditional at - line 4.
1369 Deprecated use of my() in false conditional at - line 5.
1370 Deprecated use of my() in false conditional at - line 6.
1371 Deprecated use of my() in false conditional at - line 7.
1372 Deprecated use of my() in false conditional at - line 8.
1377 use warnings 'deprecated';
1380 no warnings 'deprecated';
1384 Use of assignment to $[ is deprecated at - line 2.
1385 Use of assignment to $[ is deprecated at - line 3.
1386 Use of assignment to $[ is deprecated at - line 5.
1387 Use of assignment to $[ is deprecated at - line 6.
1390 use warnings 'void';
1391 @x = split /y/, "z";
1392 $x = split /y/, "z";
1395 @x = split /y/, "z";
1396 $x = split /y/, "z";
1399 Useless use of split in void context at - line 5.
1402 use warnings 'redefine' ;
1404 use open qw( :utf8 :std );
1407 no warnings 'redefine' ;
1410 Subroutine frèd redefined at - line 6.
1413 use warnings 'redefine' ;
1415 use open qw( :utf8 :std );
1418 no warnings 'redefine' ;
1421 Constant subroutine frèd redefined at - line 6.
1425 use open qw( :utf8 :std );
1429 Constant subroutine frèd redefined at - line 5.
1433 use open qw( :utf8 :std );
1435 *frèd = sub () { 2 };
1437 Constant subroutine main::frèd redefined at - line 5.
1440 use warnings 'redefine' ;
1442 use open qw( :utf8 :std );
1445 no warnings 'redefine' ;
1448 Subroutine ᚠርƊ redefined at - line 6.
1451 use warnings 'redefine' ;
1453 use open qw( :utf8 :std );
1456 no warnings 'redefine' ;
1459 Constant subroutine ᚠርƊ redefined at - line 6.
1463 use open qw( :utf8 :std );
1467 Constant subroutine ᚠርƊ redefined at - line 5.
1471 use open qw( :utf8 :std );
1473 *ᚠርƊ = sub () { 2 };
1475 Constant subroutine main::ᚠርƊ redefined at - line 5.