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

What is the difference between use and require in perl?

463


Explain perl.

548


Where do we require ‘chomp’ and what does it mean?

508


What are the different types of perl operators?

516


How can we create perl programs in unix, windows nt, macintosh and os/2 ?

470






Explain split function in perl?

550


Write a cgi program to show the header part?

513


What are the arguements we normally use for perl interpreter?

499


What is subroutine in perl?

520


what are steps to do to lock the sony ericsson mobile with password?

1802


what is Polymorphism in Perl?

529


Explain perl. When do you use perl for programming? What are the advantages of programming in perl?

457


How do I generate a list of all .html files in a directory?

525


What does perl do in linux?

525


Explain the difference between declarations of 'my' and 'local' variable scope in perl?

492