You can use backtick operator.Example:
my $result = `./script.pl`;
But dont rely on this backtick operator or 'system' functions. Because of two reasons,
In reply to Re: how to store the output of a 'system' call to a variable
by vennirajan
in thread how to store the output of a 'system' call to a variable
by rsennat
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |