How can I make a simple Perl program work?

jimbo_carruth

New member
I tried a simple Hello world Program, and a black screen comes up for a fraction of a second but then automatically closes. Source code:

#!/usr/sbin/perl -w

print("Hello world!");

I feel like I have Perl installed correctly...
How do I run a program using the command prompt window?
 
Open a "command prompt" or whatever it's called on your flavor of Windows.

Use 'cd' to get to the directory where your program is:

C:\> cd \files
C:\> perl myprogram.pl
 
Back
Top