#!/usr/bin/perl -w # von Bastian use strict; #my $content=site_get ('shure-e2'); #print $content; #die; my $bla; my $num; if (defined ($ARGV[0])) { if ($ARGV[0] =~ /^\+49(.*)/) { $num = "0$1"; } else { print "Keine Deutsche Nummer!\n"; exit 3; } } else { exit 2; } #exit 0; $bla=site_parse (site_get ($num)); print "(Ö)$bla\n"; #print $content; ############################# sub site_get { my $telnumber=$_[0]; my $site='http://www.dasoertliche.de/DB4Web/es/oetb2suche/home.htm?kw_invers='.$telnumber.'&main=Antwort&AKTION=START_INVERS_SUCHE&SEITE=INVERSSUCHE_V&Suchen.x=13&Suchen.y=7&s=2&rg=1&taoid=&si=04122017232940004122017232928003&SKN=0&SEITE=INVERSSUCHE_V&AKTION=START_SUCHE'; use LWP::Simple; my $content = get("$site"); $content =~ s/\n//g; $content =~ s/\r//g; return ($content); } sub site_parse { my $content = $_[0]; my $list = ''; if ($content =~ /Kein Teilnehmer gefunden:/) { print "Kein Teilnehmer gefunden\n"; exit 1; } elsif ($content =~ /href="home.htm\?main=Detailansicht[^>]*">([^>]*)