CaptainRob has asked for the wisdom of the Perl Monks concerning the following question:
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Flummoxed by strict.pm
by BrowserUk (Patriarch) on May 07, 2010 at 03:05 UTC | |
by CaptainRob (Novice) on May 07, 2010 at 21:11 UTC | |
by BrowserUk (Patriarch) on May 07, 2010 at 21:33 UTC | |
by CaptainRob (Novice) on May 07, 2010 at 22:54 UTC | |
by BrowserUk (Patriarch) on May 07, 2010 at 23:54 UTC | |
| |
by Anonymous Monk on Mar 08, 2012 at 09:09 UTC | |
|
Re: Flummoxed by strict.pm
by ikegami (Patriarch) on May 07, 2010 at 05:34 UTC | |
|
Re: Flummoxed by strict.pm
by sflitman (Hermit) on May 07, 2010 at 05:26 UTC | |
|
Re: Flummoxed by strict.pm
by ikegami (Patriarch) on May 07, 2010 at 05:41 UTC | |
|
Re: Flummoxed by strict.pm
by rovf (Priest) on May 07, 2010 at 07:18 UTC | |
by Anonymous Monk on Oct 29, 2011 at 12:53 UTC | |
by Anonymous Monk on Oct 29, 2011 at 13:18 UTC | |
|
Re: Flummoxed by strict.pm
by Khen1950fx (Canon) on May 07, 2010 at 02:32 UTC | |
|
Re: Flummoxed by strict.pm
by CaptainRob (Novice) on May 07, 2010 at 16:49 UTC |