Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

Answer Posted / ramesh

Both Perl's exec() function and system() function execute a
system shell command. The big difference is that system()
creates a fork process and waits to see if the command
succeeds or fails - returning a value. exec() does not
return anything, it simply executes the command. Neither of
these commands should be used to capture the output of a
system call. If your goal is to capture output, you should
use the

$result = system(PROGRAM);
exec(PROGRAM);

Is This Answer Correct ?    12 Yes 11 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What rules must be followed by modules in perl.

992


Explain '->' in perl?

928


explain the various functions/directives in perl that allow you to include/import a module. Also, state the differences between them.

868


How to create a directory in perl?

1075


Explain the difference between "my" and "local" variable scope declarations. ?

1066


Remove the duplicate data from @array=(“perl”,”php”,”perl”,”asp”)

1000


Why aren't Perl's patterns regular expressions?

1168


What are perl variables?

928


What are arrays in perl?

969


How to do comment in perl?

951


Write a program to decode the data in the form using cgi programming

1044


What does this symbol mean '->'?

1009


how to get back up from private character editor which is saved in the format of .udf

2293


Explain USE and REQUIREMENT statements?

930


Explain tk?

992