Monks! (& ladies, one hopes),
First, thanks for looking at this post. Newbie, and what's worse, a Windows guy until I grow up and get a real OS.
Nonetheless, I am being flummoxed running a perl script from the command line. The script is meant to process an HTML file and change out the unicode characters for HTML entities, e.g. " goes to &rdquo.
The command line & the error message is:
C:\Perl64>entities_99.pl
Can't locate strict.pm in @INC (@INC contains: .) at C:\Perl64\bin\entities_99.pl line 2.
BEGIN failed--compilation aborted at C:\Perl64\bin\entities_99.pl line 2
So, where do I direct my script to find strict.pm?
Here's the script:
#!/usr/bin/perl use strict; use Data::Dumper; $|=1; #makes the macro produce all results at once, not in spurts my $filename = "RAH99.html"; my $output = $filename; my $backupoutput = $filename; my $backupoutput =~ s{\.html*}{.entbackup.html}i; open (IN, $filename); my $book = join('',<IN>); close IN; open (OUT, ">$backupoutput"); print OUT $book; close OUT; $book =~ s/‘/‘/g;
Lots more entity substitution lines, omitted for brevity
$book =~ s/ü/ü/g; my $utf8 = qq!<meta http-equiv="Content-Type" content="text/html; char +set=UTF-8" />!; $book = "I have changed the most common Unicode characters into HTML e +ntities.\n\nUse this search term to find any leftovers: [€-ÿ]\n\nAlso +, don't forget to add a UTF-8 meta tag to your header:\n\n$utf8\n\n". +$book; open (OUT, ">$filename"); print OUT $book; close OUT;
So, why wouldn't ActiveState have strict.pm, well, never mind that; how do I find strict.pm to make this script work?
Or any other comment that could make this work
Many thanks to any and all Monks who can take the time to assist a wandering Newbie
Captain Rob
In reply to Flummoxed by strict.pm by CaptainRob
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |