faqts : Computers : Programming : Languages : Perl

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

2 of 4 people (50%) answered Yes
Recently 2 of 4 people (50%) answered Yes

Entry

Perl: Program: Simple: Run: How to run a 'hello world' program from the MSDOS command line?

Sep 25th, 2004 09:01
Knud van Eeden,


----------------------------------------------------------------------
--- Knud van Eeden --- 25 September 2004 - 05:48 pm ------------------
Perl: Program: Simple: Run: How to run a 'hello world' program from 
the MSDOS command line?
---
Steps: Overview:
 1. -Save the following text in a file
     (e.g. as 'c:\temp\myhelloworld.pl')
--- cut here: begin --------------------------------------------------
print "Hello world from ActivePerl";
print "<BR>";
print "How do you do!";
print "<BR>";
print "My name is Knud!";
--- cut here: end ----------------------------------------------------
 2. -Goto the directory of your Perl executable
e.g.
--- cut here: begin --------------------------------------------------
c:
cd c:\perl\bin
--- cut here: end ----------------------------------------------------
 3. -Run your program by writing the filename as a parameter
     of your perl.exe program
in general:
 <your perl executable> <your perl filename>
---
e.g.
--- cut here: begin --------------------------------------------------
 perl.exe c:\temp\myhelloworld.pl
--- cut here: end ----------------------------------------------------
 4. -That will show e.g. as output:
--- cut here: begin --------------------------------------------------
Hello world from ActivePerl<BR>How do you do!<BR>My name is Knud!
--- cut here: end ----------------------------------------------------
---
---
Tested successfully on Microsoft Windows XP Professional, running 
Active Perl.
---
---
Internet: see also:
---
----------------------------------------------------------------------