PERL part- iI - Google Groups

1 downloads 244 Views 272KB Size Report
Sep 2, 2010 - Here's how you get at elements in an array: print $animals[0]; # prints "camel" print $animals[1]; # print
UNIT - 1

PERL PART- II

ATUL NAG LECTURER D E P A R T ME N T O F B I O I N F O R MA T I C S

9/2/2010 BI-535 Comp. Prog. in Bioinfo.

CONDITIONAL AND LOOPING CONSTRUCTS •

If if ( condition ) { ... } elsif ( other condition ) { ... } else { ... }



Program to compare two numbers two strings

8/27/2010 BI-535 Comp. Prog. in Bioinfo.

CONDITIONAL AND LOOPING CONSTRUCTS •

While while ( condition ) { ... }



Program to print odd numbers up to 10

8/27/2010 BI-535 Comp. Prog. in Bioinfo.

CONDITIONAL AND LOOPING CONSTRUCTS •

for for ($i = 0; $i