Hi,
I need to capture the numeric value of qmail-qstat in some variable and process it further in a Perl Shell Scrip.
I am not able to think of any way to do this !! Can someone please suggest some way to this..
Thanks in advance. Poonam.
________________________________________________________________________ Want to sell your car? advertise on Yahoo Autos Classifieds. It's Free!! visit http://in.autos.yahoo.com
Hi Poonam,
I guess u need to open pipes n read the stdout ... which u can store in variables... or may be u need to redirect the output to a normal ascii file n then read the contents of the same....by fread()
-Mitul Limbani (mitul 2 mitul.com)
Poonam P writes:
Hi,
I need to capture the numeric value of qmail-qstat in some variable and process it further in a Perl Shell Scrip.
I am not able to think of any way to do this !! Can someone please suggest some way to this..
Thanks in advance. Poonam.
Want to sell your car? advertise on Yahoo Autos Classifieds. It's Free!! visit http://in.autos.yahoo.com _______________________________________________ http://mm.ilug-bom.org.in/mailman/listinfo/linuxers
On Tue, 2 Jul 2002, Poonam P wrote:
I need to capture the numeric value of qmail-qstat in some variable and process it further in a Perl Shell Scrip.
umm, what is qmail-qstat and what do you mean by value?
anyway, there are two ways to capture the `value' of a program in perl - depending on what you mean by value.
if you meant the output of the program, then do this:
my $output = `qmail-qstat`; # you may have to give the full path.
if you meant the return value, then do this:
system "qmail-qstat"; my $output = $?<<8;
of course, read man perlvar to fully understand what $? is and how to use it correctly. What I've given above is by no means complete, you *must* read the man pages to complete it.
man perlvar - for $? man perlop - for `` perldoc -f system - for system