Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › How to run a perl program in windows?
New Posts  All Forums:Forum Nav:

How to run a perl program in windows? - Page 2

post #11 of 13
You can still run perl in windows, it is possible. Yes it is easier in *nix though. You could always setup vmware and install ubuntu in vmware. So then you wouldn't need to reboot.

what version of Perl is it? 5.6 or 5.8 or something else.
If its 5.6 are newer then after your first line definitly add the line:
use warnings;

It'll help you a lot in finding out what went wrong where if theres a bug.

If its older then add a:
-w
at the end of the first line.

To run it in windows though you'll have to open a terminal/console.

Quote:
Is there a free compiler that can turn the script to an executable for free?
Look into Perl2exe.
BlackMesa
(14 items)
 
  
CPUMotherboardGraphicsRAM
Phenom II x6 Gigabyte XFX RF460 16gb G.Skill 
Hard DriveHard DriveOSMonitor
OCZ Vertex2 Sata II Coorsair Force GS Sata III Debian (testing) Shimian 27" 
KeyboardMouse
Filco w/ blue cherries Who needs a mouse? 
  hide details  
Reply
BlackMesa
(14 items)
 
  
CPUMotherboardGraphicsRAM
Phenom II x6 Gigabyte XFX RF460 16gb G.Skill 
Hard DriveHard DriveOSMonitor
OCZ Vertex2 Sata II Coorsair Force GS Sata III Debian (testing) Shimian 27" 
KeyboardMouse
Filco w/ blue cherries Who needs a mouse? 
  hide details  
Reply
post #12 of 13
Thread Starter 
Quote:
Originally Posted by dangerousHobo View Post
You can still run perl in windows, it is possible. Yes it is easier in *nix though. You could always setup vmware and install ubuntu in vmware. So then you wouldn't need to reboot.

what version of Perl is it? 5.6 or 5.8 or something else.
If its 5.6 are newer then after your first line definitly add the line:
use warnings;

It'll help you a lot in finding out what went wrong where if theres a bug.

If its older then add a:
-w
at the end of the first line.

To run it in windows though you'll have to open a terminal/console.


Look into Perl2exe.


ok so i opened a terminal, upened perl.exe from the activeperl install and it opened a terminal but i still dont know how to run the program from there. can someone explain exactly how to do this?
My System
(13 items)
 
  
CPUMotherboardGraphicsRAM
AMD X2 4800 Brisbane Gigabyte GA-M55Plus-s3g EVGA 7600GS 1gb 
Hard DriveOSMonitorPower
1x160, 1x120, 1x40 1x20 Win Vista Ultimate sceptre 20 inch widescreen Orion 580 Watt 
  hide details  
Reply
My System
(13 items)
 
  
CPUMotherboardGraphicsRAM
AMD X2 4800 Brisbane Gigabyte GA-M55Plus-s3g EVGA 7600GS 1gb 
Hard DriveOSMonitorPower
1x160, 1x120, 1x40 1x20 Win Vista Ultimate sceptre 20 inch widescreen Orion 580 Watt 
  hide details  
Reply
post #13 of 13
Try running this test script.
Code:
use warnings;
print "Hello World\
";
and save it as something like, hello_world.pl
then you should be able to run it from the terminal by typing: perl c:\\path\\hello_world.pl

Don't use the shebang symbol either(the #!);
For some more info, here.
BlackMesa
(14 items)
 
  
CPUMotherboardGraphicsRAM
Phenom II x6 Gigabyte XFX RF460 16gb G.Skill 
Hard DriveHard DriveOSMonitor
OCZ Vertex2 Sata II Coorsair Force GS Sata III Debian (testing) Shimian 27" 
KeyboardMouse
Filco w/ blue cherries Who needs a mouse? 
  hide details  
Reply
BlackMesa
(14 items)
 
  
CPUMotherboardGraphicsRAM
Phenom II x6 Gigabyte XFX RF460 16gb G.Skill 
Hard DriveHard DriveOSMonitor
OCZ Vertex2 Sata II Coorsair Force GS Sata III Debian (testing) Shimian 27" 
KeyboardMouse
Filco w/ blue cherries Who needs a mouse? 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Coding and Programming
Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › How to run a perl program in windows?