Code.GeekInterview.com
  I am new, Sign me up!
 
Code Samples Perl
 

Simple PerlScript Loop


Code ResourceAuthor: srinivasaraobora  

Difficulty Level: Beginner

Published: 24th Apr 2009   Read: 1155 times  

Filed in: Perl
Add Comment


 


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 Comment


Members Please Login

Name:  Email: (Optional. Used for Notification)

Title:
 
Comment:
Validation Code: <=>  (Enter this code in text box)





Popular Coders

# Coder NameHits
1. srinivasaraobora5670

Active Coders

# Coder NameCodes
1. srinivasaraobora5

Refined Tags

 

Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact  

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape