Thread Warum greift Abfrage nicht..? (5 answers)
Opened by jan99 at 2013-10-27 09:28

jan99
 2013-10-27 09:28
#171575 #171575
User since
2008-09-18
439 Artikel
BenutzerIn
[default_avatar]
hi !

ich habe einen kleinen Source - siehe unten und dabei wird folgendes protokolliert:
Quote
id: -94 - lon: -3.8844823837280273 - lat: 36.74317428974953
Wert: /999999
$VAR1 = '';
$VAR2 = '999999';


Kann mir einer sagen, warum die if-Abfrage

Code: (dl )
}elsif ($tags[0] eq '' && $tags[1] =~ /^[0-9]{1-6}/){


nicht greift ?

Gruß Jan :-)

hier der Source....

Code: (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
  for my $element (@data)
{
my ($lon,$lat) = $element->center();
print "id: ".$element->id()." - lon: ".$lon." - lat: ".$lat."\n";
print $fh_out " <node id='".($element->id())."' action='modify' visible='true' version='1' lat='".$lat."' lon='".$lon."'>\n";
# liegt überhaupt eine Info vor ?
if($element->has_tag('addr:housenumber'))
{
print "Wert: ".$element->tag('addr:housenumber')->value()."\n";
# aufsplitten der Informationen
my @tags = split(/\//,$element->tag('addr:housenumber')->value());
# print Dumper(@tags)."\n";
$tags[0] = lc($tags[0]);
print Dumper(@tags)."\n";

if( $tags[0] =~ /^[0-9]{6}/ ){
writeKV($fh_out,'amenity','vending_machine');
writeKV($fh_out,'vending','cigarettes');
writeKV($fh_out,'ref',$tags[0]);
writeKV($fh_out,'operator','tabaccoland');

}elsif ($tags[0] eq '' && $tags[1] =~ /^[0-9]{1-6}/){
writeKV($fh_out,'highway','street_lamp');
writeKV($fh_out,'ref',$tags[1]);

}elsif( $tags[0] =~ /^bj.*/ ){
....
perl-Greenhorn - Win7 64bit / strawberry (ehem. activeperl) - www.OpenStreetMap.de

View full thread Warum greift Abfrage nicht..?