|< 1 2 >| | 15 Einträge, 2 Seiten |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/perl
use strict;
use warnings;
print pop @{[sort (<DATA>)]};
exit;
_ _DATA_ _
2.0.01.00.05
2.0.01.00.06
2.1.00.00.01
2.0.02.00.01
2.0.02.00.02
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
26
27
28
29
30
use strict;
use warnings;
use Data::Dumper;
my $dir = '.';
my $folders = "";
opendir (DIRHANDEL, "$dir")or warn "can't open $dir\n Error: $!";
while (defined ($folders = readdir(DIRHANDEL)))
{
&new($folders);
}
closedir (DIRHANDEL);
sub new
{
my ($folders) = @_;
#my @t1 = sort $folders,[-1];
#print @t1, "\n";
print +(sort <DATA>)[-1], "\n";
#print +(sort <*$folders>)[-1], "\n";
#print pop @{[sort ($folders)], "\n"};
#print $folders, "\n";
}
2.0.01.00.05
2.0.01.00.06
2.1.00.00.01
2.0.02.00.01
2.0.02.00.02
1
2
3
4
5
6
7
8
my @max = (0,0,0,0,0);
foreach (@files) {
my @actual = split(\./, $_);
for my $i (0..$#actual) {
@max = @actual, last if $actual[$i] > $max[$i];
} # for
} # foreach
print "Max: ", join(".", @max), "\n";
print eval 'v' . '115.116.114.97.116';
1
2
3
4
5
6
7
8
9
10
11
12
13
use strict;
use warnings;
use List::Util qw(maxstr);
my $dir = '.';
my $folders = "";
opendir (DIRHANDEL, "$dir")or warn "can't open $dir\n Error: $!";
while (defined ($folders = readdir(DIRHANDEL)))
{
my $str = maxstr $folders;
print $str,"\n";
}
closedir (DIRHANDEL);
|< 1 2 >| | 15 Einträge, 2 Seiten |