#!/usr/bin/perl -w use strict; use CGI; my $q = CGI->new; my $id = $q->param('pointid'); #return if (length($id) < 2); my $hash = { 100 => {name=>'甲武信ヶ岳', ido=>'35.54.32', keido=>'138.43.44', height=>'2475'}, 101 => {name=>'横尾山', ido=>'35.55.08', keido=>'138.31.16', height=>'1818'}, 102 => {name=>'瑞牆山', ido=>'35.53.36', keido=>'138.35.31', height=>'2230'}, 110 => {name=>'金峰山', ido=>'35.52.17', keido=>'138.37.31', height=>'2599'}, 111 => {name=>'朝日岳', ido=>'35.52.28', keido=>'138.38.33', height=>'2579'}, 112 => {name=>'国師ケ岳', ido=>'35.52.15', keido=>'138.40.23', height=>'2592'}, 120 => {name=>'北奥千丈岳', ido=>'35.52.07', keido=>'138.40.15', height=>'2601'}, 121 => {name=>'乾徳山', ido=>'35.49.23', keido=>'138.42.54', height=>'2031'} }; my %selected; if (length($id) == 3) { $selected{$id} = $hash->{$id}; }elsif (length($id) == 2){ foreach (0..9) { my $key = $id.$_; if ($hash->{$key}){ $selected{$key} = $hash->{$key}; } } } print "Content-Type: text/xml\n\n"; print "";