I have a script where I am trying to use the conditional operator.
Apparently I am confused as it always evaluates false. These are the
relevant lines from the script. The scalar $initial will either be "" or "A". 

Can someone help me to understand what I clearly don't.

Input:

999998,"Lisa","A","Testing"
999999,"ftest","","ltest, Jr."

Relevant script lines:

        $initial ?
                $gecos = "$first $initial $last, $sid, SIR Fall 2007":
                $gecos = "$first $last, $sid, SIR Fall 2007";

Output is :

ltesting::::::Lisa Testing, 999998, SIR Fall 2007,::/bin/sh/:
fltestjr::::::ftest ltest Jr., 999999, SIR Fall 2007,::/bin/sh/:


I have validated that the value of $initial is correct, it equals A in the
first instance and "" in the second instance.
-- 

Karyn Williams
Network Services Manager
California Institute of the Arts
[EMAIL PROTECTED]
http://www.calarts.edu/network

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to