File: perl5004delta.html

package info (click to toggle)
perl-doc-html 5.26.0-4
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 39,400 kB
  • sloc: xml: 36; makefile: 7
file content (1653 lines) | stat: -rw-r--r-- 114,380 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
  <title>perl5004delta - perldoc.perl.org</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  <meta http-equiv="Content-Language" content="en-gb">
  <link rel="search" type="application/opensearchdescription+xml" title="Search perldoc.perl.org" href="/static/search.xml"/>
  <link href="static/css-20100830.css" rel="stylesheet" rev="stylesheet" type="text/css" media="screen">
  <link href="static/exploreperl.css" rel="stylesheet" rev="stylesheet" type="text/css">
</head>

<body onLoad="perldoc.startup();" onPageShow="if (event.persisted) perldoc.startup();">
    <div id="page">
      
      <div id="header">
	<div id="homepage_link">
	  <a href="index.html"></a>
	</div>
	<div id="strapline">
	  Perl Programming Documentation
	</div>
	<div id="download_link" class="download">
	  <a href="http://www.perl.org/get.html">Download Perl</a>
	</div>
	<div id="explore_link" class="download">
	  <a id="explore_anchor" href="#">Explore</a>
	</div>
      </div>
      
      <div id="body">
        <div id="left_column">
          <div class="side_group">
            
	    <div class="side_panel doc_panel">
              <p>Manual</p>
              <ul>
                <li><a href="index-overview.html">Overview</a>
                <li><a href="index-tutorials.html">Tutorials</a>
                <li><a href="index-faq.html">FAQs</a>
                <li><a href="index-history.html">History / Changes</a>
                <li><a href="index-licence.html">License</a>
              </ul>
            </div>
            <div class="side_panel doc_panel">
              <p>Reference</p>
              <ul>
                <li><a href="index-language.html">Language</a>
                <li><a href="index-functions.html">Functions</a>
                <li><a href="perlop.html">Operators</a>
                <li><a href="perlvar.html">Special Variables</a>
                <li><a href="index-pragmas.html">Pragmas</a>
                <li><a href="index-utilities.html">Utilities</a>
                <li><a href="index-internals.html">Internals</a>
                <li><a href="index-platforms.html">Platform Specific</a>
              </ul>
            </div>
            <div class="side_panel doc_panel">
              <p>Modules</p>
              <ul>
		<li>
		
                
                  
		    
		  
		
                  
		    
		  
		
                  
		    
		  
		
                  
		    
		  
		
                  
		    
		  
		
                  
		    
		  
		
                  
		    
		  
		
                  
		    
		  
		
                  
		    
		  
		
                  
		
                  
		
                  
		    
		  
		
                  
		    
		  
		
                  
		    
		  
		
                  
		    
		  
		
                  
		    
		  
		
                  
		
                  
		
                  
		    
		  
		
                  
		    
		  
		
                  
		    
		  
		
                  
		
                  
		
                  
		    
		  
		
                  
		
                  
		
		
                    <a href="index-modules-A.html">A</a>
                    
                      
                        &bull;
                      
                    
                
                    <a href="index-modules-B.html">B</a>
                    
                      
                        &bull;
                      
                    
                
                    <a href="index-modules-C.html">C</a>
                    
                      
                        &bull;
                      
                    
                
                    <a href="index-modules-D.html">D</a>
                    
                      
                        &bull;
                      
                    
                
                    <a href="index-modules-E.html">E</a>
                    
                      
                        <li>
                      
                    
                
                    <a href="index-modules-F.html">F</a>
                    
                      
                        &bull;
                      
                    
                
                    <a href="index-modules-G.html">G</a>
                    
                      
                        &bull;
                      
                    
                
                    <a href="index-modules-H.html">H</a>
                    
                      
                        &bull;
                      
                    
                
                    <a href="index-modules-I.html">I</a>
                    
                      
                        &bull;
                      
                    
                
                    <a href="index-modules-L.html">L</a>
                    
                      
                        <li>
                      
                    
                
                    <a href="index-modules-M.html">M</a>
                    
                      
                        &bull;
                      
                    
                
                    <a href="index-modules-N.html">N</a>
                    
                      
                        &bull;
                      
                    
                
                    <a href="index-modules-O.html">O</a>
                    
                      
                        &bull;
                      
                    
                
                    <a href="index-modules-P.html">P</a>
                    
                      
                        &bull;
                      
                    
                
                    <a href="index-modules-S.html">S</a>
                    
                      
                        <li>
                      
                    
                
                    <a href="index-modules-T.html">T</a>
                    
                      
                        &bull;
                      
                    
                
                    <a href="index-modules-U.html">U</a>
                    
                      
                        &bull;
                      
                    
                
                    <a href="index-modules-X.html">X</a>
                    
                
              </ul>
            </div>
            
	      <div class="side_panel doc_panel">
		<p>Tools</p>
		<ul>
		  <li><a href="preferences.html">Preferences</a>
		</ul>
	      </div>
            
          </div>
        </div>
        <div id="centre_column">
          <div id="content_header">
            <div id="title_bar">
              <div id="page_name">
                <h1>perl5004delta</h1>
              </div>
              <div id="perl_version">
                Perl 5 version 26.0 documentation
              </div>
              <div class="page_links" id="page_links_top">
                <a href="#" onClick="toolbar.goToTop();return false;">Go to top</a>
		
              </div>
	      <div class="page_links" id="page_links_bottom">
		
                  <a href="#" id="page_index_toggle">Show page index</a> &bull;
		
                <a href="#" id="recent_pages_toggle">Show recent pages</a>		
	      </div>
	      <div id="search_form">
		<form action="search.html" method="GET" id="search">
		  <input type="text" name="q" id="search_box" alt="Search">
		</form>
	      </div>
            </div>
            <div id="breadcrumbs">
                
    <a href="index.html">Home</a> &gt;
    
      
        <a href="index-history.html">History / Changes</a> &gt;
      
    
    perl5004delta
  

            </div>
          </div>
          <div id="content_body">
	    <!--[if lt IE 7]>
 <div class="noscript">
   <p>
     <strong>It looks like you're using Internet Explorer 6. This is a very old
     browser which does not offer full support for modern websites.</strong>
   </p>
   <p>
     Unfortunately this means that this website will not work on
     your computer.
   </p>
   <p>
     Don't miss out though! To view the site (and get a better experience from
     many other websites), simply upgrade to
     <a href="http://www.microsoft.com/windows/Internet-explorer/default.aspx">Internet
Explorer 8</a>
     or download an alternative browser such as
     <a href="http://www.mozilla.com/en-US/firefox/firefox.html">Firefox</a>,
     <a href="http://www.apple.com/safari/download/">Safari</a>, or
     <a href="http://www.google.co.uk/chrome">Google Chrome</a>.
   </p>
   <p>
     All of these browsers are free. If you're using a PC at work, you may
     need to contact your IT administrator.
   </p>
 </div>
<![endif]-->
	    <noscript>
	      <div class="noscript">
	      <p>
                <strong>Please note: Many features of this site require JavaScript. You appear to have JavaScript disabled,
	        or are running a non-JavaScript capable web browser.</strong>
	      </p>
	      <p>
		To get the best experience, please enable JavaScript or download a modern web browser such as <a href="http://www.microsoft.com/windows/Internet-explorer/default.aspx">Internet Explorer 8</a>, <a href="http://www.mozilla.com/en-US/firefox/firefox.html">Firefox</a>, <a href="http://www.apple.com/safari/download/">Safari</a>, or <a href="http://www.google.co.uk/chrome">Google Chrome</a>.
              </p>
	      </div>
	    </noscript>

	    <div id="recent_pages" class="hud_container">
	      <div id="recent_pages_header" class="hud_header">
		<div id="recent_pages_close" class="hud_close"><a href="#" onClick="recentPages.hide();return false;"></a></div>
		<div id="recent_pages_title" class="hud_title"><span class="hud_span_top">Recently read</span></div>
		<div id="recent_pages_topright" class="hud_topright"></div>
	      </div>
	      <div id="recent_pages_content" class="hud_content">
	      </div>
	      <div id="recent_pages_footer" class="hud_footer">
		<div id="recent_pages_bottomleft" class="hud_bottomleft"></div>
		<div id="recent_pages_bottom" class="hud_bottom"><span class="hud_span_bottom"></span></div>
		<div id="recent_pages_resize" class="hud_resize"></div>
	      </div>
	    </div>
  
	    <div id="from_search"></div>
            <h1>perl5004delta</h1>


  <!--    -->
<ul><li><a href="#NAME">NAME</a><li><a href="#DESCRIPTION">DESCRIPTION</a><li><a href="#Supported-Environments">Supported Environments</a><li><a href="#Core-Changes">Core Changes</a><ul><li><a href="#List-assignment-to-%25ENV-works">List assignment to %ENV works</a><li><a href="#Change-to-%22Can't-locate-Foo.pm-in-%40INC%22-error">Change to "Can't locate Foo.pm in @INC" error</a><li><a href="#Compilation-option%3a-Binary-compatibility-with-5.003">Compilation option: Binary compatibility with 5.003</a><li><a href="#%24PERL5OPT-environment-variable">$PERL5OPT environment variable</a><li><a href="#Limitations-on-*-M*%2c-*-m*%2c-and-*-T*-options">Limitations on *-M*, *-m*, and *-T* options</a><li><a href="#More-precise-warnings">More precise warnings</a><li><a href="#Deprecated%3a-Inherited-AUTOLOAD-for-non-methods">Deprecated: Inherited AUTOLOAD for non-methods</a><li><a href="#Previously-deprecated-%25OVERLOAD-is-no-longer-usable">Previously deprecated %OVERLOAD is no longer usable</a><li><a href="#Subroutine-arguments-created-only-when-they're-modified">Subroutine arguments created only when they're modified</a><li><a href="#Group-vector-changeable-with-%24)">Group vector changeable with $)</a><li><a href="#Fixed-parsing-of-%24%24%3cdigit%3e%2c-%26%24%3cdigit%3e%2c-etc.">Fixed parsing of $$<digit>, &$<digit>, etc.</a><li><a href="#Fixed-localization-of-%24%3cdigit%3e%2c-%24%26%2c-etc.">Fixed localization of $<digit>, $&, etc.</a><li><a href="#No-resetting-of-%24.-on-implicit-close">No resetting of $. on implicit close</a><li><a href="#wantarray-may-return-undef">wantarray may return undef</a><li><a href="#eval-EXPR-determines-value-of-EXPR-in-scalar-context">eval EXPR determines value of EXPR in scalar context</a><li><a href="#Changes-to-tainting-checks">Changes to tainting checks</a><li><a href="#New-Opcode-module-and-revised-Safe-module">New Opcode module and revised Safe module</a><li><a href="#Embedding-improvements">Embedding improvements</a><li><a href="#Internal-change%3a-FileHandle-class-based-on-IO%3a%3a*-classes">Internal change: FileHandle class based on IO::* classes</a><li><a href="#Internal-change%3a-PerlIO-abstraction-interface">Internal change: PerlIO abstraction interface</a><li><a href="#New-and-changed-syntax">New and changed syntax</a><li><a href="#New-and-changed-builtin-constants">New and changed builtin constants</a><li><a href="#New-and-changed-builtin-variables">New and changed builtin variables</a><li><a href="#New-and-changed-builtin-functions">New and changed builtin functions</a><li><a href="#New-builtin-methods">New builtin methods</a><li><a href="#TIEHANDLE-now-supported">TIEHANDLE now supported</a><li><a href="#Malloc-enhancements">Malloc enhancements</a><li><a href="#Miscellaneous-efficiency-enhancements">Miscellaneous efficiency enhancements</a></ul><li><a href="#Support-for-More-Operating-Systems">Support for More Operating Systems</a><ul><li><a href="#Win32">Win32</a><li><a href="#Plan-9">Plan 9</a><li><a href="#QNX">QNX</a><li><a href="#AmigaOS">AmigaOS</a></ul><li><a href="#Pragmata">Pragmata</a><li><a href="#Modules">Modules</a><ul><li><a href="#Required-Updates">Required Updates</a><li><a href="#Installation-directories">Installation directories</a><li><a href="#Module-information-summary">Module information summary</a><li><a href="#Fcntl">Fcntl</a><li><a href="#IO">IO</a><li><a href="#Math%3a%3aComplex">Math::Complex</a><li><a href="#Math%3a%3aTrig">Math::Trig</a><li><a href="#DB_File">DB_File</a><li><a href="#Net%3a%3aPing">Net::Ping</a><li><a href="#Object-oriented-overrides-for-builtin-operators">Object-oriented overrides for builtin operators</a></ul><li><a href="#Utility-Changes">Utility Changes</a><ul><li><a href="#pod2html">pod2html</a><li><a href="#xsubpp">xsubpp</a></ul><li><a href="#C-Language-API-Changes">C Language API Changes</a><li><a href="#Documentation-Changes">Documentation Changes</a><li><a href="#New-Diagnostics">New Diagnostics</a><li><a href="#BUGS">BUGS</a><li><a href="#SEE-ALSO">SEE ALSO</a><li><a href="#HISTORY">HISTORY</a></ul><a name="NAME"></a><h1>NAME</h1>
<p>perl5004delta - what's new for perl5.004</p>
<a name="DESCRIPTION"></a><h1>DESCRIPTION</h1>
<p>This document describes differences between the 5.003 release (as
documented in <i>Programming Perl</i>, second edition--the Camel Book) and
this one.</p>
<a name="Supported-Environments"></a><h1>Supported Environments</h1>
<p>Perl5.004 builds out of the box on Unix, Plan 9, LynxOS, VMS, OS/2,
QNX, AmigaOS, and Windows NT.  Perl runs on Windows 95 as well, but it
cannot be built there, for lack of a reasonable command interpreter.</p>
<a name="Core-Changes"></a><h1>Core Changes</h1>
<p>Most importantly, many bugs were fixed, including several security
problems.  See the <i>Changes</i> file in the distribution for details.</p>
<a name="List-assignment-to-%25ENV-works"></a><h2>List assignment to %ENV works</h2>
<p><code class="inline"><span class="i">%ENV</span> = <span class="s">(</span><span class="s">)</span></code>
 and <code class="inline"><span class="i">%ENV</span> = <span class="i">@list</span></code>
 now work as expected (except on VMS
where it generates a fatal error).</p>
<a name="Change-to-%22Can't-locate-Foo.pm-in-%40INC%22-error"></a><h2>Change to "Can't locate Foo.pm in @INC" error</h2>
<p>The error "Can't locate Foo.pm in @INC" now lists the contents of @INC
for easier debugging.</p>
<a name="Compilation-option%3a-Binary-compatibility-with-5.003"></a><h2>Compilation option: Binary compatibility with 5.003</h2>
<p>There is a new Configure question that asks if you want to maintain
binary compatibility with Perl 5.003.  If you choose binary
compatibility, you do not have to recompile your extensions, but you
might have symbol conflicts if you embed Perl in another application,
just as in the 5.003 release.  By default, binary compatibility
is preserved at the expense of symbol table pollution.</p>
<a name="%24PERL5OPT-environment-variable"></a><h2>$PERL5OPT environment variable</h2>
<p>You may now put Perl options in the $PERL5OPT environment variable.
Unless Perl is running with taint checks, it will interpret this
variable as if its contents had appeared on a "#!perl" line at the
beginning of your script, except that hyphens are optional.  PERL5OPT
may only be used to set the following switches: <b>-[DIMUdmw]</b>.</p>
<a name="Limitations-on-*-M*%2c-*-m*%2c-and-*-T*-options"></a><h2>Limitations on <b>-M</b>, <b>-m</b>, and <b>-T</b> options</h2>
<p>The <code class="inline">-M</code>
 and <code class="inline">-m</code> options are no longer allowed on the <code class="inline"><span class="c">#!</span></code>
 line of
a script.  If a script needs a module, it should invoke it with the
<code class="inline"><a class="l_k" href="functions/use.html">use</a></code> pragma.</p>
<p>The <b>-T</b> option is also forbidden on the <code class="inline"><span class="c">#!</span></code>
 line of a script,
unless it was present on the Perl command line.  Due to the way <code class="inline"><span class="c">#!</span></code>

works, this usually means that <b>-T</b> must be in the first argument.
Thus:</p>
<pre class="verbatim"><ol><li>    <span class="c">#!/usr/bin/perl -T -w</span></li></ol></pre><p>will probably work for an executable script invoked as <code class="inline"><span class="w">scriptname</span></code>
,
while:</p>
<pre class="verbatim"><ol><li>    <span class="c">#!/usr/bin/perl -w -T</span></li></ol></pre><p>will probably fail under the same conditions.  (Non-Unix systems will
probably not follow this rule.)  But <code class="inline"><span class="w">perl</span> <span class="w">scriptname</span></code>
 is guaranteed
to fail, since then there is no chance of <b>-T</b> being found on the
command line before it is found on the <code class="inline"><span class="c">#!</span></code>
 line.</p>
<a name="More-precise-warnings"></a><h2>More precise warnings</h2>
<p>If you removed the <b>-w</b> option from your Perl 5.003 scripts because it
made Perl too verbose, we recommend that you try putting it back when
you upgrade to Perl 5.004.  Each new perl version tends to remove some
undesirable warnings, while adding new warnings that may catch bugs in
your scripts.</p>
<a name="Deprecated%3a-Inherited-AUTOLOAD-for-non-methods"></a><h2>Deprecated: Inherited <code class="inline">AUTOLOAD</code>
 for non-methods</h2>
<p>Before Perl 5.004, <code class="inline">AUTOLOAD</code>
 functions were looked up as methods
(using the <code class="inline"><span class="i">@ISA</span></code>
 hierarchy), even when the function to be autoloaded
was called as a plain function (e.g. <code class="inline"><span class="i">Foo::bar</span><span class="s">(</span><span class="s">)</span></code>
), not a method
(e.g. <code class="inline"><span class="w">Foo</span><span class="w">-&gt;bar</span><span class="s">(</span><span class="s">)</span></code>
 or <code class="inline"><span class="i">$obj</span><span class="i">-&gt;bar</span><span class="s">(</span><span class="s">)</span></code>
).</p>
<p>Perl 5.005 will use method lookup only for methods' <code class="inline">AUTOLOAD</code>
s.
However, there is a significant base of existing code that may be using
the old behavior.  So, as an interim step, Perl 5.004 issues an optional
warning when a non-method uses an inherited <code class="inline">AUTOLOAD</code>
.</p>
<p>The simple rule is:  Inheritance will not work when autoloading
non-methods.  The simple fix for old code is:  In any module that used to
depend on inheriting <code class="inline">AUTOLOAD</code>
 for non-methods from a base class named
<code class="inline"><span class="w">BaseClass</span></code>
, execute <code class="inline"><span class="i">*AUTOLOAD</span> = \<span class="i">&amp;BaseClass::AUTOLOAD</span></code>
 during startup.</p>
<a name="Previously-deprecated-%25OVERLOAD-is-no-longer-usable"></a><h2>Previously deprecated %OVERLOAD is no longer usable</h2>
<p>Using %OVERLOAD to define overloading was deprecated in 5.003.
Overloading is now defined using the overload pragma. %OVERLOAD is
still used internally but should not be used by Perl scripts. See
<a href="overload.html">overload</a> for more details.</p>
<a name="Subroutine-arguments-created-only-when-they're-modified"></a><h2>Subroutine arguments created only when they're modified</h2>
<p>In Perl 5.004, nonexistent array and hash elements used as subroutine
parameters are brought into existence only if they are actually
assigned to (via <code class="inline"><span class="i">@_</span></code>
).</p>
<p>Earlier versions of Perl vary in their handling of such arguments.
Perl versions 5.002 and 5.003 always brought them into existence.
Perl versions 5.000 and 5.001 brought them into existence only if
they were not the first argument (which was almost certainly a bug).
Earlier versions of Perl never brought them into existence.</p>
<p>For example, given this code:</p>
<pre class="verbatim"><ol><li>     <a class="l_k" href="functions/undef.html">undef</a> <span class="i">@a</span><span class="sc">;</span> <a class="l_k" href="functions/undef.html">undef</a> <span class="i">%a</span><span class="sc">;</span></li><li><a name="show"></a>     sub <span class="m">show</span> <span class="s">{</span> <a class="l_k" href="functions/print.html">print</a> <span class="i">$_</span>[<span class="n">0</span>] <span class="s">}</span><span class="sc">;</span></li><li><a name="change"></a>     sub <span class="m">change</span> <span class="s">{</span> <span class="i">$_</span>[<span class="n">0</span>]++ <span class="s">}</span><span class="sc">;</span></li><li>     <span class="i">show</span><span class="s">(</span><span class="i">$a</span>[<span class="n">2</span>]<span class="s">)</span><span class="sc">;</span></li><li>     <span class="i">change</span><span class="s">(</span><span class="i">$a</span>{<span class="w">b</span>}<span class="s">)</span><span class="sc">;</span></li></ol></pre><p>After this code executes in Perl 5.004, $a{b} exists but $a[2] does
not.  In Perl 5.002 and 5.003, both $a{b} and $a[2] would have existed
(but $a[2]'s value would have been undefined).</p>
<a name="Group-vector-changeable-with-%24)"></a><h2>Group vector changeable with <code class="inline"><span class="i">$)</span></code>
</h2>
<p>The <code class="inline"><span class="i">$)</span></code>
 special variable has always (well, in Perl 5, at least)
reflected not only the current effective group, but also the group list
as returned by the <code class="inline"><span class="i">getgroups</span><span class="s">(</span><span class="s">)</span></code>
 C function (if there is one).
However, until this release, there has not been a way to call the
<code class="inline"><span class="i">setgroups</span><span class="s">(</span><span class="s">)</span></code>
 C function from Perl.</p>
<p>In Perl 5.004, assigning to <code class="inline"><span class="i">$)</span></code>
 is exactly symmetrical with examining
it: The first number in its string value is used as the effective gid;
if there are any numbers after the first one, they are passed to the
<code class="inline"><span class="i">setgroups</span><span class="s">(</span><span class="s">)</span></code>
 C function (if there is one).</p>
<a name="Fixed-parsing-of-%24%24%3cdigit%3e%2c-%26%24%3cdigit%3e%2c-etc."></a><h2>Fixed parsing of $$&lt;digit&gt;, &amp;$&lt;digit&gt;, etc.</h2>
<p>Perl versions before 5.004 misinterpreted any type marker followed by
"$" and a digit.  For example, "$$0" was incorrectly taken to mean
"${$}0" instead of "${$0}".  This bug is (mostly) fixed in Perl 5.004.</p>
<p>However, the developers of Perl 5.004 could not fix this bug completely,
because at least two widely-used modules depend on the old meaning of
"$$0" in a string.  So Perl 5.004 still interprets "$$&lt;digit&gt;" in the
old (broken) way inside strings; but it generates this message as a
warning.  And in Perl 5.005, this special treatment will cease.</p>
<a name="Fixed-localization-of-%24%3cdigit%3e%2c-%24%26%2c-etc."></a><h2>Fixed localization of $&lt;digit&gt;, $&amp;, etc.</h2>
<p>Perl versions before 5.004 did not always properly localize the
regex-related special variables.  Perl 5.004 does localize them, as
the documentation has always said it should.  This may result in $1,
$2, etc. no longer being set where existing programs use them.</p>
<a name="No-resetting-of-%24.-on-implicit-close"></a><h2>No resetting of $. on implicit close</h2>
<p>The documentation for Perl 5.0 has always stated that <code class="inline"><span class="i">$.</span></code>
 is <i>not</i>
reset when an already-open file handle is reopened with no intervening
call to <code class="inline"><a class="l_k" href="functions/close.html">close</a></code>.  Due to a bug, perl versions 5.000 through 5.003
<i>did</i> reset <code class="inline"><span class="i">$.</span></code>
 under that circumstance; Perl 5.004 does not.</p>
<a name="wantarray-may-return-undef"></a><h2><code class="inline"><a class="l_k" href="functions/wantarray.html">wantarray</a></code> may return undef</h2>
<p>The <code class="inline"><a class="l_k" href="functions/wantarray.html">wantarray</a></code> operator returns true if a subroutine is expected to
return a list, and false otherwise.  In Perl 5.004, <code class="inline"><a class="l_k" href="functions/wantarray.html">wantarray</a></code> can
also return the undefined value if a subroutine's return value will
not be used at all, which allows subroutines to avoid a time-consuming
calculation of a return value if it isn't going to be used.</p>
<a name="eval-EXPR-determines-value-of-EXPR-in-scalar-context"></a><h2><code class="inline"><a class="l_k" href="functions/eval.html">eval</a> <span class="w">EXPR</span></code>
 determines value of EXPR in scalar context</h2>
<p>Perl (version 5) used to determine the value of EXPR inconsistently,
sometimes incorrectly using the surrounding context for the determination.
Now, the value of EXPR (before being parsed by eval) is always determined in
a scalar context.  Once parsed, it is executed as before, by providing
the context that the scope surrounding the eval provided.  This change
makes the behavior Perl4 compatible, besides fixing bugs resulting from
the inconsistent behavior.  This program:</p>
<pre class="verbatim"><ol><li>    <span class="i">@a</span> = <span class="q">qw(time now is time)</span><span class="sc">;</span></li><li>    <a class="l_k" href="functions/print.html">print</a> <a class="l_k" href="functions/eval.html">eval</a> <span class="i">@a</span><span class="sc">;</span></li><li>    <a class="l_k" href="functions/print.html">print</a> <span class="q">&#39;|&#39;</span><span class="cm">,</span> <a class="l_k" href="functions/scalar.html">scalar</a> <a class="l_k" href="functions/eval.html">eval</a> <span class="i">@a</span><span class="sc">;</span></li></ol></pre><p>used to print something like "timenowis881399109|4", but now (and in perl4)
prints "4|4".</p>
<a name="Changes-to-tainting-checks"></a><h2>Changes to tainting checks</h2>
<p>A bug in previous versions may have failed to detect some insecure
conditions when taint checks are turned on.  (Taint checks are used
in setuid or setgid scripts, or when explicitly turned on with the
<code class="inline">-T</code>
 invocation option.)  Although it's unlikely, this may cause a
previously-working script to now fail, which should be construed
as a blessing since that indicates a potentially-serious security
hole was just plugged.</p>
<p>The new restrictions when tainting include:</p>
<ul>
<li><a name="No-glob()-or-%3c*%3e"></a><b>No glob() or &lt;*&gt;</b>
<p>These operators may spawn the C shell (csh), which cannot be made
safe.  This restriction will be lifted in a future version of Perl
when globbing is implemented without the use of an external program.</p>
</li>
<li><a name="No-spawning-if-tainted-%24CDPATH%2c-%24ENV%2c-%24BASH_ENV"></a><b>No spawning if tainted $CDPATH, $ENV, $BASH_ENV</b>
<p>These environment variables may alter the behavior of spawned programs
(especially shells) in ways that subvert security.  So now they are
treated as dangerous, in the manner of $IFS and $PATH.</p>
</li>
<li><a name="No-spawning-if-tainted-%24TERM-doesn't-look-like-a-terminal-name"></a><b>No spawning if tainted $TERM doesn't look like a terminal name</b>
<p>Some termcap libraries do unsafe things with $TERM.  However, it would be
unnecessarily harsh to treat all $TERM values as unsafe, since only shell
metacharacters can cause trouble in $TERM.  So a tainted $TERM is
considered to be safe if it contains only alphanumerics, underscores,
dashes, and colons, and unsafe if it contains other characters (including
whitespace).</p>
</li>
</ul>
<a name="New-Opcode-module-and-revised-Safe-module"></a><h2>New Opcode module and revised Safe module</h2>
<p>A new Opcode module supports the creation, manipulation and
application of opcode masks.  The revised Safe module has a new API
and is implemented using the new Opcode module.  Please read the new
Opcode and Safe documentation.</p>
<a name="Embedding-improvements"></a><h2>Embedding improvements</h2>
<p>In older versions of Perl it was not possible to create more than one
Perl interpreter instance inside a single process without leaking like a
sieve and/or crashing.  The bugs that caused this behavior have all been
fixed.  However, you still must take care when embedding Perl in a C
program.  See the updated perlembed manpage for tips on how to manage
your interpreters.</p>
<a name="Internal-change%3a-FileHandle-class-based-on-IO%3a%3a*-classes"></a><h2>Internal change: FileHandle class based on IO::* classes</h2>
<p>File handles are now stored internally as type IO::Handle.  The
FileHandle module is still supported for backwards compatibility, but
it is now merely a front end to the IO::* modules, specifically
IO::Handle, IO::Seekable, and IO::File.  We suggest, but do not
require, that you use the IO::* modules in new code.</p>
<p>In harmony with this change, <code class="inline"><span class="i">*GLOB</span>{<span class="w">FILEHANDLE</span>}</code>
 is now just a
backward-compatible synonym for <code class="inline"><span class="i">*GLOB</span>{<span class="w">IO</span>}</code>
.</p>
<a name="Internal-change%3a-PerlIO-abstraction-interface"></a><h2>Internal change: PerlIO abstraction interface</h2>
<p>It is now possible to build Perl with AT&amp;T's sfio IO package
instead of stdio.  See <a href="perlapio.html">perlapio</a> for more details, and
the <i>INSTALL</i> file for how to use it.</p>
<a name="New-and-changed-syntax"></a><h2>New and changed syntax</h2>
<ul>
<li><a name="%24coderef-%3e(PARAMS)"></a><b>$coderef-&gt;(PARAMS)</b>
<p>A subroutine reference may now be suffixed with an arrow and a
(possibly empty) parameter list.  This syntax denotes a call of the
referenced subroutine, with the given parameters (if any).</p>
<p>This new syntax follows the pattern of <code class="inline"><span class="i">$hashref</span>-&gt;{<span class="w">FOO</span>}</code>
 and
<code class="inline"><span class="i">$aryref</span>-&gt;[<span class="i">$foo</span>]</code>
: You may now write <code class="inline"><span class="i">&amp;$subref</span><span class="s">(</span><span class="i">$foo</span><span class="s">)</span></code>
 as
<code class="inline"><span class="i">$subref</span>-&gt;<span class="s">(</span><span class="i">$foo</span><span class="s">)</span></code>
.  All these arrow terms may be chained;
thus, <code class="inline"><span class="i">&amp;</span>{<span class="i">$table</span>-&gt;{<span class="w">FOO</span>}}<span class="s">(</span><span class="i">$bar</span><span class="s">)</span></code>
 may now be written
<code class="inline"><span class="i">$table</span>-&gt;{<span class="w">FOO</span>}-&gt;<span class="s">(</span><span class="i">$bar</span><span class="s">)</span></code>
.</p>
</li>
</ul>
<a name="New-and-changed-builtin-constants"></a><h2>New and changed builtin constants</h2>
<ul>
<li><a name="__PACKAGE__"></a><b>__PACKAGE__</b>
<p>The current package name at compile time, or the undefined value if
there is no current package (due to a <code class="inline"><a class="l_k" href="functions/package.html">package;</a></code> directive).  Like
<code class="inline"><span class="w">__FILE__</span></code>
 and <code class="inline"><span class="w">__LINE__</span></code>
, <code class="inline"><span class="w">__PACKAGE__</span></code>
 does <i>not</i> interpolate
into strings.</p>
</li>
</ul>
<a name="New-and-changed-builtin-variables"></a><h2>New and changed builtin variables</h2>
<ul>
<li><a name="%24%5eE"></a><b>$^E</b>
<p>Extended error message on some platforms.  (Also known as
$EXTENDED_OS_ERROR if you <code class="inline"><a class="l_k" href="functions/use.html">use</a> <span class="w">English</span></code>
).</p>
</li>
<li><a name="%24%5eH"></a><b>$^H</b>
<p>The current set of syntax checks enabled by <code class="inline"><a class="l_k" href="functions/use.html">use</a> <span class="w">strict</span></code>
.  See the
documentation of <code class="inline"><span class="w">strict</span></code>
 for more details.  Not actually new, but
newly documented.
Because it is intended for internal use by Perl core components,
there is no <code class="inline"><a class="l_k" href="functions/use.html">use</a> <span class="w">English</span></code>
 long name for this variable.</p>
</li>
<li><a name="%24%5eM"></a><b>$^M</b>
<p>By default, running out of memory it is not trappable.  However, if
compiled for this, Perl may use the contents of <code class="inline"><span class="i">$^M</span></code>
 as an emergency
pool after die()ing with this message.  Suppose that your Perl were
compiled with -DPERL_EMERGENCY_SBRK and used Perl's malloc.  Then</p>
<pre class="verbatim"><ol><li>    <span class="i">$^M</span> = <span class="q">&#39;a&#39;</span> x <span class="s">(</span><span class="n">1</span>&lt;&lt;<span class="n">16</span><span class="s">)</span><span class="sc">;</span></li></ol></pre><p>would allocate a 64K buffer for use when in emergency.
See the <i>INSTALL</i> file for information on how to enable this option.
As a disincentive to casual use of this advanced feature,
there is no <code class="inline"><a class="l_k" href="functions/use.html">use</a> <span class="w">English</span></code>
 long name for this variable.</p>
</li>
</ul>
<a name="New-and-changed-builtin-functions"></a><h2>New and changed builtin functions</h2>
<ul>
<li><a name="delete-on-slices"></a><b>delete on slices</b>
<p>This now works.  (e.g. <code class="inline"><a class="l_k" href="functions/delete.html">delete</a> <span class="i">@ENV</span>{<span class="q">&#39;PATH&#39;</span><span class="cm">,</span> <span class="q">&#39;MANPATH&#39;</span>}</code>
)</p>
</li>
<li><a name="flock"></a><b>flock</b>
<p>is now supported on more platforms, prefers fcntl to lockf when
emulating, and always flushes before (un)locking.</p>
</li>
<li><a name="printf-and-sprintf"></a><b>printf and sprintf</b>
<p>Perl now implements these functions itself; it doesn't use the C
library function sprintf() any more, except for floating-point
numbers, and even then only known flags are allowed.  As a result, it
is now possible to know which conversions and flags will work, and
what they will do.</p>
<p>The new conversions in Perl's sprintf() are:</p>
<pre class="verbatim"><ol><li>   %i	a synonym for %d</li><li>   %p	a pointer (the address of the Perl value, in hexadecimal)</li><li>   %n	special: *stores* the number of characters output so far</li><li>        into the next variable in the parameter list</li></ol></pre><p>The new flags that go between the <code class="inline"><span class="i">%</span></code>
 and the conversion are:</p>
<pre class="verbatim"><ol><li>   #	prefix octal with "0", hex with "0x"</li><li>   h	interpret integer as C type "short" or "unsigned short"</li><li>   V	interpret integer as Perl's standard integer type</li></ol></pre><p>Also, where a number would appear in the flags, an asterisk ("*") may
be used instead, in which case Perl uses the next item in the
parameter list as the given number (that is, as the field width or
precision).  If a field width obtained through "*" is negative, it has
the same effect as the '-' flag: left-justification.</p>
<p>See <a href="functions/sprintf.html">sprintf</a> for a complete list of conversion and flags.</p>
</li>
<li><a name="keys-as-an-lvalue"></a><b>keys as an lvalue</b>
<p>As an lvalue, <code class="inline"><a class="l_k" href="functions/keys.html">keys</a></code> allows you to increase the number of hash buckets
allocated for the given hash.  This can gain you a measure of efficiency if
you know the hash is going to get big.  (This is similar to pre-extending
an array by assigning a larger number to $#array.)  If you say</p>
<pre class="verbatim"><ol><li>    <a class="l_k" href="functions/keys.html">keys</a> <span class="i">%hash</span> = <span class="n">200</span><span class="sc">;</span></li></ol></pre><p>then <code class="inline"><span class="i">%hash</span></code>
 will have at least 200 buckets allocated for it.  These
buckets will be retained even if you do <code class="inline"><span class="i">%hash</span> = <span class="s">(</span><span class="s">)</span></code>
; use <code class="inline"><a class="l_k" href="functions/undef.html">undef</a>
<span class="i">%hash</span></code>
 if you want to free the storage while <code class="inline"><span class="i">%hash</span></code>
 is still in scope.
You can't shrink the number of buckets allocated for the hash using
<code class="inline"><a class="l_k" href="functions/keys.html">keys</a></code> in this way (but you needn't worry about doing this by accident,
as trying has no effect).</p>
</li>
<li><a name="my()-in-Control-Structures"></a><b>my() in Control Structures</b>
<p>You can now use my() (with or without the parentheses) in the control
expressions of control structures such as:</p>
<pre class="verbatim"><ol><li>    while <span class="s">(</span><a class="l_k" href="functions/defined.html">defined</a><span class="s">(</span><a class="l_k" href="functions/my.html">my</a> <span class="i">$line</span> = &lt;&gt;<span class="s">)</span><span class="s">)</span> <span class="s">{</span></li><li>        <span class="i">$line</span> = <a class="l_k" href="functions/lc.html">lc</a> <span class="i">$line</span><span class="sc">;</span></li><li>    <span class="s">}</span> <a class="l_k" href="functions/continue.html">continue</a> <span class="s">{</span></li><li>        <a class="l_k" href="functions/print.html">print</a> <span class="i">$line</span><span class="sc">;</span></li><li>    <span class="s">}</span></li><li></li><li>    if <span class="s">(</span><span class="s">(</span><a class="l_k" href="functions/my.html">my</a> <span class="i">$answer</span> = <span class="q">&lt;STDIN&gt;</span><span class="s">)</span> =~ <span class="q">/^y(es)?$/i</span><span class="s">)</span> <span class="s">{</span></li><li>        <span class="i">user_agrees</span><span class="s">(</span><span class="s">)</span><span class="sc">;</span></li><li>    <span class="s">}</span> elsif <span class="s">(</span><span class="i">$answer</span> =~ <span class="q">/^n(o)?$/i</span><span class="s">)</span> <span class="s">{</span></li><li>        <span class="i">user_disagrees</span><span class="s">(</span><span class="s">)</span><span class="sc">;</span></li><li>    <span class="s">}</span> else <span class="s">{</span></li><li>        <a class="l_k" href="functions/chomp.html">chomp</a> <span class="i">$answer</span><span class="sc">;</span></li><li>        <a class="l_k" href="functions/die.html">die</a> <span class="q">&quot;`$answer&#39; is neither `yes&#39; nor `no&#39;&quot;</span><span class="sc">;</span></li><li>    <span class="s">}</span></li></ol></pre><p>Also, you can declare a foreach loop control variable as lexical by
preceding it with the word "my".  For example, in:</p>
<pre class="verbatim"><ol><li>    foreach <a class="l_k" href="functions/my.html">my</a> <span class="i">$i</span> <span class="s">(</span><span class="n">1</span><span class="cm">,</span> <span class="n">2</span><span class="cm">,</span> <span class="n">3</span><span class="s">)</span> <span class="s">{</span></li><li>        <span class="i">some_function</span><span class="s">(</span><span class="s">)</span><span class="sc">;</span></li><li>    <span class="s">}</span></li></ol></pre><p>$i is a lexical variable, and the scope of $i extends to the end of
the loop, but not beyond it.</p>
<p>Note that you still cannot use my() on global punctuation variables
such as $_ and the like.</p>
</li>
<li><a name="pack()-and-unpack()"></a><b>pack() and unpack()</b>
<p>A new format 'w' represents a BER compressed integer (as defined in
ASN.1).  Its format is a sequence of one or more bytes, each of which
provides seven bits of the total value, with the most significant
first.  Bit eight of each byte is set, except for the last byte, in
which bit eight is clear.</p>
<p>If 'p' or 'P' are given undef as values, they now generate a NULL
pointer.</p>
<p>Both pack() and unpack() now fail when their templates contain invalid
types.  (Invalid types used to be ignored.)</p>
</li>
<li><a name="sysseek()"></a><b>sysseek()</b>
<p>The new sysseek() operator is a variant of seek() that sets and gets the
file's system read/write position, using the lseek(2) system call.  It is
the only reliable way to seek before using sysread() or syswrite().  Its
return value is the new position, or the undefined value on failure.</p>
</li>
<li><a name="use-VERSION"></a><b>use VERSION</b>
<p>If the first argument to <code class="inline"><a class="l_k" href="functions/use.html">use</a></code> is a number, it is treated as a version
number instead of a module name.  If the version of the Perl interpreter
is less than VERSION, then an error message is printed and Perl exits
immediately.  Because <code class="inline"><a class="l_k" href="functions/use.html">use</a></code> occurs at compile time, this check happens
immediately during the compilation process, unlike <code class="inline"><a class="l_k" href="functions/require.html">require</a> <span class="w">VERSION</span></code>
,
which waits until runtime for the check.  This is often useful if you
need to check the current Perl version before <code class="inline"><a class="l_k" href="functions/use.html">use</a></code>ing library modules
which have changed in incompatible ways from older versions of Perl.
(We try not to do this more than we have to.)</p>
</li>
<li><a name="use-Module-VERSION-LIST"></a><b>use Module VERSION LIST</b>
<p>If the VERSION argument is present between Module and LIST, then the
<code class="inline"><a class="l_k" href="functions/use.html">use</a></code> will call the VERSION method in class Module with the given
version as an argument.  The default VERSION method, inherited from
the UNIVERSAL class, croaks if the given version is larger than the
value of the variable $Module::VERSION.  (Note that there is not a
comma after VERSION!)</p>
<p>This version-checking mechanism is similar to the one currently used
in the Exporter module, but it is faster and can be used with modules
that don't use the Exporter.  It is the recommended method for new
code.</p>
</li>
<li><a name="prototype(FUNCTION)"></a><b>prototype(FUNCTION)</b>
<p>Returns the prototype of a function as a string (or <code class="inline"><a class="l_k" href="functions/undef.html">undef</a></code> if the
function has no prototype).  FUNCTION is a reference to or the name of the
function whose prototype you want to retrieve.
(Not actually new; just never documented before.)</p>
</li>
<li><a name="srand"></a><b>srand</b>
<p>The default seed for <code class="inline"><a class="l_k" href="functions/srand.html">srand</a></code>, which used to be <code class="inline"><a class="l_k" href="functions/time.html">time</a></code>, has been changed.
Now it's a heady mix of difficult-to-predict system-dependent values,
which should be sufficient for most everyday purposes.</p>
<p>Previous to version 5.004, calling <code class="inline"><a class="l_k" href="functions/rand.html">rand</a></code> without first calling <code class="inline"><a class="l_k" href="functions/srand.html">srand</a></code>
would yield the same sequence of random numbers on most or all machines.
Now, when perl sees that you're calling <code class="inline"><a class="l_k" href="functions/rand.html">rand</a></code> and haven't yet called
<code class="inline"><a class="l_k" href="functions/srand.html">srand</a></code>, it calls <code class="inline"><a class="l_k" href="functions/srand.html">srand</a></code> with the default seed. You should still call
<code class="inline"><a class="l_k" href="functions/srand.html">srand</a></code> manually if your code might ever be run on a pre-5.004 system,
of course, or if you want a seed other than the default.</p>
</li>
<li><a name="%24_-as-Default"></a><b>$_ as Default</b>
<p>Functions documented in the Camel to default to $_ now in
fact do, and all those that do are so documented in <a href="perlfunc.html">perlfunc</a>.</p>
</li>
<li><a name="m%2f%2fgc-does-not-reset-search-position-on-failure"></a><b><code class="inline"><a class="l_k" href="functions/m.html">m//gc</a></code> does not reset search position on failure</b>
<p>The <code class="inline"><a class="l_k" href="functions/m.html">m//g</a></code> match iteration construct has always reset its target
string's search position (which is visible through the <code class="inline"><a class="l_k" href="functions/pos.html">pos</a></code> operator)
when a match fails; as a result, the next <code class="inline"><a class="l_k" href="functions/m.html">m//g</a></code> match after a failure
starts again at the beginning of the string.  With Perl 5.004, this
reset may be disabled by adding the "c" (for "continue") modifier,
i.e. <code class="inline"><a class="l_k" href="functions/m.html">m//gc</a></code>.  This feature, in conjunction with the <code class="inline">\<span class="w">G</span></code>
 zero-width
assertion, makes it possible to chain matches together.  See <a href="perlop.html">perlop</a>
and <a href="perlre.html">perlre</a>.</p>
</li>
<li><a name="m%2f%2fx-ignores-whitespace-before-%3f*%2b%7b%7d"></a><b><code class="inline"><a class="l_k" href="functions/m.html">m//x</a></code> ignores whitespace before ?*+{}</b>
<p>The <code class="inline"><a class="l_k" href="functions/m.html">m//x</a></code> construct has always been intended to ignore all unescaped
whitespace.  However, before Perl 5.004, whitespace had the effect of
escaping repeat modifiers like "*" or "?"; for example, <code class="inline"><span class="q">/a *b/x</span></code>
 was
(mis)interpreted as <code class="inline"><span class="q">/a\*b/x</span></code>
.  This bug has been fixed in 5.004.</p>
</li>
<li><a name="nested-sub%7b%7d-closures-work-now"></a><b>nested <code class="inline"><a class="l_k" href="functions/sub.html">sub{}</a></code> closures work now</b>
<p>Prior to the 5.004 release, nested anonymous functions didn't work
right.  They do now.</p>
</li>
<li><a name="formats-work-right-on-changing-lexicals"></a><b>formats work right on changing lexicals</b>
<p>Just like anonymous functions that contain lexical variables
that change (like a lexical index variable for a <code class="inline">foreach</code>
 loop),
formats now work properly.  For example, this silently failed
before (printed only zeros), but is fine now:</p>
<pre class="verbatim"><ol><li>    my $i;</li><li>    foreach $i ( 1 .. 10 ) {</li><li>	write;</li><li>    }</li><li>    format =</li><li>	my i is @#</li><li>	$i</li><li>    .</li></ol></pre><p>However, it still fails (without a warning) if the foreach is within a
subroutine:</p>
<pre class="verbatim"><ol><li>    my $i;</li><li>    sub foo {</li><li>      foreach $i ( 1 .. 10 ) {</li><li>	write;</li><li>      }</li><li>    }</li><li>    foo;</li><li>    format =</li><li>	my i is @#</li><li>	$i</li><li>    .</li></ol></pre></li>
</ul>
<a name="New-builtin-methods"></a><h2>New builtin methods</h2>
<p>The <code class="inline"><span class="w">UNIVERSAL</span></code>
 package automatically contains the following methods that
are inherited by all other classes:</p>
<ul>
<li><a name="isa(CLASS)"></a><b>isa(CLASS)</b>
<p><code class="inline"><span class="w">isa</span></code>
 returns <i>true</i> if its object is blessed into a subclass of <code class="inline"><span class="w">CLASS</span></code>
</p>
<p><code class="inline"><span class="w">isa</span></code>
 is also exportable and can be called as a sub with two arguments. This
allows the ability to check what a reference points to. Example:</p>
<pre class="verbatim"><ol><li>    <a class="l_k" href="functions/use.html">use</a> <span class="w">UNIVERSAL</span> <span class="q">qw(isa)</span><span class="sc">;</span></li><li></li><li>    if<span class="s">(</span><span class="i">isa</span><span class="s">(</span><span class="i">$ref</span><span class="cm">,</span> <span class="q">&#39;ARRAY&#39;</span><span class="s">)</span><span class="s">)</span> <span class="s">{</span></li><li>       ...</li><li>    <span class="s">}</span></li></ol></pre></li>
<li><a name="can(METHOD)"></a><b>can(METHOD)</b>
<p><code class="inline"><span class="w">can</span></code>
 checks to see if its object has a method called <code class="inline"><span class="w">METHOD</span></code>
,
if it does then a reference to the sub is returned; if it does not then
<i>undef</i> is returned.</p>
</li>
<li><a name="VERSION(-%5bNEED%5d-)"></a><b>VERSION( [NEED] )</b>
<p><code class="inline"><span class="w">VERSION</span></code>
 returns the version number of the class (package).  If the
NEED argument is given then it will check that the current version (as
defined by the $VERSION variable in the given package) not less than
NEED; it will die if this is not the case.  This method is normally
called as a class method.  This method is called automatically by the
<code class="inline"><span class="w">VERSION</span></code>
 form of <code class="inline"><a class="l_k" href="functions/use.html">use</a></code>.</p>
<pre class="verbatim"><ol><li>    <a class="l_k" href="functions/use.html">use</a> <span class="w">A</span> <span class="n">1.2</span> <span class="q">qw(some imported subs)</span><span class="sc">;</span></li><li>    <span class="c"># implies:</span></li><li>    <span class="w">A</span><span class="w">-&gt;VERSION</span><span class="s">(</span><span class="n">1.2</span><span class="s">)</span><span class="sc">;</span></li></ol></pre></li>
</ul>
<p><b>NOTE:</b> <code class="inline"><span class="w">can</span></code>
 directly uses Perl's internal code for method lookup, and
<code class="inline"><span class="w">isa</span></code>
 uses a very similar method and caching strategy. This may cause
strange effects if the Perl code dynamically changes @ISA in any package.</p>
<p>You may add other methods to the UNIVERSAL class via Perl or XS code.
You do not need to <code class="inline"><a class="l_k" href="functions/use.html">use</a> <span class="w">UNIVERSAL</span></code>
 in order to make these methods
available to your program.  This is necessary only if you wish to
have <code class="inline"><span class="w">isa</span></code>
 available as a plain subroutine in the current package.</p>
<a name="TIEHANDLE-now-supported"></a><h2>TIEHANDLE now supported</h2>
<p>See <a href="perltie.html">perltie</a> for other kinds of tie()s.</p>
<ul>
<li><a name="TIEHANDLE-classname%2c-LIST"></a><b>TIEHANDLE classname, LIST</b>
<p>This is the constructor for the class.  That means it is expected to
return an object of some sort. The reference can be used to
hold some internal information.</p>
<pre class="verbatim"><ol><li><a name="TIEHANDLE"></a>    sub <span class="m">TIEHANDLE</span> <span class="s">{</span></li><li>	<a class="l_k" href="functions/print.html">print</a> <span class="q">&quot;&lt;shout&gt;\n&quot;</span><span class="sc">;</span></li><li>	<a class="l_k" href="functions/my.html">my</a> <span class="i">$i</span><span class="sc">;</span></li><li>	<a class="l_k" href="functions/return.html">return</a> <a class="l_k" href="functions/bless.html">bless</a> \<span class="i">$i</span><span class="cm">,</span> <a class="l_k" href="functions/shift.html">shift</a><span class="sc">;</span></li><li>    <span class="s">}</span></li></ol></pre></li>
<li><a name="PRINT-this%2c-LIST"></a><b>PRINT this, LIST</b>
<p>This method will be triggered every time the tied handle is printed to.
Beyond its self reference it also expects the list that was passed to
the print function.</p>
<pre class="verbatim"><ol><li><a name="PRINT"></a>    sub <span class="m">PRINT</span> <span class="s">{</span></li><li>	<span class="i">$r</span> = <a class="l_k" href="functions/shift.html">shift</a><span class="sc">;</span></li><li>	<span class="i">$$r</span>++<span class="sc">;</span></li><li>	<a class="l_k" href="functions/return.html">return</a> <a class="l_k" href="functions/print.html">print</a> <a class="l_k" href="functions/join.html">join</a><span class="s">(</span> <span class="i">$,</span> <span class="cm">=&gt;</span> <a class="l_k" href="functions/map.html">map</a> <span class="s">{</span><a class="l_k" href="functions/uc.html">uc</a><span class="s">}</span> <span class="i">@_</span><span class="s">)</span><span class="cm">,</span> <span class="i">$\</span><span class="sc">;</span></li><li>    <span class="s">}</span></li></ol></pre></li>
<li><a name="PRINTF-this%2c-LIST"></a><b>PRINTF this, LIST</b>
<p>This method will be triggered every time the tied handle is printed to
with the <code class="inline"><a class="l_k" href="functions/printf.html">printf()</a></code> function.
Beyond its self reference it also expects the format and list that was
passed to the printf function.</p>
<pre class="verbatim"><ol><li><a name="PRINTF"></a>    sub <span class="m">PRINTF</span> <span class="s">{</span></li><li>        <a class="l_k" href="functions/shift.html">shift</a><span class="sc">;</span></li><li>	  <a class="l_k" href="functions/my.html">my</a> <span class="i">$fmt</span> = <a class="l_k" href="functions/shift.html">shift</a><span class="sc">;</span></li><li>        <a class="l_k" href="functions/print.html">print</a> <a class="l_k" href="functions/sprintf.html">sprintf</a><span class="s">(</span><span class="i">$fmt</span><span class="cm">,</span> <span class="i">@_</span><span class="s">)</span>.<span class="q">&quot;\n&quot;</span><span class="sc">;</span></li><li>    <span class="s">}</span></li></ol></pre></li>
<li><a name="READ-this-LIST"></a><b>READ this LIST</b>
<p>This method will be called when the handle is read from via the <code class="inline"><a class="l_k" href="functions/read.html">read</a></code>
or <code class="inline"><a class="l_k" href="functions/sysread.html">sysread</a></code> functions.</p>
<pre class="verbatim"><ol><li><a name="READ"></a>    sub <span class="m">READ</span> <span class="s">{</span></li><li>	<span class="i">$r</span> = <a class="l_k" href="functions/shift.html">shift</a><span class="sc">;</span></li><li>	<a class="l_k" href="functions/my.html">my</a><span class="s">(</span><span class="i">$buf</span><span class="cm">,</span><span class="i">$len</span><span class="cm">,</span><span class="i">$offset</span><span class="s">)</span> = <span class="i">@_</span><span class="sc">;</span></li><li>	<a class="l_k" href="functions/print.html">print</a> <span class="q">&quot;READ called, \$buf=$buf, \$len=$len, \$offset=$offset&quot;</span><span class="sc">;</span></li><li>    <span class="s">}</span></li></ol></pre></li>
<li><a name="READLINE-this"></a><b>READLINE this</b>
<p>This method will be called when the handle is read from. The method
should return undef when there is no more data.</p>
<pre class="verbatim"><ol><li><a name="READLINE"></a>    sub <span class="m">READLINE</span> <span class="s">{</span></li><li>	<span class="i">$r</span> = <a class="l_k" href="functions/shift.html">shift</a><span class="sc">;</span></li><li>	<a class="l_k" href="functions/return.html">return</a> <span class="q">&quot;PRINT called $$r times\n&quot;</span></li><li>    <span class="s">}</span></li></ol></pre></li>
<li><a name="GETC-this"></a><b>GETC this</b>
<p>This method will be called when the <code class="inline"><a class="l_k" href="functions/getc.html">getc</a></code> function is called.</p>
<pre class="verbatim"><ol><li><a name="GETC"></a>    sub <span class="m">GETC</span> <span class="s">{</span> <a class="l_k" href="functions/print.html">print</a> <span class="q">&quot;Don&#39;t GETC, Get Perl&quot;</span><span class="sc">;</span> <a class="l_k" href="functions/return.html">return</a> <span class="q">&quot;a&quot;</span><span class="sc">;</span> <span class="s">}</span></li></ol></pre></li>
<li><a name="DESTROY-this"></a><b>DESTROY this</b>
<p>As with the other types of ties, this method will be called when the
tied handle is about to be destroyed. This is useful for debugging and
possibly for cleaning up.</p>
<pre class="verbatim"><ol><li><a name="DESTROY"></a>    sub <span class="m">DESTROY</span> <span class="s">{</span></li><li>	<a class="l_k" href="functions/print.html">print</a> <span class="q">&quot;&lt;/shout&gt;\n&quot;</span><span class="sc">;</span></li><li>    <span class="s">}</span></li></ol></pre></li>
</ul>
<a name="Malloc-enhancements"></a><h2>Malloc enhancements</h2>
<p>If perl is compiled with the malloc included with the perl distribution
(that is, if <code class="inline">perl -V:d_mymalloc</code> is 'define') then you can print
memory statistics at runtime by running Perl thusly:</p>
<pre class="verbatim"><ol><li>  env PERL_DEBUG_MSTATS=2 perl your_script_here</li></ol></pre><p>The value of 2 means to print statistics after compilation and on
exit; with a value of 1, the statistics are printed only on exit.
(If you want the statistics at an arbitrary time, you'll need to
install the optional module Devel::Peek.)</p>
<p>Three new compilation flags are recognized by malloc.c.  (They have no
effect if perl is compiled with system malloc().)</p>
<ul>
<li><a name="-DPERL_EMERGENCY_SBRK"></a><b>-DPERL_EMERGENCY_SBRK</b>
<p>If this macro is defined, running out of memory need not be a fatal
error: a memory pool can allocated by assigning to the special
variable <code class="inline"><span class="i">$^M</span></code>
.  See <a href="#%24%5eM">$^M</a>.</p>
</li>
<li><a name="-DPACK_MALLOC"></a><b>-DPACK_MALLOC</b>
<p>Perl memory allocation is by bucket with sizes close to powers of two.
Because of these malloc overhead may be big, especially for data of
size exactly a power of two.  If <code class="inline"><span class="w">PACK_MALLOC</span></code>
 is defined, perl uses
a slightly different algorithm for small allocations (up to 64 bytes
long), which makes it possible to have overhead down to 1 byte for
allocations which are powers of two (and appear quite often).</p>
<p>Expected memory savings (with 8-byte alignment in <code class="inline"><span class="w">alignbytes</span></code>
) is
about 20% for typical Perl usage.  Expected slowdown due to additional
malloc overhead is in fractions of a percent (hard to measure, because
of the effect of saved memory on speed).</p>
</li>
<li><a name="-DTWO_POT_OPTIMIZE"></a><b>-DTWO_POT_OPTIMIZE</b>
<p>Similarly to <code class="inline"><span class="w">PACK_MALLOC</span></code>
, this macro improves allocations of data
with size close to a power of two; but this works for big allocations
(starting with 16K by default).  Such allocations are typical for big
hashes and special-purpose scripts, especially image processing.</p>
<p>On recent systems, the fact that perl requires 2M from system for 1M
allocation will not affect speed of execution, since the tail of such
a chunk is not going to be touched (and thus will not require real
memory).  However, it may result in a premature out-of-memory error.
So if you will be manipulating very large blocks with sizes close to
powers of two, it would be wise to define this macro.</p>
<p>Expected saving of memory is 0-100% (100% in applications which
require most memory in such 2**n chunks); expected slowdown is
negligible.</p>
</li>
</ul>
<a name="Miscellaneous-efficiency-enhancements"></a><h2>Miscellaneous efficiency enhancements</h2>
<p>Functions that have an empty prototype and that do nothing but return
a fixed value are now inlined (e.g. <code class="inline"><a name="PI"></a>sub <span class="m">PI ()</span> <span class="s">{</span> <span class="n">3.14159</span> <span class="s">}</span></code>
).</p>
<p>Each unique hash key is only allocated once, no matter how many hashes
have an entry with that key.  So even if you have 100 copies of the
same hash, the hash keys never have to be reallocated.</p>
<a name="Support-for-More-Operating-Systems"></a><h1>Support for More Operating Systems</h1>
<p>Support for the following operating systems is new in Perl 5.004.</p>
<a name="Win32"></a><h2>Win32</h2>
<p>Perl 5.004 now includes support for building a "native" perl under
Windows NT, using the Microsoft Visual C++ compiler (versions 2.0
and above) or the Borland C++ compiler (versions 5.02 and above).
The resulting perl can be used under Windows 95 (if it
is installed in the same directory locations as it got installed
in Windows NT).  This port includes support for perl extension
building tools like <a href="ExtUtils/MakeMaker.html">ExtUtils::MakeMaker</a> and <a href="h2xs.html">h2xs</a>, so that many extensions
available on the Comprehensive Perl Archive Network (CPAN) can now be
readily built under Windows NT.  See <a href="http://www.perl.com/">http://www.perl.com/</a> for more
information on CPAN and <i>README.win32</i> in the perl distribution for more
details on how to get started with building this port.</p>
<p>There is also support for building perl under the Cygwin32 environment.
Cygwin32 is a set of GNU tools that make it possible to compile and run
many Unix programs under Windows NT by providing a mostly Unix-like 
interface for compilation and execution.  See <i>README.cygwin32</i> in the
perl distribution for more details on this port and how to obtain the
Cygwin32 toolkit.</p>
<a name="Plan-9"></a><h2>Plan 9</h2>
<p>See <i>README.plan9</i> in the perl distribution.</p>
<a name="QNX"></a><h2>QNX</h2>
<p>See <i>README.qnx</i> in the perl distribution.</p>
<a name="AmigaOS"></a><h2>AmigaOS</h2>
<p>See <i>README.amigaos</i> in the perl distribution.</p>
<a name="Pragmata"></a><h1>Pragmata</h1>
<p>Six new pragmatic modules exist:</p>
<ul>
<li><a name="use-autouse-MODULE-%3d%3e-qw(sub1-sub2-sub3)"></a><b>use autouse MODULE =&gt; qw(sub1 sub2 sub3)</b>
<p>Defers <code class="inline"><a class="l_k" href="functions/require.html">require</a> <span class="w">MODULE</span></code>
 until someone calls one of the specified
subroutines (which must be exported by MODULE).  This pragma should be
used with caution, and only when necessary.</p>
</li>
<li><a name="use-blib"></a><b>use blib</b>
</li>
<li><a name="use-blib-'dir'"></a><b>use blib 'dir'</b>
<p>Looks for MakeMaker-like <i>'blib'</i> directory structure starting in
<i>dir</i> (or current directory) and working back up to five levels of
parent directories.</p>
<p>Intended for use on command line with <b>-M</b> option as a way of testing
arbitrary scripts against an uninstalled version of a package.</p>
</li>
<li><a name="use-constant-NAME-%3d%3e-VALUE"></a><b>use constant NAME =&gt; VALUE</b>
<p>Provides a convenient interface for creating compile-time constants,
See <a href="perlsub.html#Constant-Functions">Constant Functions in perlsub</a>.</p>
</li>
<li><a name="use-locale"></a><b>use locale</b>
<p>Tells the compiler to enable (or disable) the use of POSIX locales for
builtin operations.</p>
<p>When <code class="inline"><a class="l_k" href="functions/use.html">use</a> <span class="w">locale</span></code>
 is in effect, the current LC_CTYPE locale is used
for regular expressions and case mapping; LC_COLLATE for string
ordering; and LC_NUMERIC for numeric formatting in printf and sprintf
(but <b>not</b> in print).  LC_NUMERIC is always used in write, since
lexical scoping of formats is problematic at best.</p>
<p>Each <code class="inline"><a class="l_k" href="functions/use.html">use</a> <span class="w">locale</span></code>
 or <code class="inline"><a class="l_k" href="functions/no.html">no</a> <span class="w">locale</span></code>
 affects statements to the end of
the enclosing BLOCK or, if not inside a BLOCK, to the end of the
current file.  Locales can be switched and queried with
POSIX::setlocale().</p>
<p>See <a href="perllocale.html">perllocale</a> for more information.</p>
</li>
<li><a name="use-ops"></a><b>use ops</b>
<p>Disable unsafe opcodes, or any named opcodes, when compiling Perl code.</p>
</li>
<li><a name="use-vmsish"></a><b>use vmsish</b>
<p>Enable VMS-specific language features.  Currently, there are three
VMS-specific features available: 'status', which makes <code class="inline"><span class="i">$?</span></code>
 and
<code class="inline"><a class="l_k" href="functions/system.html">system</a></code> return genuine VMS status values instead of emulating POSIX;
'exit', which makes <code class="inline"><a class="l_k" href="functions/exit.html">exit</a></code> take a genuine VMS status value instead of
assuming that <code class="inline"><a class="l_k" href="functions/exit.html">exit</a> <span class="n">1</span></code>
 is an error; and 'time', which makes all times
relative to the local time zone, in the VMS tradition.</p>
</li>
</ul>
<a name="Modules"></a><h1>Modules</h1>
<a name="Required-Updates"></a><h2>Required Updates</h2>
<p>Though Perl 5.004 is compatible with almost all modules that work
with Perl 5.003, there are a few exceptions:</p>
<pre class="verbatim"><ol><li>    Module   Required Version for Perl 5.004</li><li>    ------   -------------------------------</li><li>    Filter   Filter-1.12</li><li>    LWP      libwww-perl-5.08</li><li>    Tk       Tk400.202 (-w makes noise)</li></ol></pre><p>Also, the majordomo mailing list program, version 1.94.1, doesn't work
with Perl 5.004 (nor with perl 4), because it executes an invalid
regular expression.  This bug is fixed in majordomo version 1.94.2.</p>
<a name="Installation-directories"></a><h2>Installation directories</h2>
<p>The <i>installperl</i> script now places the Perl source files for
extensions in the architecture-specific library directory, which is
where the shared libraries for extensions have always been.  This
change is intended to allow administrators to keep the Perl 5.004
library directory unchanged from a previous version, without running
the risk of binary incompatibility between extensions' Perl source and
shared libraries.</p>
<a name="Module-information-summary"></a><h2>Module information summary</h2>
<p>Brand new modules, arranged by topic rather than strictly
alphabetically:</p>
<pre class="verbatim"><ol><li>    CGI.pm               Web server interface ("Common Gateway Interface")</li><li>    CGI/Apache.pm        Support for Apache's Perl module</li><li>    CGI/Carp.pm          Log server errors with helpful context</li><li>    CGI/Fast.pm          Support for FastCGI (persistent server process)</li><li>    CGI/Push.pm          Support for server push</li><li>    CGI/Switch.pm        Simple interface for multiple server types</li><li></li><li>    CPAN                 Interface to Comprehensive Perl Archive Network</li><li>    CPAN::FirstTime      Utility for creating CPAN configuration file</li><li>    CPAN::Nox            Runs CPAN while avoiding compiled extensions</li><li></li><li>    IO.pm                Top-level interface to IO::* classes</li><li>    IO/File.pm           IO::File extension Perl module</li><li>    IO/Handle.pm         IO::Handle extension Perl module</li><li>    IO/Pipe.pm           IO::Pipe extension Perl module</li><li>    IO/Seekable.pm       IO::Seekable extension Perl module</li><li>    IO/Select.pm         IO::Select extension Perl module</li><li>    IO/Socket.pm         IO::Socket extension Perl module</li><li></li><li>    Opcode.pm            Disable named opcodes when compiling Perl code</li><li></li><li>    ExtUtils/Embed.pm    Utilities for embedding Perl in C programs</li><li>    ExtUtils/testlib.pm  Fixes up @INC to use just-built extension</li><li></li><li>    FindBin.pm           Find path of currently executing program</li><li></li><li>    Class/Struct.pm      Declare struct-like datatypes as Perl classes</li><li>    File/stat.pm         By-name interface to Perl's builtin stat</li><li>    Net/hostent.pm       By-name interface to Perl's builtin gethost*</li><li>    Net/netent.pm        By-name interface to Perl's builtin getnet*</li><li>    Net/protoent.pm      By-name interface to Perl's builtin getproto*</li><li>    Net/servent.pm       By-name interface to Perl's builtin getserv*</li><li>    Time/gmtime.pm       By-name interface to Perl's builtin gmtime</li><li>    Time/localtime.pm    By-name interface to Perl's builtin localtime</li><li>    Time/tm.pm           Internal object for Time::{gm,local}time</li><li>    User/grent.pm        By-name interface to Perl's builtin getgr*</li><li>    User/pwent.pm        By-name interface to Perl's builtin getpw*</li><li></li><li>    Tie/RefHash.pm       Base class for tied hashes with references as keys</li><li></li><li>    UNIVERSAL.pm         Base class for *ALL* classes</li></ol></pre><a name="Fcntl"></a><h2>Fcntl</h2>
<p>New constants in the existing Fcntl modules are now supported,
provided that your operating system happens to support them:</p>
<pre class="verbatim"><ol><li>    <span class="w">F_GETOWN</span> <span class="w">F_SETOWN</span></li><li>    <span class="w">O_ASYNC</span> <span class="w">O_DEFER</span> <span class="w">O_DSYNC</span> <span class="w">O_FSYNC</span> <span class="w">O_SYNC</span></li><li>    <span class="w">O_EXLOCK</span> <span class="w">O_SHLOCK</span></li></ol></pre><p>These constants are intended for use with the Perl operators sysopen()
and fcntl() and the basic database modules like SDBM_File.  For the
exact meaning of these and other Fcntl constants please refer to your
operating system's documentation for fcntl() and open().</p>
<p>In addition, the Fcntl module now provides these constants for use
with the Perl operator flock():</p>
<pre class="verbatim"><ol><li>	<span class="w">LOCK_SH</span> <span class="w">LOCK_EX</span> <span class="w">LOCK_NB</span> <span class="w">LOCK_UN</span></li></ol></pre><p>These constants are defined in all environments (because where there is
no flock() system call, Perl emulates it).  However, for historical
reasons, these constants are not exported unless they are explicitly
requested with the ":flock" tag (e.g. <code class="inline"><a class="l_k" href="functions/use.html">use</a> <span class="w">Fcntl</span> <span class="q">&#39;:flock&#39;</span></code>
).</p>
<a name="IO"></a><h2>IO</h2>
<p>The IO module provides a simple mechanism to load all the IO modules at one
go.  Currently this includes:</p>
<pre class="verbatim"><ol><li>     <span class="w">IO::Handle</span></li><li>     <span class="w">IO::Seekable</span></li><li>     <span class="w">IO::File</span></li><li>     <span class="w">IO::Pipe</span></li><li>     <span class="w">IO::Socket</span></li></ol></pre><p>For more information on any of these modules, please see its
respective documentation.</p>
<a name="Math%3a%3aComplex"></a><h2>Math::Complex</h2>
<p>The Math::Complex module has been totally rewritten, and now supports
more operations.  These are overloaded:</p>
<pre class="verbatim"><ol><li>     + - * / ** &lt;=&gt; neg ~ abs sqrt exp log sin cos atan2 "" (stringify)</li></ol></pre><p>And these functions are now exported:</p>
<pre class="verbatim"><ol><li>    <span class="w">pi</span> <span class="w">i</span> <span class="w">Re</span> <span class="w">Im</span> <span class="w">arg</span></li><li>    <span class="w">log10</span> <span class="w">logn</span> <span class="w">ln</span> <span class="w">cbrt</span> <span class="w">root</span></li><li>    <span class="w">tan</span></li><li>    <span class="w">csc</span> <span class="w">sec</span> <span class="w">cot</span></li><li>    <span class="w">asin</span> <span class="w">acos</span> <span class="w">atan</span></li><li>    <span class="w">acsc</span> <span class="w">asec</span> <span class="w">acot</span></li><li>    <span class="w">sinh</span> <span class="w">cosh</span> <span class="w">tanh</span></li><li>    <span class="w">csch</span> <span class="w">sech</span> <span class="w">coth</span></li><li>    <span class="w">asinh</span> <span class="w">acosh</span> <span class="w">atanh</span></li><li>    <span class="w">acsch</span> <span class="w">asech</span> <span class="w">acoth</span></li><li>    <span class="w">cplx</span> <span class="w">cplxe</span></li></ol></pre><a name="Math%3a%3aTrig"></a><h2>Math::Trig</h2>
<p>This new module provides a simpler interface to parts of Math::Complex for
those who need trigonometric functions only for real numbers.</p>
<a name="DB_File"></a><h2>DB_File</h2>
<p>There have been quite a few changes made to DB_File. Here are a few of
the highlights:</p>
<ul>
<li>
<p>Fixed a handful of bugs.</p>
</li>
<li>
<p>By public demand, added support for the standard hash function exists().</p>
</li>
<li>
<p>Made it compatible with Berkeley DB 1.86.</p>
</li>
<li>
<p>Made negative subscripts work with RECNO interface.</p>
</li>
<li>
<p>Changed the default flags from O_RDWR to O_CREAT|O_RDWR and the default
mode from 0640 to 0666.</p>
</li>
<li>
<p>Made DB_File automatically import the open() constants (O_RDWR,
O_CREAT etc.) from Fcntl, if available.</p>
</li>
<li>
<p>Updated documentation.</p>
</li>
</ul>
<p>Refer to the HISTORY section in DB_File.pm for a complete list of
changes. Everything after DB_File 1.01 has been added since 5.003.</p>
<a name="Net%3a%3aPing"></a><h2>Net::Ping</h2>
<p>Major rewrite - support added for both udp echo and real icmp pings.</p>
<a name="Object-oriented-overrides-for-builtin-operators"></a><h2>Object-oriented overrides for builtin operators</h2>
<p>Many of the Perl builtins returning lists now have
object-oriented overrides.  These are:</p>
<pre class="verbatim"><ol><li>    <span class="w">File::stat</span></li><li>    <span class="w">Net::hostent</span></li><li>    <span class="w">Net::netent</span></li><li>    <span class="w">Net::protoent</span></li><li>    <span class="w">Net::servent</span></li><li>    <span class="w">Time::gmtime</span></li><li>    <span class="w">Time::localtime</span></li><li>    <span class="w">User::grent</span></li><li>    <span class="w">User::pwent</span></li></ol></pre><p>For example, you can now say</p>
<pre class="verbatim"><ol><li>    <a class="l_k" href="functions/use.html">use</a> <span class="w">File::stat</span><span class="sc">;</span></li><li>    <a class="l_k" href="functions/use.html">use</a> <span class="w">User::pwent</span><span class="sc">;</span></li><li>    <span class="i">$his</span> = <span class="s">(</span><a class="l_k" href="functions/stat.html">stat</a><span class="s">(</span><span class="i">$filename</span><span class="s">)</span><span class="i">-&gt;st_uid</span> == <span class="i">pwent</span><span class="s">(</span><span class="i">$whoever</span><span class="s">)</span><span class="i">-&gt;pw_uid</span><span class="s">)</span><span class="sc">;</span></li></ol></pre><a name="Utility-Changes"></a><h1>Utility Changes</h1>
<a name="pod2html"></a><h2>pod2html</h2>
<ul>
<li><a name="Sends-converted-HTML-to-standard-output"></a><b>Sends converted HTML to standard output</b>
<p>The <i>pod2html</i> utility included with Perl 5.004 is entirely new.
By default, it sends the converted HTML to its standard output,
instead of writing it to a file like Perl 5.003's <i>pod2html</i> did.
Use the <b>--outfile=FILENAME</b> option to write to a file.</p>
</li>
</ul>
<a name="xsubpp"></a><h2>xsubpp</h2>
<ul>
<li><a name="void-XSUBs-now-default-to-returning-nothing"></a><b><code class="inline"><span class="w">void</span></code>
 XSUBs now default to returning nothing</b>
<p>Due to a documentation/implementation bug in previous versions of
Perl, XSUBs with a return type of <code class="inline"><span class="w">void</span></code>
 have actually been
returning one value.  Usually that value was the GV for the XSUB,
but sometimes it was some already freed or reused value, which would
sometimes lead to program failure.</p>
<p>In Perl 5.004, if an XSUB is declared as returning <code class="inline"><span class="w">void</span></code>
, it
actually returns no value, i.e. an empty list (though there is a
backward-compatibility exception; see below).  If your XSUB really
does return an SV, you should give it a return type of <code class="inline"><span class="w">SV</span> *</code>
.</p>
<p>For backward compatibility, <i>xsubpp</i> tries to guess whether a
<code class="inline"><span class="w">void</span></code>
 XSUB is really <code class="inline"><span class="w">void</span></code>
 or if it wants to return an <code class="inline"><span class="w">SV</span> *</code>
.
It does so by examining the text of the XSUB: if <i>xsubpp</i> finds
what looks like an assignment to <code class="inline"><span class="i">ST</span><span class="s">(</span><span class="n">0</span><span class="s">)</span></code>
, it assumes that the
XSUB's return type is really <code class="inline"><span class="w">SV</span> *</code>
.</p>
</li>
</ul>
<a name="C-Language-API-Changes"></a><h1>C Language API Changes</h1>
<ul>
<li><a name="gv_fetchmethod-and-perl_call_sv"></a><b><code class="inline"><span class="w">gv_fetchmethod</span></code>
 and <code class="inline"><span class="w">perl_call_sv</span></code>
</b>
<p>The <code class="inline"><span class="w">gv_fetchmethod</span></code>
 function finds a method for an object, just like
in Perl 5.003.  The GV it returns may be a method cache entry.
However, in Perl 5.004, method cache entries are not visible to users;
therefore, they can no longer be passed directly to <code class="inline"><span class="w">perl_call_sv</span></code>
.
Instead, you should use the <code class="inline"><span class="w">GvCV</span></code>
 macro on the GV to extract its CV,
and pass the CV to <code class="inline"><span class="w">perl_call_sv</span></code>
.</p>
<p>The most likely symptom of passing the result of <code class="inline"><span class="w">gv_fetchmethod</span></code>
 to
<code class="inline"><span class="w">perl_call_sv</span></code>
 is Perl's producing an "Undefined subroutine called"
error on the <i>second</i> call to a given method (since there is no cache
on the first call).</p>
</li>
<li><a name="perl_eval_pv"></a><b><code class="inline"><span class="w">perl_eval_pv</span></code>
</b>
<p>A new function handy for eval'ing strings of Perl code inside C code.
This function returns the value from the eval statement, which can
be used instead of fetching globals from the symbol table.  See
<a href="perlguts.html">perlguts</a>, <a href="perlembed.html">perlembed</a> and <a href="perlcall.html">perlcall</a> for details and examples.</p>
</li>
<li><a name="Extended-API-for-manipulating-hashes"></a><b>Extended API for manipulating hashes</b>
<p>Internal handling of hash keys has changed.  The old hashtable API is
still fully supported, and will likely remain so.  The additions to the
API allow passing keys as <code class="inline"><span class="w">SV</span>*</code>
s, so that <code class="inline"><a class="l_k" href="functions/tied.html">tied</a></code> hashes can be given
real scalars as keys rather than plain strings (nontied hashes still
can only use strings as keys).  New extensions must use the new hash
access functions and macros if they wish to use <code class="inline"><span class="w">SV</span>*</code>
 keys.  These
additions also make it feasible to manipulate <code class="inline"><span class="w">HE</span>*</code>
s (hash entries),
which can be more efficient.  See <a href="perlguts.html">perlguts</a> for details.</p>
</li>
</ul>
<a name="Documentation-Changes"></a><h1>Documentation Changes</h1>
<p>Many of the base and library pods were updated.  These
new pods are included in section 1:</p>
<ul>
<li><a name="the-perldelta-manpage"></a><b><a href="perldelta.html">perldelta</a></b>
<p>This document.</p>
</li>
<li><a name="the-perlfaq-manpage"></a><b><a href="perlfaq.html">perlfaq</a></b>
<p>Frequently asked questions.</p>
</li>
<li><a name="the-perllocale-manpage"></a><b><a href="perllocale.html">perllocale</a></b>
<p>Locale support (internationalization and localization).</p>
</li>
<li><a name="the-perltoot-manpage"></a><b><a href="perltoot.html">perltoot</a></b>
<p>Tutorial on Perl OO programming.</p>
</li>
<li><a name="the-perlapio-manpage"></a><b><a href="perlapio.html">perlapio</a></b>
<p>Perl internal IO abstraction interface.</p>
</li>
<li><a name="the-perlmodlib-manpage"></a><b><a href="perlmodlib.html">perlmodlib</a></b>
<p>Perl module library and recommended practice for module creation.
Extracted from <a href="perlmod.html">perlmod</a> (which is much smaller as a result).</p>
</li>
<li><a name="the-perldebug-manpage"></a><b><a href="perldebug.html">perldebug</a></b>
<p>Although not new, this has been massively updated.</p>
</li>
<li><a name="the-perlsec-manpage"></a><b><a href="perlsec.html">perlsec</a></b>
<p>Although not new, this has been massively updated.</p>
</li>
</ul>
<a name="New-Diagnostics"></a><h1>New Diagnostics</h1>
<p>Several new conditions will trigger warnings that were
silent before.  Some only affect certain platforms.
The following new warnings and errors outline these.
These messages are classified as follows (listed in
increasing order of desperation):</p>
<pre class="verbatim"><ol><li>   (W) A warning (optional).</li><li>   (D) A deprecation (optional).</li><li>   (S) A severe warning (mandatory).</li><li>   (F) A fatal error (trappable).</li><li>   (P) An internal error you should never see (trappable).</li><li>   (X) A very fatal error (nontrappable).</li><li>   (A) An alien error message (not generated by Perl).</li></ol></pre><ul>
<li><a name="%22my%22-variable-%25s-masks-earlier-declaration-in-same-scope"></a><b>"my" variable %s masks earlier declaration in same scope</b>
<p>(W) A lexical variable has been redeclared in the same scope, effectively
eliminating all access to the previous instance.  This is almost always
a typographical error.  Note that the earlier variable will still exist
until the end of the scope or until all closure referents to it are
destroyed.</p>
</li>
<li><a name="%25s-argument-is-not-a-HASH-element-or-slice"></a><b>%s argument is not a HASH element or slice</b>
<p>(F) The argument to delete() must be either a hash element, such as</p>
<pre class="verbatim"><ol><li>    $foo{$bar}</li><li>    $ref-&gt;[12]-&gt;{"susie"}</li></ol></pre><p>or a hash slice, such as</p>
<pre class="verbatim"><ol><li>    @foo{$bar, $baz, $xyzzy}</li><li>    @{$ref-&gt;[12]}{"susie", "queue"}</li></ol></pre></li>
<li><a name="Allocation-too-large%3a-%25lx"></a><b>Allocation too large: %lx</b>
<p>(X) You can't allocate more than 64K on an MS-DOS machine.</p>
</li>
<li><a name="Allocation-too-large"></a><b>Allocation too large</b>
<p>(F) You can't allocate more than 2^31+"small amount" bytes.</p>
</li>
<li><a name="Applying-%25s-to-%25s-will-act-on-scalar(%25s)"></a><b>Applying %s to %s will act on scalar(%s)</b>
<p>(W) The pattern match (//), substitution (s///), and transliteration (tr///)
operators work on scalar values.  If you apply one of them to an array
or a hash, it will convert the array or hash to a scalar value (the
length of an array or the population info of a hash) and then work on
that scalar value.  This is probably not what you meant to do.  See
<a href="functions/grep.html">grep</a> and <a href="functions/map.html">map</a> for alternatives.</p>
</li>
<li><a name="Attempt-to-free-nonexistent-shared-string"></a><b>Attempt to free nonexistent shared string</b>
<p>(P) Perl maintains a reference counted internal table of strings to
optimize the storage and access of hash keys and other strings.  This
indicates someone tried to decrement the reference count of a string
that can no longer be found in the table.</p>
</li>
<li><a name="Attempt-to-use-reference-as-lvalue-in-substr"></a><b>Attempt to use reference as lvalue in substr</b>
<p>(W) You supplied a reference as the first argument to substr() used
as an lvalue, which is pretty strange.  Perhaps you forgot to
dereference it first.  See <a href="functions/substr.html">substr</a>.</p>
</li>
<li><a name="Bareword-%22%25s%22-refers-to-nonexistent-package"></a><b>Bareword "%s" refers to nonexistent package</b>
<p>(W) You used a qualified bareword of the form <code class="inline"><span class="w">Foo::</span></code>
, but
the compiler saw no other uses of that namespace before that point.
Perhaps you need to predeclare a package?</p>
</li>
<li><a name="Can't-redefine-active-sort-subroutine-%25s"></a><b>Can't redefine active sort subroutine %s</b>
<p>(F) Perl optimizes the internal handling of sort subroutines and keeps
pointers into them.  You tried to redefine one such sort subroutine when it
was currently active, which is not allowed.  If you really want to do
this, you should write <code class="inline"><a class="l_k" href="functions/sort.html">sort</a> <span class="s">{</span> <span class="i">&amp;func</span> <span class="s">}</span> <span class="i">@x</span></code>
 instead of <code class="inline"><a class="l_k" href="functions/sort.html">sort</a> <span class="i">func</span> <span class="i">@x</span></code>
.</p>
</li>
<li><a name="Can't-use-bareword-(%22%25s%22)-as-%25s-ref-while-%22strict-refs%22-in-use"></a><b>Can't use bareword ("%s") as %s ref while "strict refs" in use</b>
<p>(F) Only hard references are allowed by "strict refs".  Symbolic references
are disallowed.  See <a href="perlref.html">perlref</a>.</p>
</li>
<li><a name="Cannot-resolve-method-%60%25s'-overloading-%60%25s'-in-package-%60%25s'"></a><b>Cannot resolve method `%s' overloading `%s' in package `%s'</b>
<p>(P) Internal error trying to resolve overloading specified by a method
name (as opposed to a subroutine reference).</p>
</li>
<li><a name="Constant-subroutine-%25s-redefined"></a><b>Constant subroutine %s redefined</b>
<p>(S) You redefined a subroutine which had previously been eligible for
inlining.  See <a href="perlsub.html#Constant-Functions">Constant Functions in perlsub</a> for commentary and
workarounds.</p>
</li>
<li><a name="Constant-subroutine-%25s-undefined"></a><b>Constant subroutine %s undefined</b>
<p>(S) You undefined a subroutine which had previously been eligible for
inlining.  See <a href="perlsub.html#Constant-Functions">Constant Functions in perlsub</a> for commentary and
workarounds.</p>
</li>
<li><a name="Copy-method-did-not-return-a-reference"></a><b>Copy method did not return a reference</b>
<p>(F) The method which overloads "=" is buggy. See <a href="overload.html#Copy-Constructor">Copy Constructor in overload</a>.</p>
</li>
<li><a name="Died"></a><b>Died</b>
<p>(F) You passed die() an empty string (the equivalent of <code class="inline"><a class="l_k" href="functions/die.html">die</a> <span class="q">&quot;&quot;</span></code>
) or
you called it with no args and both <code class="inline"><span class="i">$@</span></code>
 and <code class="inline"><span class="i">$_</span></code>
 were empty.</p>
</li>
<li><a name="Exiting-pseudo-block-via-%25s"></a><b>Exiting pseudo-block via %s</b>
<p>(W) You are exiting a rather special block construct (like a sort block or
subroutine) by unconventional means, such as a goto, or a loop control
statement.  See <a href="functions/sort.html">sort</a>.</p>
</li>
<li><a name="Identifier-too-long"></a><b>Identifier too long</b>
<p>(F) Perl limits identifiers (names for variables, functions, etc.) to
252 characters for simple names, somewhat more for compound names (like
<code class="inline"><span class="i">$A::B</span></code>
).  You've exceeded Perl's limits.  Future versions of Perl are
likely to eliminate these arbitrary limitations.</p>
</li>
<li><a name="Illegal-character-%25s-(carriage-return)"></a><b>Illegal character %s (carriage return)</b>
<p>(F) A carriage return character was found in the input.  This is an
error, and not a warning, because carriage return characters can break
multi-line strings, including here documents (e.g., <code class="inline">print &lt;&lt;EOF;</code>).</p>
</li>
<li><a name="Illegal-switch-in-PERL5OPT%3a-%25s"></a><b>Illegal switch in PERL5OPT: %s</b>
<p>(X) The PERL5OPT environment variable may only be used to set the
following switches: <b>-[DIMUdmw]</b>.</p>
</li>
<li><a name="Integer-overflow-in-hex-number"></a><b>Integer overflow in hex number</b>
<p>(S) The literal hex number you have specified is too big for your
architecture. On a 32-bit architecture the largest hex literal is
0xFFFFFFFF.</p>
</li>
<li><a name="Integer-overflow-in-octal-number"></a><b>Integer overflow in octal number</b>
<p>(S) The literal octal number you have specified is too big for your
architecture. On a 32-bit architecture the largest octal literal is
037777777777.</p>
</li>
<li><a name="internal-error%3a-glob-failed"></a><b>internal error: glob failed</b>
<p>(P) Something went wrong with the external program(s) used for <code class="inline"><a class="l_k" href="functions/glob.html">glob</a></code>
and <code class="inline"><span class="q">&lt;*.c&gt;</span></code>
.  This may mean that your csh (C shell) is
broken.  If so, you should change all of the csh-related variables in
config.sh:  If you have tcsh, make the variables refer to it as if it
were csh (e.g. <code class="inline"><span class="w">full_csh</span>=<span class="q">&#39;/usr/bin/tcsh&#39;</span></code>
); otherwise, make them all
empty (except that <code class="inline"><span class="w">d_csh</span></code>
 should be <code class="inline"><span class="q">&#39;undef&#39;</span></code>
) so that Perl will
think csh is missing.  In either case, after editing config.sh, run
<code class="inline">./Configure -S</code> and rebuild Perl.</p>
</li>
<li><a name="Invalid-conversion-in-%25s%3a-%22%25s%22"></a><b>Invalid conversion in %s: "%s"</b>
<p>(W) Perl does not understand the given format conversion.
See <a href="functions/sprintf.html">sprintf</a>.</p>
</li>
<li><a name="Invalid-type-in-pack%3a-'%25s'"></a><b>Invalid type in pack: '%s'</b>
<p>(F) The given character is not a valid pack type.  See <a href="functions/pack.html">pack</a>.</p>
</li>
<li><a name="Invalid-type-in-unpack%3a-'%25s'"></a><b>Invalid type in unpack: '%s'</b>
<p>(F) The given character is not a valid unpack type.  See <a href="functions/unpack.html">unpack</a>.</p>
</li>
<li><a name="Name-%22%25s%3a%3a%25s%22-used-only-once%3a-possible-typo"></a><b>Name "%s::%s" used only once: possible typo</b>
<p>(W) Typographical errors often show up as unique variable names.
If you had a good reason for having a unique name, then just mention
it again somehow to suppress the message (the <code class="inline"><a class="l_k" href="functions/use.html">use</a> <span class="w">vars</span></code>
 pragma is
provided for just this purpose).</p>
</li>
<li><a name="Null-picture-in-formline"></a><b>Null picture in formline</b>
<p>(F) The first argument to formline must be a valid format picture
specification.  It was found to be empty, which probably means you
supplied it an uninitialized value.  See <a href="perlform.html">perlform</a>.</p>
</li>
<li><a name="Offset-outside-string"></a><b>Offset outside string</b>
<p>(F) You tried to do a read/write/send/recv operation with an offset
pointing outside the buffer.  This is difficult to imagine.
The sole exception to this is that <code class="inline"><a class="l_k" href="functions/sysread.html">sysread()</a></code>ing past the buffer
will extend the buffer and zero pad the new area.</p>
</li>
<li><a name="Out-of-memory!"></a><b>Out of memory!</b>
<p>(X|F) The malloc() function returned 0, indicating there was insufficient
remaining memory (or virtual memory) to satisfy the request.</p>
<p>The request was judged to be small, so the possibility to trap it
depends on the way Perl was compiled.  By default it is not trappable.
However, if compiled for this, Perl may use the contents of <code class="inline"><span class="i">$^M</span></code>
 as
an emergency pool after die()ing with this message.  In this case the
error is trappable <i>once</i>.</p>
</li>
<li><a name="Out-of-memory-during-request-for-%25s"></a><b>Out of memory during request for %s</b>
<p>(F) The malloc() function returned 0, indicating there was insufficient
remaining memory (or virtual memory) to satisfy the request. However,
the request was judged large enough (compile-time default is 64K), so
a possibility to shut down by trapping this error is granted.</p>
</li>
<li><a name="panic%3a-frexp"></a><b>panic: frexp</b>
<p>(P) The library function frexp() failed, making printf("%f") impossible.</p>
</li>
<li><a name="Possible-attempt-to-put-comments-in-qw()-list"></a><b>Possible attempt to put comments in qw() list</b>
<p>(W) qw() lists contain items separated by whitespace; as with literal
strings, comment characters are not ignored, but are instead treated
as literal data.  (You may have used different delimiters than the
parentheses shown here; braces are also frequently used.)</p>
<p>You probably wrote something like this:</p>
<pre class="verbatim"><ol><li>    <span class="i">@list</span> = <span class="q">qw(</span></li><li>        <span class="q">a # a comment</span></li><li>        <span class="q">b # another comment</span></li><li>    <span class="q">)</span><span class="sc">;</span></li></ol></pre><p>when you should have written this:</p>
<pre class="verbatim"><ol><li>    <span class="i">@list</span> = <span class="q">qw(</span></li><li>        <span class="q">a</span></li><li>        <span class="q">b</span></li><li>    <span class="q">)</span><span class="sc">;</span></li></ol></pre><p>If you really want comments, build your list the
old-fashioned way, with quotes and commas:</p>
<pre class="verbatim"><ol><li>    <span class="i">@list</span> = <span class="s">(</span></li><li>        <span class="q">&#39;a&#39;</span><span class="cm">,</span>    <span class="c"># a comment</span></li><li>        <span class="q">&#39;b&#39;</span><span class="cm">,</span>    <span class="c"># another comment</span></li><li>    <span class="s">)</span><span class="sc">;</span></li></ol></pre></li>
<li><a name="Possible-attempt-to-separate-words-with-commas"></a><b>Possible attempt to separate words with commas</b>
<p>(W) qw() lists contain items separated by whitespace; therefore commas
aren't needed to separate the items. (You may have used different
delimiters than the parentheses shown here; braces are also frequently
used.)</p>
<p>You probably wrote something like this:</p>
<pre class="verbatim"><ol><li>    <span class="q">qw! a, b, c !</span><span class="sc">;</span></li></ol></pre><p>which puts literal commas into some of the list items.  Write it without
commas if you don't want them to appear in your data:</p>
<pre class="verbatim"><ol><li>    <span class="q">qw! a b c !</span><span class="sc">;</span></li></ol></pre></li>
<li><a name="Scalar-value-%40%25s%7b%25s%7d-better-written-as-%24%25s%7b%25s%7d"></a><b>Scalar value @%s{%s} better written as $%s{%s}</b>
<p>(W) You've used a hash slice (indicated by @) to select a single element of
a hash.  Generally it's better to ask for a scalar value (indicated by $).
The difference is that <code class="inline"><span class="i">$foo</span>{<span class="i">&amp;bar</span>}</code>
 always behaves like a scalar, both when
assigning to it and when evaluating its argument, while <code class="inline"><span class="i">@foo</span>{<span class="i">&amp;bar</span>}</code>
 behaves
like a list when you assign to it, and provides a list context to its
subscript, which can do weird things if you're expecting only one subscript.</p>
</li>
<li><a name="Stub-found-while-resolving-method-%60%25s'-overloading-%60%25s'-in-%25s"></a><b>Stub found while resolving method `%s' overloading `%s' in %s</b>
<p>(P) Overloading resolution over @ISA tree may be broken by importing stubs.
Stubs should never be implicitly created, but explicit calls to <code class="inline"><span class="w">can</span></code>

may break this.</p>
</li>
<li><a name="Too-late-for-%22*-T*%22-option"></a><b>Too late for "<b>-T</b>" option</b>
<p>(X) The #! line (or local equivalent) in a Perl script contains the
<b>-T</b> option, but Perl was not invoked with <b>-T</b> in its argument
list.  This is an error because, by the time Perl discovers a <b>-T</b> in
a script, it's too late to properly taint everything from the
environment.  So Perl gives up.</p>
</li>
<li><a name="untie-attempted-while-%25d-inner-references-still-exist"></a><b>untie attempted while %d inner references still exist</b>
<p>(W) A copy of the object returned from <code class="inline"><a class="l_k" href="functions/tie.html">tie</a></code> (or <code class="inline"><a class="l_k" href="functions/tied.html">tied</a></code>) was still
valid when <code class="inline"><a class="l_k" href="functions/untie.html">untie</a></code> was called.</p>
</li>
<li><a name="Unrecognized-character-%25s"></a><b>Unrecognized character %s</b>
<p>(F) The Perl parser has no idea what to do with the specified character
in your Perl script (or eval).  Perhaps you tried to run a compressed
script, a binary program, or a directory as a Perl program.</p>
</li>
<li><a name="Unsupported-function-fork"></a><b>Unsupported function fork</b>
<p>(F) Your version of executable does not support forking.</p>
<p>Note that under some systems, like OS/2, there may be different flavors of
Perl executables, some of which may support fork, some not. Try changing
the name you call Perl by to <code class="inline"><span class="w">perl_</span></code>
, <code class="inline"><span class="w">perl__</span></code>
, and so on.</p>
</li>
<li><a name="Use-of-%22%24%24%3cdigit%3e%22-to-mean-%22%24%7b%24%7d%3cdigit%3e%22-is-deprecated"></a><b>Use of "$$&lt;digit&gt;" to mean "${$}&lt;digit&gt;" is deprecated</b>
<p>(D) Perl versions before 5.004 misinterpreted any type marker followed
by "$" and a digit.  For example, "$$0" was incorrectly taken to mean
"${$}0" instead of "${$0}".  This bug is (mostly) fixed in Perl 5.004.</p>
<p>However, the developers of Perl 5.004 could not fix this bug completely,
because at least two widely-used modules depend on the old meaning of
"$$0" in a string.  So Perl 5.004 still interprets "$$&lt;digit&gt;" in the
old (broken) way inside strings; but it generates this message as a
warning.  And in Perl 5.005, this special treatment will cease.</p>
</li>
<li><a name="Value-of-%25s-can-be-%220%22%3b-test-with-defined()"></a><b>Value of %s can be "0"; test with defined()</b>
<p>(W) In a conditional expression, you used &lt;HANDLE&gt;, &lt;*&gt; (glob), <code class="inline"><a class="l_k" href="functions/each.html">each()</a></code>,
or <code class="inline"><a class="l_k" href="functions/readdir.html">readdir()</a></code> as a boolean value.  Each of these constructs can return a
value of "0"; that would make the conditional expression false, which is
probably not what you intended.  When using these constructs in conditional
expressions, test their values with the <code class="inline"><a class="l_k" href="functions/defined.html">defined</a></code> operator.</p>
</li>
<li><a name="Variable-%22%25s%22-may-be-unavailable"></a><b>Variable "%s" may be unavailable</b>
<p>(W) An inner (nested) <i>anonymous</i> subroutine is inside a <i>named</i>
subroutine, and outside that is another subroutine; and the anonymous
(innermost) subroutine is referencing a lexical variable defined in
the outermost subroutine.  For example:</p>
<pre class="verbatim"><ol><li><a name="outermost"></a><a name="middle"></a>   sub <span class="m">outermost</span> <span class="s">{</span> <a class="l_k" href="functions/my.html">my</a> <span class="i">$a</span><span class="sc">;</span> sub <span class="m">middle</span> <span class="s">{</span> <a class="l_k" href="functions/sub.html">sub</a> <span class="s">{</span> <span class="i">$a</span> <span class="s">}</span> <span class="s">}</span> <span class="s">}</span></li></ol></pre><p>If the anonymous subroutine is called or referenced (directly or
indirectly) from the outermost subroutine, it will share the variable
as you would expect.  But if the anonymous subroutine is called or
referenced when the outermost subroutine is not active, it will see
the value of the shared variable as it was before and during the
*first* call to the outermost subroutine, which is probably not what
you want.</p>
<p>In these circumstances, it is usually best to make the middle
subroutine anonymous, using the <code class="inline"><a class="l_k" href="functions/sub.html">sub</a> <span class="s">{</span><span class="s">}</span></code>
 syntax.  Perl has specific
support for shared variables in nested anonymous subroutines; a named
subroutine in between interferes with this feature.</p>
</li>
<li><a name="Variable-%22%25s%22-will-not-stay-shared"></a><b>Variable "%s" will not stay shared</b>
<p>(W) An inner (nested) <i>named</i> subroutine is referencing a lexical
variable defined in an outer subroutine.</p>
<p>When the inner subroutine is called, it will probably see the value of
the outer subroutine's variable as it was before and during the
*first* call to the outer subroutine; in this case, after the first
call to the outer subroutine is complete, the inner and outer
subroutines will no longer share a common value for the variable.  In
other words, the variable will no longer be shared.</p>
<p>Furthermore, if the outer subroutine is anonymous and references a
lexical variable outside itself, then the outer and inner subroutines
will <i>never</i> share the given variable.</p>
<p>This problem can usually be solved by making the inner subroutine
anonymous, using the <code class="inline"><a class="l_k" href="functions/sub.html">sub</a> <span class="s">{</span><span class="s">}</span></code>
 syntax.  When inner anonymous subs that
reference variables in outer subroutines are called or referenced,
they are automatically rebound to the current values of such
variables.</p>
</li>
<li><a name="Warning%3a-something's-wrong"></a><b>Warning: something's wrong</b>
<p>(W) You passed warn() an empty string (the equivalent of <code class="inline"><a class="l_k" href="functions/warn.html">warn</a> <span class="q">&quot;&quot;</span></code>
) or
you called it with no args and <code class="inline"><span class="i">$_</span></code>
 was empty.</p>
</li>
<li><a name="Ill-formed-logical-name-%7c%25s%7c-in-prime_env_iter"></a><b>Ill-formed logical name |%s| in prime_env_iter</b>
<p>(W) A warning peculiar to VMS.  A logical name was encountered when preparing
to iterate over %ENV which violates the syntactic rules governing logical
names.  Since it cannot be translated normally, it is skipped, and will not
appear in %ENV.  This may be a benign occurrence, as some software packages
might directly modify logical name tables and introduce nonstandard names,
or it may indicate that a logical name table has been corrupted.</p>
</li>
<li><a name="Got-an-error-from-DosAllocMem"></a><b>Got an error from DosAllocMem</b>
<p>(P) An error peculiar to OS/2.  Most probably you're using an obsolete
version of Perl, and this should not happen anyway.</p>
</li>
<li><a name="Malformed-PERLLIB_PREFIX"></a><b>Malformed PERLLIB_PREFIX</b>
<p>(F) An error peculiar to OS/2.  PERLLIB_PREFIX should be of the form</p>
<pre class="verbatim"><ol><li>    <span class="w">prefix1</span><span class="sc">;</span><span class="w">prefix2</span></li></ol></pre><p>or</p>
<pre class="verbatim"><ol><li>    <span class="w">prefix1</span> <span class="w">prefix2</span></li></ol></pre><p>with nonempty prefix1 and prefix2.  If <code class="inline"><span class="w">prefix1</span></code>
 is indeed a prefix
of a builtin library search path, prefix2 is substituted.  The error
may appear if components are not found, or are too long.  See
"PERLLIB_PREFIX" in <i>README.os2</i>.</p>
</li>
<li><a name="PERL_SH_DIR-too-long"></a><b>PERL_SH_DIR too long</b>
<p>(F) An error peculiar to OS/2. PERL_SH_DIR is the directory to find the
<code class="inline"><span class="w">sh</span></code>
-shell in.  See "PERL_SH_DIR" in <i>README.os2</i>.</p>
</li>
<li><a name="Process-terminated-by-SIG%25s"></a><b>Process terminated by SIG%s</b>
<p>(W) This is a standard message issued by OS/2 applications, while *nix
applications die in silence.  It is considered a feature of the OS/2
port.  One can easily disable this by appropriate sighandlers, see
<a href="perlipc.html#Signals">Signals in perlipc</a>.  See also "Process terminated by SIGTERM/SIGINT"
in <i>README.os2</i>.</p>
</li>
</ul>
<a name="BUGS"></a><h1>BUGS</h1>
<p>If you find what you think is a bug, you might check the headers of
recently posted articles in the comp.lang.perl.misc newsgroup.
There may also be information at <a href="http://www.perl.com/perl/">http://www.perl.com/perl/</a> , the Perl
Home Page.</p>
<p>If you believe you have an unreported bug, please run the <b>perlbug</b>
program included with your release.  Make sure you trim your bug down
to a tiny but sufficient test case.  Your bug report, along with the
output of <code class="inline"><span class="w">perl</span> -<span class="w">V</span></code>
, will be sent off to &lt;<i>perlbug@perl.com</i>&gt; to be
analysed by the Perl porting team.</p>
<a name="SEE-ALSO"></a><h1>SEE ALSO</h1>
<p>The <i>Changes</i> file for exhaustive details on what changed.</p>
<p>The <i>INSTALL</i> file for how to build Perl.  This file has been
significantly updated for 5.004, so even veteran users should
look through it.</p>
<p>The <i>README</i> file for general stuff.</p>
<p>The <i>Copying</i> file for copyright information.</p>
<a name="HISTORY"></a><h1>HISTORY</h1>
<p>Constructed by Tom Christiansen, grabbing material with permission
from innumerable contributors, with kibitzing by more than a few Perl
porters.</p>
<p>Last update: Wed May 14 11:14:09 EDT 1997</p>




  <div id="page_index" class="hud_container">
    <div id="page_index_header" class="hud_header">
      <div id="page_index_close" class="hud_close"><a href="#" onClick="pageIndex.hide();return false;"></a></div>
      <div id="page_index_title" class="hud_title"><span class="hud_span_top">Page index</span></div>
      <div id="page_index_topright" class="hud_topright"></div>
    </div>
    <div id="page_index_content" class="hud_content">
      <ul><li><a href="#NAME">NAME</a><li><a href="#DESCRIPTION">DESCRIPTION</a><li><a href="#Supported-Environments">Supported Environments</a><li><a href="#Core-Changes">Core Changes</a><ul><li><a href="#List-assignment-to-%25ENV-works">List assignment to %ENV works</a><li><a href="#Change-to-%22Can't-locate-Foo.pm-in-%40INC%22-error">Change to "Can't locate Foo.pm in @INC" error</a><li><a href="#Compilation-option%3a-Binary-compatibility-with-5.003">Compilation option: Binary compatibility with 5.003</a><li><a href="#%24PERL5OPT-environment-variable">$PERL5OPT environment variable</a><li><a href="#Limitations-on-*-M*%2c-*-m*%2c-and-*-T*-options">Limitations on *-M*, *-m*, and *-T* options</a><li><a href="#More-precise-warnings">More precise warnings</a><li><a href="#Deprecated%3a-Inherited-AUTOLOAD-for-non-methods">Deprecated: Inherited AUTOLOAD for non-methods</a><li><a href="#Previously-deprecated-%25OVERLOAD-is-no-longer-usable">Previously deprecated %OVERLOAD is no longer usable</a><li><a href="#Subroutine-arguments-created-only-when-they're-modified">Subroutine arguments created only when they're modified</a><li><a href="#Group-vector-changeable-with-%24)">Group vector changeable with $)</a><li><a href="#Fixed-parsing-of-%24%24%3cdigit%3e%2c-%26%24%3cdigit%3e%2c-etc.">Fixed parsing of $$<digit>, &$<digit>, etc.</a><li><a href="#Fixed-localization-of-%24%3cdigit%3e%2c-%24%26%2c-etc.">Fixed localization of $<digit>, $&, etc.</a><li><a href="#No-resetting-of-%24.-on-implicit-close">No resetting of $. on implicit close</a><li><a href="#wantarray-may-return-undef">wantarray may return undef</a><li><a href="#eval-EXPR-determines-value-of-EXPR-in-scalar-context">eval EXPR determines value of EXPR in scalar context</a><li><a href="#Changes-to-tainting-checks">Changes to tainting checks</a><li><a href="#New-Opcode-module-and-revised-Safe-module">New Opcode module and revised Safe module</a><li><a href="#Embedding-improvements">Embedding improvements</a><li><a href="#Internal-change%3a-FileHandle-class-based-on-IO%3a%3a*-classes">Internal change: FileHandle class based on IO::* classes</a><li><a href="#Internal-change%3a-PerlIO-abstraction-interface">Internal change: PerlIO abstraction interface</a><li><a href="#New-and-changed-syntax">New and changed syntax</a><li><a href="#New-and-changed-builtin-constants">New and changed builtin constants</a><li><a href="#New-and-changed-builtin-variables">New and changed builtin variables</a><li><a href="#New-and-changed-builtin-functions">New and changed builtin functions</a><li><a href="#New-builtin-methods">New builtin methods</a><li><a href="#TIEHANDLE-now-supported">TIEHANDLE now supported</a><li><a href="#Malloc-enhancements">Malloc enhancements</a><li><a href="#Miscellaneous-efficiency-enhancements">Miscellaneous efficiency enhancements</a></ul><li><a href="#Support-for-More-Operating-Systems">Support for More Operating Systems</a><ul><li><a href="#Win32">Win32</a><li><a href="#Plan-9">Plan 9</a><li><a href="#QNX">QNX</a><li><a href="#AmigaOS">AmigaOS</a></ul><li><a href="#Pragmata">Pragmata</a><li><a href="#Modules">Modules</a><ul><li><a href="#Required-Updates">Required Updates</a><li><a href="#Installation-directories">Installation directories</a><li><a href="#Module-information-summary">Module information summary</a><li><a href="#Fcntl">Fcntl</a><li><a href="#IO">IO</a><li><a href="#Math%3a%3aComplex">Math::Complex</a><li><a href="#Math%3a%3aTrig">Math::Trig</a><li><a href="#DB_File">DB_File</a><li><a href="#Net%3a%3aPing">Net::Ping</a><li><a href="#Object-oriented-overrides-for-builtin-operators">Object-oriented overrides for builtin operators</a></ul><li><a href="#Utility-Changes">Utility Changes</a><ul><li><a href="#pod2html">pod2html</a><li><a href="#xsubpp">xsubpp</a></ul><li><a href="#C-Language-API-Changes">C Language API Changes</a><li><a href="#Documentation-Changes">Documentation Changes</a><li><a href="#New-Diagnostics">New Diagnostics</a><li><a href="#BUGS">BUGS</a><li><a href="#SEE-ALSO">SEE ALSO</a><li><a href="#HISTORY">HISTORY</a></ul>
    </div>
    <div id="page_index_footer" class="hud_footer">
      <div id="page_index_bottomleft" class="hud_bottomleft"></div>
      <div id="page_index_bottom" class="hud_bottom"><span class="hud_span_bottom"></span></div>
      <div id="page_index_resize" class="hud_resize"></div>
    </div>
  </div>


	    &nbsp;
          </div>
          <div id="content_footer">
          </div>
        </div>
        <div class="clear"></div>
      </div>
      
    <div id="footer">
      <div id="footer_content">
        <div id="footer_strapline">
          perldoc.perl.org - Official documentation for the Perl programming language
        </div>
        <div id="footer_links">
          <div id="address">
            <p class="name">Contact details</p>
            <p class="address">
	      Site maintained by <a href="mailto:jj@jonallen.info">Jon Allen (JJ)</a><br>
	    </p>
            <p class="contact">
              Documentation maintained by the <a href="http://lists.cpan.org/showlist.cgi?name=perl5-porters">Perl 5 Porters</a>
            </p>
          </div>
          <ul class="f1">
            <li>Manual
              <ul class="f2">
                <li><a href="index-overview.html">Overview</a>
                <li><a href="index-tutorials.html">Tutorials</a>
                <li><a href="index-faq.html">FAQs</a>
                <li><a href="index-history.html">Changes</a>
              </ul>
            <li>Reference
              <ul class="f2">
                <li><a href="index-language.html">Language</a>
                <li><a href="index-functions.html">Functions</a>
                <li><a href="perlop.html">Operators</a>
                <li><a href="perlvar.html">Variables</a>
              </ul>
            <li>Modules
              <ul class="f2">
                <li><a href="index-modules-A.html">Modules</a>
                <li><a href="index-pragmas.html">Pragmas</a>
                <li><a href="index-utilities.html">Utilities</a>
              </ul>
            <li>Misc
              <ul class="f2">
                <li><a href="index-licence.html">License</a>
                <li><a href="index-internals.html">Internals</a>
                <li><a href="index-platforms.html">Platforms</a>
              </ul>          </ul>
          <div class="clear"></div>
        </div>
      </div>
      <div id="footer_end">
      </div>
    </div>
      
    </div>
      <script language="JavaScript" type="text/javascript" src="static/exploreperl.js"></script>
      <script language="JavaScript" src="static/combined-20100403.js" type="text/javascript"></script>
<script language="JavaScript" type="text/javascript">
  perldoc.setPath(0);
  perldoc.pageName    = 'perl5004delta';
  perldoc.pageAddress = 'perl5004delta.html';
  perldoc.contentPage = 1;
  explorePerl.render();
  explorePerl.addEvents('explore_anchor');
</script>
    
  </body>
</html>