[Q]How can I pass Perl variables into shell?

2002-02-22 Thread Bhanu Prakash
Thanks japhy and Wags ;) It works fine now with the backslashes! Bhanu On Feb 21, Wagner-David said: > The $1 and $2 come out of reqex with parens. That's not helping, though. The answer he seeks is: backslash the $ signs. -- Jeff "japhy" Pinyan [EMAIL PROTECTED] htt

Re: [Q] How can I pass Perl variables into shell?

2002-02-21 Thread Jeff 'japhy' Pinyan
On Feb 21, Bhanu Prakash said: >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 he

RE: [Q] How can I pass Perl variables into shell?

2002-02-21 Thread Jeff 'japhy' Pinyan
On Feb 21, Wagner-David said: > The $1 and $2 come out of reqex with parens. That's not helping, though. The answer he seeks is: backslash the $ signs. -- Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/ RPI Acacia brother #734 http://www.perlmonks.org/

Re: [Q] How can I pass Perl variables into shell?

2002-02-21 Thread Tanton Gibbs
> To: <[EMAIL PROTECTED]> Sent: Friday, February 22, 2002 2:05 AM 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",&quo

[Q]How can I pass Perl variables into Shell

2002-02-21 Thread Bhanu Prakash
Wags, Let me try to explain what I wanted to do with awk script. When the user enters some data in the form, I want to search for this data as key in a datafile and update the information next to that information with another field entered by user . e.g., my input file.. bhanu tclprogrammer w

RE: [Q] How can I pass Perl variables into shell?

2002-02-21 Thread Wagner-David
akash [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 w

[Q] How can I pass Perl variables into shell?

2002-02-21 Thread Bhanu Prakash
bject: [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 pr

RE: [Q] How can I pass Perl variables into shell?

2002-02-21 Thread Wagner-David
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

[Q] How can I pass Perl variables into shell?

2002-02-21 Thread Bhanu Prakash
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 an