Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^10: Flummoxed by strict.pm

by CaptainRob (Novice)
on May 08, 2010 at 16:13 UTC ( [id://839027]=note: print w/replies, xml ) Need Help??


in reply to Re^9: Flummoxed by strict.pm
in thread Flummoxed by strict.pm

Thanks ikegami for providing some insight

This is what I got:

C:\>assoc .pl File association not found for extension .pl C:\>.pl=Perl '.pl' is not recognized as an internal or external command, operable program or batch file. C:\>assoc .pl=Perl Access is denied. Error occurred while processing: .pl. C:\>ftype Perl File type 'Perl' not found or no open command associated with it. C:\>ftype Perl="C:\Perl64\bin\perl.exe" "%1" %* File type 'Perl' not found or no open command associated with it. C:\>cd.. C:\>cd perl64 C:\Perl64>cd bin C:\Perl64\bin>assoc .pl File association not found for extension .pl C:\Perl64\bin>

I am probably misinterpreting what you're asking me to do. But thanks for your interest and patience

Replies are listed 'Best First'.
Re^11: Flummoxed by strict.pm
by ikegami (Patriarch) on May 08, 2010 at 17:45 UTC
    What? As far as I know, the following would indicate that your Windows doesn't know how to execute .pl files:
    C:\>assoc .pl File association not found for extension .pl

    But you showed it executing a .pl right here:

    C:\Perl64\bin>entities_99.pl Can't locate strict.pm in @INC (@INC contains: .) at C:\Perl64\bin\ent +ities_99.pl line 2. BEGIN failed--compilation aborted at C:\Perl64\bin\entities_99.pl line + 2.
    Is that actually what you typed? I noticed you just typed "en" later on. What's "en"?

      Thanks again for pursuing this thread, ikegami

      So that I would be sure that I had perl working, I did a hello world as follows:

      #!/usr/bin/perl -w print "Hello, world!\n";

      For which I got this:

      C:\Perl64\bin>Hello_world_test.pl Hello, world!

      Naturally, I added a 'use strict;' line as follows to the script:

      #!/usr/bin/perl -w use strict; print "Hello, world!\n";

      For which I got:

      C:\Perl64\bin>Hello_world_test.pl Can't locate strict.pm in @INC (@INC contains: .) at C:\Perl64\bin\Hel +lo_world_t est.pl line 2. BEGIN failed--compilation aborted at C:\Perl64\bin\Hello_world_test.pl + line 2.

      I can find strict.pm in lib, but apparently Perl can't

      Does this suggest an approach? If you are bored with this thread, I shall certainly understand.

        What output do you get if you add this to the end of your Hello_world_test.pl script?

        #!/usr/bin/perl -w print "Hello, world!\n"; print "$^X\n";

        Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
        "Science is about questioning the status quo. Questioning authority".
        In the absence of evidence, opinion is indistinguishable from prejudice.
        I don't know how Windows knows to execute Perl for .pl for you*, and I don't know which Perl it finds, but I suspect that the following will work without error:
        C:\Perl64\bin>perl Hello_world_test.pl

        If so, you might find $^X to differ depending on whether you launch the script via the extension (no leading "perl") or via the path (with leading "perl").

        * — I suspect the association is there, but the same permission issue that's preventing you changing it is also silently preventing you from seeing it.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://839027]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2024-03-28 23:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found