I found the answer to my problem, even if I don't really understand why.

I uninstalled the ActivePerl I was using, ActivePerl-5.24.2.2403-MSWin32-x64-403863.exe and installed the 32-bit version ActivePerl-5.24.2.2403-MSWin32-x86-64int-403863.exe.

My code now works...but things look funny. My PERLLIB still needs to reference the Perl64 (empty) directory, as does @INC, but the installer used the Perl directory. The PATH is set correctly to C:\Perl\site\bin;C:\Perl\bin

I'm including the output of perl -V below.

Summary of my perl5 (revision 5 version 24 subversion 2) configuration +: Platform: osname=MSWin32, osvers=6.1, archname=MSWin32-x86-multi-thread-64in +t uname='' config_args='undef' hint=recommended, useposix=true, d_sigaction=undef useithreads=define, usemultiplicity=define use64bitint=define, use64bitall=undef, uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='undef', ccflags =' -s -O2 -DWIN32 -DPERL_TEXTMODE_SCRIPTS -DUS +E_SITECUSTOMIZE -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -fwrapv - +fno-strict-aliasing -mms-bitfields', optimize='-s -O2', cppflags='-DWIN32' ccversion='', gccversion='4.6.3', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=12345678 +, doublekind=3 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=1 +2, longdblkind=3 ivtype='long long', ivsize=8, nvtype='double', nvsize=8, Off_t='lo +ng long', lseeksize=8 alignbytes=8, prototype=define Linker and Libraries: ld='undef', ldflags ='-s -static-libgcc -static-libstdc++ -L"C:\Pe +rl\lib\CORE" -L"C:\MinGW\i686-w64-mingw32\lib"' libpth=C:\MinGW\i686-w64-mingw32\lib libs=-lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 +-ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -l +mpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32 perllibs=-lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdl +g32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_3 +2 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32 libc=, so=dll, useshrplib=true, libperl=libperl524.a gnulibc_version='' Dynamic Linking: dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' ' cccdlflags=' ', lddlflags='-mdll -s -static-libgcc -static-libstdc +++ -L"C:\Perl\lib\CORE" -L"C:\MinGW\i686-w64-mingw32\lib"' Characteristics of this binary (from libperl): Compile-time options: HAS_TIMES HAVE_INTERP_INTERN MULTIPLICITY PERLIO_LAYERS PERL_COPY_ON_WRITE PERL_DONT_CREATE_GVSV PERL_HASH_FUNC_ONE_AT_A_TIME_HARD PERL_IMPLICIT_CONTEXT PERL_IMPLICIT_SYS PERL_MALLOC_WRAP PERL_PRESERVE_IVUV USE_64_BIT +_INT USE_ITHREADS USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_LOCALE_TIME USE_PERLIO USE_PERL_ATOF USE_SITECUSTOMIZE Locally applied patches: ActivePerl Build 2403 [403863] Built under MSWin32 Compiled at Aug 25 2017 05:28:36 %ENV: PERLLIB="C:/Perl64/site/lib/Devel;C:/Perl64/Digest;C:/Perl64/site/ +lib/LWP/Protocol;C:/Perl64/site/lib/Crypt;C:/Perl64/site/lib/SSLeay;C +:/Perl64/site/lib/ExtUtils;C:/Perl64/site/lib/LWP;C;/Perl64/lib/ExtUt +ils;C:/Perl64/lib/Crypt;C:/Perl64/lib/Crypt/SSLeay;c:/Perl64/lib/HTTP +/UserAgent/Cookies;c:/Perl64/lib/ExtUtils/WWW/Mechanize" @INC: C:/Perl64/site/lib/Devel C:/Perl64/Digest C:/Perl64/site/lib/LWP/Protocol C:/Perl64/site/lib/Crypt C:/Perl64/site/lib/SSLeay C:/Perl64/site/lib/ExtUtils C:/Perl64/site/lib/LWP C /Perl64/lib/ExtUtils C:/Perl64/lib/Crypt C:/Perl64/lib/Crypt/SSLeay c:/Perl64/lib/HTTP/UserAgent/Cookies c:/Perl64/lib/ExtUtils/WWW/Mechanize C:/Perl/site/lib C:/Perl/lib .

In reply to Re^7: Bareword error in WWW::Mechanize by Old_Hat
in thread WWW::Mechanize “use constant xx” gets bareword error by Old_Hat

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.