Code.GeekInterview.com
 
Code Samples Perl
 

Simple PerlScript Loop


Code ResourceAuthor: srinivasaraobora  

Difficulty Level: Beginner

Published: 24th Apr 2009   Read: 2971 times  

Filed in: Perl
Add Comment


 

 

Sponsored Links


 

 

This Script shows how to use for loop in perl.

 


Sample Code
  1. #!/usr/bin/perl
  2.  
  3. # countdown.plx
  4.  
  5. use warnings;
  6.  
  7. use strict;
  8.  
  9.  
  10.  
  11. my @count = (1..5);
  12.  
  13. for (reverse(@count)) {
  14.  
  15.         print "$_...n";
  16.  
  17.         sleep 1;
  18.  
  19. }
  20.  
  21.  
  22.  
  23. print "BLAST OFF!n";
  24.  
  25.  
Copyright GeekInterview.com


Next: PerlScript HTML Form


 

Latest Code Samples

 

Popular Code Samples

 

Related Code Samples

 

Post Your Comment:

Members Please Login
Your Name:*
e-mail ID:(required for notification)*
Image Verification: 
 
 Subscribe    



Popular Coders

# Coder NameHits
1. srinivasaraobora17446

Active Coders

# Coder NameCodes
1. srinivasaraobora5

Refined Tags