I need help understanding why I'm getting this complaint,
Use of uninitialized value in concatenation (.) or string at test.pl line 2.
It says its unitialized, but isn't the my $status initializing the scalar?
I'm so confused.
Here's the code:
#!/usr/local/bin/perl -w
my $status = `ps -ef | /bin/egrep '/usr/lib/sendmail' | /bin/grep -v grep | awk
'{print $2}'`;
print $status;
if ($status) {
print "We have sendmail\n";
} else {
print "We don't\n";
}
And the output:
Use of uninitialized value in concatenation (.) or string at test.pl line 2.
root 19460 1 0 Dec 18 ? 0:08 /usr/lib/sendmail -bd -q15m
We have sendmail
Thanks for any help,
deb
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>