[CentOS] perl script part eval help please?

Steve Walsh - Nerdvana Hosting steve at nerdvana.net.au
Sun Aug 27 07:22:43 UTC 2006


elif is a contraction of else if used to extend if statements

if Foo do x
elif Bar then y
elif dah then z
else ....
etc

I *think* the -z is to see if variable is set or not (ie - unset variables = 0)

the SMTP_CDB looks like a qmail variable, but my guess is the line in question 
is checking to see if SMTP_CDB variable in a qmail config file has been assigned 
a value.

HTH

Steve

Email Lists wrote:
> Greetings
> 
> Im am not a perl programmer yet I am trying to learn and am debugging
> someone elses perl run script for use on a centos production box I have and
> I came across this
> 
> elif [ -z "${SMTP_CDB:-}" ]
> 
> Can someone please shed some light on what this eval means in English
> please?
> 
> im mainly concerned with the stuff between the two " yet I need all the help
> I can get
> 
> what does that say? Im trying to figure out if there is a typo or something
> in the script.
> 
> I am not a perl programmer yet im sure I will be before I get done with this
> exercise in the next coupla weeks
> 
> Thanks and kind regards
> 
>  - rh
> 
> 
> 
> 
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> http://lists.centos.org/mailman/listinfo/centos



More information about the CentOS mailing list