Solving Perl Issues: Strawberry vs. ActivePerl

  • Thread starter Thread starter Benjamin113
  • Start date Start date
AI Thread Summary
Issues with Strawberry Perl often stem from misunderstandings about how to execute Perl scripts rather than inherent problems with the software itself. Users have reported that their code does not run and simply advances to the next line without error messages, which may indicate a syntax error or incorrect execution method. To run a Perl script, it is essential to create a file with a .pl extension and execute it through the command prompt using the 'perl' command followed by the file path. Strawberry Perl is noted for its additional utilities for managing CPAN modules, while ActivePerl is used less frequently and primarily on Windows. The discussion highlights the importance of understanding the command line interface and how to properly execute scripts, which can alleviate many common issues faced by beginners.
Benjamin113
Messages
29
Reaction score
0
I don't know if this is the right forum to be asking this, but I have been having some problems with the Strawberry Perl that I downloaded. Whenever I try to write lines of code, it will not work, and it moves on to the next line, without an error comment, or anything.

Is this because it is open source coding? Or something else?




Also, as a side question: Which is better, Strawberry Perl, or ActivePerl? Or, what's the difference?
 
Technology news on Phys.org
Benjamin113 said:
I don't know if this is the right forum to be asking this, but I have been having some problems with the Strawberry Perl that I downloaded. Whenever I try to write lines of code, it will not work, and it moves on to the next line, without an error comment, or anything.

Is this because it is open source coding? Or something else?

I'm a little unclear on what you're doing exactly-- I tried Strawberry Perl just now, and used Notepad to write a quickie test program-- that seemed to work fine. What utility are you using to write your Perl code?

Benjamin113 said:
Which is better, Strawberry Perl, or ActivePerl? Or, what's the difference?

I've only ever used ActivePerl on Windows (which hasn't been all that often in itself). Looks like Strawberry Perl has some extra utilities for grabbing CPAN modules and so forth:

http://en.wikipedia.org/wiki/Strawberry_Perl

(see the bottom for comparison to Active Perl)

DaveE
 
When I write the most basic of codes, it will not run, per se.
Perhaps it was/is a syntax error? I'm just starting to learn Perl, so I'm not sure how exactly it (the syntax) is set up.

Give me a sample line for me to run, and I'll see if it works.It might be as basic as a PRN issue as well
 
^I mean that I have had some issues with that before
 
So-- are you trying to run Perl commands on the command line? That may just be a misunderstanding of how you use Perl? Try this:

Create a file using Windows Notepad:
C:\temp\test.pl

Code:
print "hello, world!\n";

Now, bring up the command prompt, by clicking on the "Perl (command line)" link under Strawberry Perl, or by using Start -> Run ... -> cmd, or Start -> Accessories -> Command Prompt. Or whatever your preference. Then type:

Code:
perl C:\temp\test.pl

Now, your test code should run.

Technically, where Strawberry Perl installs a link that says "Perl (command line)", I think all it's doing is getting you to the command prompt. You're not actually in a Perl line interpreter or anything, although I can see that it might be confusing that way. All it does is get you to the command line so that you can run Perl programs that you've written elsewhere. The only thing it MIGHT do (it seems like it doesn't need to, but I'm not sure), is set your %PATH% to include Perl, so that you don't have to bother typing out the full directory path for Perl every time (that would be annoying).

Now, what would be cool is if you could run your Perl programs without having to type "perl" before them, just like in UNIX/Linux. But I'm not sure how to do that, really. You could update the registry so that double-clicking them invoked Perl, but I'm not sure you could do the same thing on the command line? That'd be occasionally handy, if so.

DaveE
 
Thread 'Is this public key encryption?'
I've tried to intuit public key encryption but never quite managed. But this seems to wrap it up in a bow. This seems to be a very elegant way of transmitting a message publicly that only the sender and receiver can decipher. Is this how PKE works? No, it cant be. In the above case, the requester knows the target's "secret" key - because they have his ID, and therefore knows his birthdate.
Back
Top