4 Einträge, 1 Seite |
1
2
3
$bla="ftp://asdf:bsfsf@127.0.0.1:21";
($user, $pass, $ip, $port) = $bla =~ /^ftp\:\/\/([^:]+):([^\@]+)\@([^:]+):(.+)$/;
print "$user - $pass - $ip - $port"
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/perl
use strict;
use warnings;
use URI;
my $uri = URI->new('ftp://asdf:bsfsf@127.0.0.1:21');
print "Scheme: ", $uri->scheme(),
"\nUser: ", $uri->user(),
"\nPassword: ", $uri->password(),
"\nHost: ", $uri->host(),
"\nPort: ", $uri->port(),
"\nPath: ", $uri->path(),
"\n";
4 Einträge, 1 Seite |