469,295 Members | 1,959 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,295 developers. It's quick & easy.

perl recursion

Hi all,

Does perl supports recursive function calls ?
Feb 6 '08 #1
1 1329
nithinpes
410 Expert 256MB
Hi all,

Does perl supports recursive function calls ?


Yes, it does. As a simple example:
Expand|Select|Wrap|Line Numbers
  1. $i=0;
  2. myp();
  3.  
  4. sub myp 
  5. {
  6.    $i++;
  7.    print "Hi\n" ;
  8.    myp() if($i<10);
  9. }
  10.  
  11.  
Feb 6 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

5 posts views Thread by Peri | last post: by
4 posts views Thread by B McInnes | last post: by
12 posts views Thread by da Vinci | last post: by
43 posts views Thread by Lorenzo Villari | last post: by
75 posts views Thread by Sathyaish | last post: by
18 posts views Thread by MTD | last post: by
20 posts views Thread by athar.mirchi | last post: by
35 posts views Thread by Muzammil | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by harlem98 | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.