Hi guys,
I was wondering if anyone knows how to execute Unix
commands in a Perl Script?
system(echo Hello World);
my $output = qx(echo Hello There);
print The shell said :$output\n;
perldoc -f system
perldoc perlop
Jonathan Paton
__
Do You
Hi guys
I was wondering if anyone knows how to execute Unix commands in a Perl
Script ?
I would be most grateful if you could let me know
Thanks in advance
Tony
-Original Message-
From: Ho, Tony [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 20, 2002 11:49 AM
To: '[EMAIL PROTECTED]'
Subject: Unix commands in Perl scripts
Hi guys
I was wondering if anyone knows how to execute Unix commands in a Perl
Script ?
I would be most grateful if you could
If I understood your question, you could use system or command ticks.
That is:
system(cal) //be careful
or
$a = `cal`;
depending on how you want to treat the output.
If you want to manipulate the output, use command ticks.
__
William Ampeh (x3939)
Federal Reserve
-2201
E-Mail:[EMAIL PROTECTED]
-Original Message-
From: Ho, Tony [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 20, 2002 10:49 AM
To: '[EMAIL PROTECTED]'
Subject: Unix commands in Perl scripts
Hi guys
I was wondering if anyone knows how to execute Unix commands in a Perl
Script ?
I
On Wed, 20 Feb 2002, Booher Timothy B 1stLt AFRL/MNAC wrote:
You simply enclose your unix commands in ''.
i.e.
#!untested
'ls -la'
I think you mean ` `, (backticks), right?
-- Brett
http://www.chapelperilous.net/
Tony Ho wrote:
Hi guys
Hello,
I was wondering if anyone knows how to execute Unix commands in a Perl
Script ?
use Shell;
my $ps = ps( 'ax' );
print $ps;
my @ls = ls( '-al' );
print $ls[ 7 ];
perldoc Shell
John
--
use Perl;
program
fulfillment
--
To unsubscribe, e-mail: [EMAIL
system( cat myfile);
or
qx( cp file1 file2);
At 03:16 PM 2/20/2002 -0800, John W. Krahn wrote:
Tony Ho wrote:
Hi guys
Hello,
I was wondering if anyone knows how to execute Unix commands in a Perl
Script ?
use Shell;
my $ps = ps( 'ax' );
print $ps;
my @ls = ls( '-al' );
print $ls[