I am in the windows enviroment, so uncertain what the awk and other things 
are.  To reference the $1, $2, ... then you must have something like:

        m/^(..)\s+(\d{2,}abc\s+(\w{2}\d{1})/
          if it matches and since I have no left side(ie, $data =~, then will go vs 
$_). So from the above, then
                $1 will have two characters
                $2 will have two or more digits
                $3 will have alphanumeric and 1 digit

        Won't be there if it fails, but on success all three will have data.

Wags ;)

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


Wags,
    Didn't get you there?! Any examples?! which does
similar thing?!
Thanks
Bhanu.


        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]

=====
Bhanu Prakash G V S

__________________________________________________
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]

Reply via email to