3 substr outside of string
4 $a = "ab" ; $b = substr($a, 4,5) ;
6 Attempt to use reference as lvalue in substr
7 $a = "ab" ; $b = \$a ; substr($b, 1,1) = $b
9 uninitialized in pp_rv2gv()
12 uninitialized in pp_rv2sv()
13 my $a = undef ; my $b = $$a
15 Odd number of elements in hash list
18 Invalid type in unpack: '%c
19 my $A = pack ("A,A", 1,2) ;
20 my @A = unpack ("A,A", "22") ;
22 Attempt to pack pointer to temporary value
25 Explicit blessing to '' (assuming package main)
28 Constant subroutine %s undefined <<<TODO
29 Constant subroutine (anonymous) undefined <<<TODO
33 use warnings 'substr' ;
35 $b = substr($a, 4,5) ;
36 no warnings 'substr' ;
38 $b = substr($a, 4,5) ;
40 substr outside of string at - line 4.
43 use warnings 'substr' ;
46 substr($b, 1,1) = "ab" ;
47 no warnings 'substr' ;
48 substr($b, 1,1) = "ab" ;
50 Attempt to use reference as lvalue in substr at - line 5.
53 use warnings 'uninitialized' ;
64 Odd number of elements in hash assignment at - line 3.
68 use warnings 'unpack' ;
69 my @a = unpack ("A,A", "22") ;
70 my $a = pack ("A,A", 1,2) ;
72 no warnings 'unpack' ;
73 my @b = unpack ("A,A", "22") ;
74 my $b = pack ("A,A", 1,2) ;
76 Invalid type in unpack: ',' at - line 4.
77 Invalid type in pack: ',' at - line 5.
80 use warnings 'uninitialized' ;
83 no warnings 'uninitialized' ;
86 Use of uninitialized value in scalar dereference at - line 4.
90 sub foo { my $a = "a"; return $a . $a++ . $a++ }
91 my $a = pack("p", &foo) ;
93 my $b = pack("p", &foo) ;
95 Attempt to pack pointer to temporary value at - line 4.
103 Explicit blessing to '' (assuming package main) at - line 3.
112 use warnings 'pack' ;
113 print unpack("C", pack("C", -1)), "\n";
114 print unpack("C", pack("C", 0)), "\n";
115 print unpack("C", pack("C", 255)), "\n";
116 print unpack("C", pack("C", 256)), "\n";
117 print unpack("c", pack("c", -129)), "\n";
118 print unpack("c", pack("c", -128)), "\n";
119 print unpack("c", pack("c", 127)), "\n";
120 print unpack("c", pack("c", 128)), "\n";
122 print unpack("C", pack("C", -1)), "\n";
123 print unpack("C", pack("C", 0)), "\n";
124 print unpack("C", pack("C", 255)), "\n";
125 print unpack("C", pack("C", 256)), "\n";
126 print unpack("c", pack("c", -129)), "\n";
127 print unpack("c", pack("c", -128)), "\n";
128 print unpack("c", pack("c", 127)), "\n";
129 print unpack("c", pack("c", 128)), "\n";
131 Character in "C" format wrapped at - line 3.
132 Character in "C" format wrapped at - line 6.
133 Character in "c" format wrapped at - line 7.
134 Character in "c" format wrapped at - line 10.