CoolInterview.com - World's Largest Collection of Interview Questions
Send Free SMS
 Interview Questions  
 Our Services  


INTERVIEW QUESTIONS LANGUAGES PERL DETAILS
Question :
Difference between for & foreach,exec & system?


Category Perl Interview Questions
Rating (0.0) By 0 users
Added on 7/19/2006
Views 1086
Rate it!
Answers:

- Technically, there's no difference between for and foreach other than some style issues.



One is an alias of another. You can do things like this



foreach (my $i = 0; $i < 3; ++$i)

{ # normally this is foreach print $i, "n";}



for my $i (0 .. 2)

{ # normally this is for print $i, "n";}



- exec runs the given process, switches to its name and never returns while system forks off the given process, waits for it to complete and then returns.





If you have the better answer, then send it to us. We will display your answer after the approval.
Name :*
Email Id :*
Answer :*
Verification Code Code Image - Please contact webmaster if you have problems seeing this image code Not readable? Load New Code
Process Verification  Enter the above shown code:*
Inform me about updated answers to this question

   
Related Questions
View Answer
Where do you go for perl help?

View Answer
Name an instance you used in CPAN module?

View Answer
When do you not use Perl for a project?

View Answer
How do you connect to database in perl

View Answer
What is your experience of interfacing Perl to database?

View Answer
What are the benefits of having global and local variables?

View Answer
Advantages of C over perl?

View Answer
"perl regular expressions are greedy" what does this mean?

View Answer
what does this mean :
'$_' ?

View Answer
What does the word '&myvariable' mean?
What does the symbol '&' means? What's purpose of it?

View Answer

Please Note: We keep on updating better answers to this site. Subscribe to our newsletter to get notified when better answer is posted.

Notify me when better answer is posted!
Email:

View ALL Perl Interview Questions

User Options
Sponsored Links


Copyright ©2003-2010 CoolInterview.com, All Rights Reserved.
Privacy Policy | Terms and Conditions
Page URL: http://www.coolinterview.com/interview/6199/default.asp?cachecommand=bypass


Download Yahoo Messenger | Placement Papers| FREE SMS | ASP .Net Tutorial | Web Hosting | Free SMS | Dedicated Servers | Joke of the Day

0.7