What is the difference between for & foreach, exec &
system?

Answer Posted / maheswar reddy

The For and Foreach loop works quite same......but
Foreach loop is best way to access dynamic arrays.If we don't know the size of the array then we can't mention the range for the "FOR LOOP" in this case for loop is best

Is This Answer Correct ?    5 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

When does circular reference occur?

693


What is the difference between single (') and double (") quote in a string in perl?

649


What does Perl do if you try to exploit the execve(2) race involving setuid scripts?

716


Write syntax to add two arrays together in perl?

699


How to turn on Perl warnings? Why is that important?

750


What is chomp() operator/function?

740


If you want to empty an array then how would you do that?

772


Explain the different types of data perl can handle.

678


Why is it hard to call this function: sub y { "because" } ?

711


Does Perl have reference type?

708


what is the function that is used to identify how many characters are there in a string?

720


What are perl strings?

674


What happens in dereferencing?

715


What are the steps involved in configuring a server using cgi programming?

664


What is the function of virtual documents in cgi programs?

724