cmd: opens the dos window. Move to directory where you save the file and at the command prompt type: perl hi.pl"> cmd: opens the dos window. Move to directory where you save the file and at the command prompt type: perl hi.pl">

Presentation is loading. Please wait.

Presentation is loading. Please wait.

Perl A simple test.

Similar presentations


Presentation on theme: "Perl A simple test."— Presentation transcript:

1 Perl A simple test

2 Test program Download and install ActivePerl 5.14.2 (x86)
Download and install notepad++ installer First perl program: hi.pl #!/usr/bin/perl print "Hi my name is Denis and I am from CORK \n “; print is reserved word “ “ string start and end \n moves the cursor to next line ; terminates each line (like a .) Open notepad/notepad++ and type the above Save file as hi.pl Ensure that hide file extensions option is unchecked if using notepad. Run via the command line start->cmd: opens the dos window. Move to directory where you save the file and at the command prompt type: perl hi.pl

3 Output of “Hi” program Important: c:\Perlcode> is the folder I am storing my perl programs if you are storing them in a different location ensure you change the director to that location: c: (the drive) cd yourfolder

4 Exercise 1 Write a perl program that will display the following:
My name is your name; e.g.Denis I am from ; e.g. Cork I am currently doing the DT249 course This course is called …… Run code (via commandline) to verify it works


Download ppt "Perl A simple test."

Similar presentations


Ads by Google