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

You want to print the contents of an entire array. How would you do that?

716


What are the logical operators used for small scale operations? Explain them briefly.

712


What is the difference between use and require in perl?

649


What does delete function do in perl?

724


I have one question regarding to eval function. I know eval function is use for error checking but I am not able to understand below line. eval \'exec perl -S $0 ${1+\"$@\"}\' if 0; $0 for script name $@ set if error occur

1794


What is the easiest way to download the contents of a URL with Perl?

736


Explain the arguments for perl interpreter.

828


What are the steps involved when the cgi program starts running?

689


What is a chop() function in perl?

766


List the prefix dereferencer in Perl.

742


How do you give functions private variables that retain their values between calls?

724


What are the different string manipulation operators in perl?

704


What are different data types that perl supports. Elaborate on them.

733


How to concatenate strings in perl?

792


How to read multi lines from a file in perl?

687