Thread Wert in Datei schreiben IPv6 (20 answers)
Opened by fred0815 at 2015-04-22 10:15

fred0815
 2015-04-24 13:51
#180804 #180804
User since
2013-12-23
33 Artikel
BenutzerIn

user image
Ich habs nochmal geƤndert:
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
#!/usr/bin/perl -d
use strict;
use warnings;
use Data::Validate::IP qw(is_ipv4 is_ipv6);
use CGI qw(:standard);
print header();

my $cgi = CGI->new;
my $param_IP = $cgi->param('IP');


if (is_ipv4($IP)) {
print "IPv4\n";
}
else {
print "Keine IPv4\n";
}

my $IP = IP;
if (is_ipv6($IP)) {
print "IPv6\n";
}
else {
print "Keine IPv6\n";
}

Das
Code: (dl )
my $param_IP = $cgi->param('IP');

sollte eher
Code: (dl )
my $IP = $cgi->param('IP');

heissen, oder ?
Last edited: 2015-04-24 13:56:37 +0200 (CEST)

View full thread Wert in Datei schreiben IPv6