#!/usr/bin/env perl ## Copyright © 2009 by Daniel Friesel ## License: WTFPL ## 0. You just DO WHAT THE FUCK YOU WANT TO. use strict; use warnings; use encoding 'utf8'; use 5.010; use Encode; use Getopt::Long; use WWW::Mechanize; my $firsturl = 'http://efa.vrr.de/vrr/XSLT_TRIP_REQUEST2?language=de&itdLPxx_transpCompany=vrr'; my $posturl = 'http://efa.vrr.de/vrr/XSLT_TRIP_REQUEST2'; my $version = '1.0.3+git'; my $content; my %post; my $www = WWW::Mechanize->new( autocheck => 1, ); my $raw; my (@from, @to, @via); my ($from_type, $to_type, $via_type) = ('stop') x 3; my ($time, $time_depart, $time_arrive); my $date; my @exclude; my $maxinter; my $include; my $prefer; my $proximity; my $walk_speed; my $with_bike; my $debug = 0; my $ignore_info = 'Fahrradmitnahme'; sub check_ambiguous { my $html = shift; my $choose_re = qr{ Bitte \s auswählen }x; my $select_re = qr{