
![]() | ![]() |
8.185. Shell
Allows you to
invoke Unix shell utilities as if they were Perl subroutines.
Arguments (including switches) are passed to the utilities as
strings:
use Shell qw(date cp ps); # List shell commands you want to use
$date = date( ); # Put the output of the date(1) command into $date
cp("-p" "/etc/passwd", "/tmp/passwd"); # Copy password file to a tmp file
print ps("-ww"); # Print the results of a "ps -ww" command
![]() | ![]() | ![]() |
8.184. SelfLoader | ![]() | 8.186. sigtrap |

Copyright © 2002 O'Reilly & Associates. All rights reserved.