On 08/29/2006 10:40 AM, Sayed, Irfan (Irfan) wrote:
Hi All,
I have a following script in perl in which i am using awk command but it
is not getting executed properly.
# /usr/atria/bin/Perl -w
use strict;
use warnings;
my $fname = "/tmp/checkvob_log";
open(FILE,">>$fname");
Check if the open failed. Read "perldoc -f open."
my $CT = "/usr/atria/bin/cleartool";
my @vob_list = `$CT lsvob -s`;
my @vob_list1 = `$CT lsvob`;
print FILE @vob_list1;
my $cmd1 = "awk '{print $3}' /tmp/checkvob_log";
[...]
That $3 is expanded inside the perl interpreter--long before
awk gets it. Put a backslash in front of it to delay expansion.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>