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.
11 lines
171 B
Perl
11 lines
171 B
Perl
#!/usr/local/bin/perl
|
|
|
|
use strict;
|
|
use warnings;
|
|
|
|
printf("<pre>\n");
|
|
while (<>) {
|
|
s/([\w\.\-]+)\.html/<a href=\"$1.html\">$1<\/a>/g;
|
|
print;
|
|
}
|
|
printf("</pre>\n");
|