On Tue, Jun 17, 2008 at 1:47 PM, swaroop <[EMAIL PROTECTED]> wrote:
> As we know there are 3 ways a system shell command to be executed.
>
> 1.> $var = system("command");
> 2.> $var = exec("command");
> 3.> $var = `command`;
>
> What is difference between these three? I found that the first two
> options are printing the output of the command. And the third one
> simply stores the output in the variable.
`command` for capturing the command's output and assign it to a variable.
for what's the difference between system and exec, see 'perldoc -q "exec"'.
--
Jeff Peng - [EMAIL PROTECTED]
Professional Squid supports in China
http://www.ChinaSquid.com/
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/