By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,249 Members | 1,222 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,249 IT Pros & Developers. It's quick & easy.

perl recursion

P: 1
Hi all,

Does perl supports recursive function calls ?
Feb 6 '08 #1
Share this Question
Share on Google+
1 Reply


nithinpes
Expert 100+
P: 410
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.