Thread if-abfrage ... warum nicht
(10 answers)
Opened by jan999 at 2009-05-15 18:55
hi !
ich habe folgendes stück code: Code (perl): (dl
)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 if (defined $g_TagAttrs{'site_type'} && length $g_TagAttrs{'site_type'} > 0) { print "==> site_type gefunden !!!\n"; if ($g_TagAttrs{'site_type'} eq 'megalith') { print ".."; }elsif ($g_TagAttrs{'site_type'} eq 'tumulus') { print "==> tumulus zugewiesen !!!\n"; $icon_name = 'tumulus'; }elsif ($g_TagAttrs{'site_type'} eq 'fortification') { print "==> fortification"; }elsif ($g_TagAttrs{'site_type'} eq 'bigstone') { print "==> bigstone"; } } # endif else { print "==> site_type NICHT gefunden !!!\n"; } } # endif - site_type kann mir einer sagen warum bei $g_TagAttrs{'site_type'} = 'tumulus' nicht die entsprechende Abfrage mit wahr gefunden wird und print "==> tumulus zugewiesen !!! ausgegeben wird bzw. $icon_name den entsprechenden Wert zugewiesen bekommt ?? gruß Jan :-) |