Perl Home
PERL Functions
© 2011 TutorialsPoint.COM
|
PERL system Function
Syntax
system PROGRAM, LIST
system PROGRAM
|
Definition and Usage
Executes the command specified by PROGRAM, passing LIST as arguments to the command.
The return value is the exit status of the program as returned by the wait function. To obtain the actual exit value, divide by 256.
Return Value
Example
Try out following example:
#!/usr/bin/perl -w
system("ls -F /var > /tmp/t.tmp");
|
It will produce following result:
A file in /tmp direcory, check it out.
|
|

|
|
|