Questions about this topic? Sign up to ask in the talk tab.

Difference between revisions of "Perl/Basics/Your First Program/Code"

From NetSec
Jump to: navigation, search
(Created page with "To run this code, you'll only need to put it in a text file. Save it as "hello.pl", and then you can execute the following to run it from either cygwin or bash: * chmod +x h...")
 
 
(No difference)

Latest revision as of 01:05, 19 July 2012

To run this code, you'll only need to put it in a text file. Save it as "hello.pl", and then you can execute the following to run it from either cygwin or bash:

  • chmod +x hello.pl
  • ./hello.pl

Alternatively you can simply type:

  • perl hello.pl

<syntaxhighlight lang="perl">#!/usr/bin/perl use strict; use warnings; print "Hello world!\n";</syntaxhighlight>