For Programmers: Free Programming Magazines  


Home > Archive > PERL CGI Beginners > May 2004 > RE: elsif issues ....still









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author RE: elsif issues ....still
Allen Wang

2004-05-22, 11:30 am

When I was trying to install GDGraph-1.43
It failed due to the following message
"
Warning: prerequisite GD failed to load: Can't load =
'/opt/perl5/lib/site_perl/5.6.0/PA-RISC2.0/auto/GD/GD.sl' for module GD: =
No suc.
at (eval 4) line 3
Compilation failed in require at (eval 4) line 3.
Warning: prerequisite GD::Text 0.80 not found at =
/opt/perl5/lib/5.6.0/ExtUtils/MakeMaker.pm line 340.
Writing Makefile for GD::Graph
"

But I could not find GD::Text 0.80 through CPAN


Thanks,
....
-----Original Message-----
From: Lile, James AZ2 (VAW-115) [mailto:James.Lile@cvw5.navy.mil]
Sent: Thursday, August 21, 2003 8:34 PM
To: 'Catriona Wordsworth'; beginners-cgi@perl.org
Subject: RE: elsif issues ....still


Someone correct me if I am wrong, the numbers in quotes are being read =
as
strings and not numbers, or numbers not strings.
The =3D=3D works with numbers, and the quotes are for strings. I think =
that the
way you have it set up, the number one is returning true when the =
$variable
is defined.

respectfully,
James


-----Original Message-----
From: Catriona Wordsworth [mailto:catrionaw@purescents.com.au]
Sent: Wednesday, August 20, 2003 8:03 AM
To: beginners-cgi@perl.org
Subject: elsif issues ....still


Hi Guys,

trying to get the following code to print each line where =
relevant....but it
only prints the first statement "yes its one!" even if the $variable is
"5"....

$variable =3D $var

if ($variable =3D=3D "1"){

print MAIL "yes its one!\n";

} elsif ($variable =3D=3D "2"){

print MAIL "it is two!\n";

} elsif ($variable =3D=3D "3"){

print MAIL "the number three.\n";

} elsif ($variable =3D=3D "4"){

print MAIL "4 is on the cards.\n";

} elsif ($variable =3D=3D "5"){

print MAIL "number 5 is alive.\n";

} elsif ($variable =3D=3D "6"){

print MAIL "pick up sticks.\n";

} elsif ($variable =3D=3D "7"){

print MAIL "go to heaven.\n";

} else {

print "this is not working\n";

}





any ideas where I might be going wrong? I copied this direct out of my =
perl
book....theoretically it should work right??

regards

Cat

--=20
To unsubscribe, e-mail: beginners-cgi-unsubscribe@perl.org
For additional commands, e-mail: beginners-cgi-help@perl.org

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com