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/‘/&lsquo;/g;

Lots more entity substitution lines, omitted for brevity

$book =~ s/ü/&uuml;/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

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.