The $1 and $2 come out of reqex with parens.

Wags ;)

-----Original Message-----
From: Bhanu Prakash [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 21, 2002 23:05
To: [EMAIL PROTECTED]
Subject: [Q] How can I pass Perl variables into shell?


Hi, 
Can I not do something like...

#!/usr/local/bin/perl 
use strict;
my $myname='hi There';
system "ls","-la";
system "echo","$myname";
qx{awk '{ if ($myname==$1) { do something } else print
$2,$1 }'};

My script is complaining about uninitialized
variables..
I suspect it is talking about $1 and $2s .Can I not
place them here?
Can I pass $myname to awk?
Thanks
Bhanu


__________________________________________________
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to