Solving Perl Issues: Strawberry vs. ActivePerl

  • Thread starter Benjamin113
  • Start date
In summary, Strawberry Perl is an open source alternative to ActivePerl, which is more popular. Strawberry Perl has extra utilities for grabbing CPAN modules, and ActivePerl has a command prompt that you can run Perl programs without having to type "perl".
  • #1
Benjamin113
30
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
  • #2
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
 
  • #3
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
 
  • #4
^I mean that I have had some issues with that before
 
  • #5
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
 

Related to Solving Perl Issues: Strawberry vs. ActivePerl

1. What is the difference between Strawberry and ActivePerl?

Strawberry Perl and ActivePerl are two popular distributions of the Perl programming language. While both offer a complete Perl environment for Windows operating systems, there are some key differences between the two. Strawberry Perl is an open-source distribution, while ActivePerl is a commercial product. Additionally, Strawberry Perl includes a C compiler and development tools, while ActivePerl does not.

2. Which one should I use for my project?

The choice between Strawberry and ActivePerl ultimately depends on your specific needs and preferences. If you are looking for a free and open-source option with development tools included, Strawberry Perl may be the better choice. However, if you are working on a commercial project and can afford to pay for a more comprehensive and supported distribution, ActivePerl may be the better option.

3. Can I switch between Strawberry and ActivePerl?

Yes, it is possible to switch between Strawberry and ActivePerl on your computer. However, it is not recommended to have both distributions installed at the same time, as they may conflict with each other. If you wish to switch from one to the other, it is best to completely uninstall one before installing the other.

4. Are there any compatibility issues between Strawberry and ActivePerl?

In general, code written in Strawberry Perl should be compatible with ActivePerl and vice versa. However, there may be some differences in certain modules or libraries that could cause compatibility issues. It is always a good idea to thoroughly test your code on both distributions before deploying it.

5. Can I use both Strawberry and ActivePerl together in my project?

While it is possible to have both Strawberry and ActivePerl installed on your computer, it is not recommended to use them together in the same project. This can lead to conflicts and compatibility issues. It is best to stick with one distribution for a given project to avoid any complications.

Similar threads

  • Programming and Computer Science
Replies
5
Views
2K
  • Programming and Computer Science
Replies
12
Views
3K
  • General Discussion
Replies
5
Views
698
  • Programming and Computer Science
Replies
14
Views
1K
  • Programming and Computer Science
Replies
6
Views
983
  • Programming and Computer Science
Replies
1
Views
1K
  • Programming and Computer Science
Replies
8
Views
2K
  • Programming and Computer Science
Replies
3
Views
389
  • Programming and Computer Science
Replies
0
Views
664
  • Programming and Computer Science
Replies
11
Views
923
Back
Top