Just a thought, maybe you can simplify the "whole thing" using shell and Perl as follows -
include=file /usr/atria/bin/cleartool desc $include | grep created | awk -F " " '{print $2}' | cut -b 1-9 | perl -w -e 'print <STDIN>' -- Jayesh ----- Original Message ---- From: Owen <rc...@pcug.org.au> To: Rajini Naidu <rajinid...@gmail.com> Cc: beginners@perl.org Sent: Wednesday, April 15, 2009 8:39:42 AM Subject: Re: Syntax query > Hi, > > I am trying to execute the below line in the perl program and returns > a > value 0. > > my $test2 = ""; > my $include = "file"; > > $test2 = system("/usr/atria/bin/cleartool desc \$include | grep > created | > awk -F\" \" \'{print \$2}\' | cut -b 1-9 "); > > The value returned by $test2 is 0. I suspect grep and awk commands are > not > getting executed. > Is there any thing wrong in the syntax ???? You will probably need to specify the full path of grep and awk. (usr/bin/grep etc) -- Owen -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/ -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/