Thread String rausschneiden / Uptime berechnen
(7 answers)
Opened by Shaq17 at 2015-06-25 11:33 2015-06-25T09:33:26 Shaq17 Ich benutze RegEx nicht so gern, deshalb würd' ich's so machen: Code (perl): (dl
)
1 2 3 4 5 6 7 8 #!/usr/bin/perl use strict; use warnings; my $string = 'belp;2015-06-25 10:40:01;uptime 20037241.55'; my @a = split(";", $string); my @b = split(" ", $a[2]); my $uptime = $b[1]; print "$uptime\n"; |