From: "Kevin Kirwan" <[EMAIL PROTECTED]>
> Guys, > I've got a newbie question: I'm writing a Perl program to get some > system information about particular users. The command(s): > $command=q(/usr/bin/last vtran|head -1|awk '{print $4,$5}'); > $Last=system "$command"; print $Last; > > This returns the fields that I want, except I also get the return code > (0), in addition to the fields I want. This is messing up my write > (output format). Is there a "slick" way to get rid of the return > code? Thanks in advance for any assistance, No this doesn't return the fields. The only thing that gets assigned to $Last is the zero. The fields are printed onto the screen by the awk. You want to use `` (backticks) instead of system(). Jenda =========== [EMAIL PROTECTED] == http://Jenda.Krynicky.cz ========== There is a reason for living. There must be. I've seen it somewhere. It's just that in the mess on my table ... and in my brain. I can't find it. --- me -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]