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

Answer Posted / satish kumar golukonda

for and foreach works alike.
But for uses condition expression, where as foreach works on
ranges, contineous indexing.

Is This Answer Correct ?    10 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain perl. What are the advantages of programming in perl?

558


Which statement has an initialization, condition check and increment expressions in its body? Write a syntax to use that statement.

536


What can be done for efficient parameter passing in perl?

470


Can inheritance be used in perl?

542


Explain returning values from subroutines?

531






You want to empty an array. How would you do that?

471


how to connect cisco switch uisng perl script

3377


Explain the arguments for perl interpreter.

519


How will you open a file in read-only mode in perl?

500


If EXPR is an arbitrary expression, what is the difference between $Foo::{EXPR} and *{"Foo::".EXPR}?

504


What is automatic error handling in perl?

492


Hi, I am a accountant. I am preparing a balance sheet but because of staff shortage and time pressures I cant complete it on time. There is lot of common data with last years which I need not retype and I can manage by editing last year’s balance sheet ? Is their any software on net where I can do this easily??

1752


How do I do fill_in_the_blank for each file in a directory?

539


Comment on the scope of variables in perl.

519


What does this symbol mean '->'?

525