Use strict & warnings. Fix several minor bugs uncovered by it.
Semantics of assigning to $[ changed in Perl 5, and its use is `highly discouraged'. Programs obviously assumed $[ affects all arrays, but it doesn't in Perl 5. If these programs ever worked, then certainly not with Perl 5. Remove the assignments and shift indexes accordingly.
This commit is contained in:
parent
dfb337891d
commit
759d3185ad
5 changed files with 76 additions and 56 deletions
|
@ -1,5 +1,8 @@
|
|||
#!/usr/local/bin/perl
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
printf("<pre>\n");
|
||||
while (<>) {
|
||||
s/([\w\.\-]+)\.html/<a href=\"$1.html\">$1<\/a>/g;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue