RSS Feed

Perl


<!– @page { size: 8.5in 11in; margin: 0.79in } P { margin-bottom: 0.08in } –>

Perl

Features:

1. Parses text

2. Executes programs

3. CGI – Web forms, etc.

4. Supports RegExes (Perl and POSIX)

5. etc.

Task:

1. Print ‘Hello World’ to STDOUT

a. perl -c helloworld.pl – checks the syntax of the script

b. perl helloworld.pl – executes the script

c. chmod +x helloworld.pl && ./helloworld.pl

2. Parse RegExes from the command line

EX

#!/usr/bin/perl –w

Print “hello world”

EX

#!/usr/bin/perl

$var1 = $ARGV[0];

If ($var1 =~ m/test /)

{

print ”success matches of $var1”

}

Else

{

Print “Fail no matche”

}

Advertisements

About Ali abdo

Ali 32 years old from Egypt working as system engineer riding motorcycle to Support and develop Egyptian tourism, spread motorcycling.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: