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

Answer Posted / mvamsi

Hi Ramesh, You mean to say that we can't capture output of
the program by using exec function. But its working in my PC.
my $ls = exec('ls');

Is This Answer Correct ?    2 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is hash?

548


Explain the meaning of closure in perl.

518


Why to use perl?

533


Explain a tell function in perl?

528


Why Perl aliases are considered to be faster than references?

535






Write a program to download the contents from www.perlinterview.com/answers.php website in Perl.

534


What happens in dereferencing?

526


Is perl a case sensitive language?

628


How interpreter is used in perl?

476


What is the purpose of “_file_ literal” and “_line_ literal” in perl?

529


How to read from a pipeline with Perl

539


List the prefix dereferencer in Perl.

561


How to implement a stack in Perl?

571


Explain the arguments for perl interpreter.

519


Explain the functioning of conditional structures in perl.

459