7 my ($callpack, $callfile, $callline) = caller;
15 foreach $sym (@EXPORT) {
16 *{"${callpack}::$sym"} = \&{"Shell::$sym"};
28 elsif (\$Config{'archname'} eq 'os2') {
29 local(\*SAVEOUT, \*READ, \*WRITE);
31 open SAVEOUT, '>&STDOUT' or die;
32 pipe READ, WRITE or die;
33 open STDOUT, '>&WRITE' or die;
36 my \$pid = system(1, \$cmd, \@_);
37 die "Can't execute $cmd: \$!\n" if \$pid < 0;
39 open STDOUT, '>&SAVEOUT' or die;
59 or die "Can't exec $cmd: \$!\n";
62 close SUBPROC; # XXX Oughta use a destructor.
82 Shell - run shell commands transparently within perl
90 Date: Thu, 22 Sep 94 16:18:16 -0700
91 Message-Id: <9409222318.AA17072@scalpel.netlabs.com>
92 To: perl5-porters@isu.edu
93 From: Larry Wall <lwall@scalpel.netlabs.com>
94 Subject: a new module I just wrote
96 Here's one that'll whack your mind a little out.
102 $foo = echo("howdy", "<funny>", "world");
105 $passwd = cat("</etc/passwd");
111 cp("/etc/passwd", "/tmp/passwd");
113 That's maybe too gonzo. It actually exports an AUTOLOAD to the current
114 package (and uncovered a bug in Beta 3, by the way). Maybe the usual
117 use Shell qw(echo cat ps cp);