Пособие по написанию WAP-сайтов


Подробнее о сценарии языка Perl FlightScheduleWML.pl - часть 3


{ $AirName = "Delta";

if ($FlightNum eq "1") { $ArriveCity = "Atlanta"; $ArriveTime = "7:30 pm"; } elsif ($FlightNum eq "2") { $ArriveCity = "Las Vegas"; $ArriveTime = "8:45 am"; } else { $ArriveCity = "Unknown"; } }

elsif ($AirCode eq "LH")

{ $AirName = "Lufthansa";

if ($FlightNum eq "1") { $ArriveCity = "Berlin"; $ArriveTime = "9:30 am"; } elsif ($FlightNum eq "2") { $ArriveCity = "Chicago"; $ArriveTime = "9:00 pm"; } else { $ArriveCity = "Unknown"; } }

elsif ($AirCode eq "JL")

{ $AirName = "Japan Airlines";

if ($FlightNum eq "1") { $ArriveCity = "Tokyo"; $ArriveTime = "9:30 pm"; } elsif ($FlightNum eq "2") { $ArriveCity = "New York"; $ArriveTime = "9:30 am"; } else { $ArriveCity = "Unknown"; } }

elsif ($AirCode eq "KL")

{ $AirName = "KLM Royal Dutch";

if ($FlightNum eq "1") { $ArriveCity = "London"; $ArriveTime = "10:00 pm"; } elsif ($FlightNum eq "2") { $ArriveCity = "New York"; $ArriveTime = "9:00 am"; } else { $ArriveCity = "Unknown"; } }

elsif ($AirCode eq "NW")

{ $AirName = "Northwest Airlines";

if ($FlightNum eq "1") { $ArriveCity = "Seattle"; $ArriveTime = "8:30 pm"; } elsif ($FlightNum eq "2") { $ArriveCity = "Portland"; $ArriveTime = "7:45 am"; } else { $ArriveCity = "Unknown"; } }

elsif ($AirCode eq "QF")

{ $AirName = "Qantas Airlines";

if ($FlightNum eq "1") { $ArriveCity = "Melbourne"; $ArriveTime = "7:30 pm"; } elsif ($FlightNum eq "2") { $ArriveCity = "Tokyo"; $ArriveTime = "9:30 am"; } else { $ArriveCity = "Unknown"; } }




Начало  Назад  Вперед