1 / 4

Perl

Perl . A simple test. Test program. Download and install ActivePerl 5.14.2 (x86) Download and install notepad++ installer First perl program: hi .pl #!/ usr/bin/perl print &quot;Hi my name is Denis and I am from CORK <br> “; print is reserved word “ “ string start and end

thao
Download Presentation

Perl

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Perl A simple test

  2. Testprogram • 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) cdyourfolder

  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

More Related