Thread dateinamen parsen (3 answers)
Opened by Gast at 2006-07-15 14:06

renee
 2006-07-15 14:11
#68112 #68112
User since
2003-08-04
14371 Artikel
ModeratorIn
[Homepage] [default_avatar]
split ist für so einen Fall besser:
Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/perl

use strict;
use warnings;

my @array = ('-rw-r--r-- user/group 41733 2006-04-17 23:19:00 files/sa03.tex',
'-rw-r--r-- user/group 16406 2006-04-18 00:57:16 files/sa04.tex',
'-rw-r--r-- user/group 6313 2006-04-17 23:28:22 files/sa05.tex',
'-rw-r--r-- user2/group 3284 2006-04-13 21:11:10 files/sa06.tex',
'-rw-r--r-- user2/group 14014 2006-04-13 19:25:50 files/sa07.tex',
'-rw-r--r-- user2/group 4062 2003-11-18 15:44:34 files/twola ng.sty');

for my $entry(@array){
my $filename = (split(/\s+/,$entry,6))[-1];
print $filename,"\n";
}
OTRS-Erweiterungen (http://feature-addons.de/)
Frankfurt Perlmongers (http://frankfurt.pm/)
--

Unterlagen OTRS-Workshop 2012: http://otrs.perl-services.de/workshop.html
Perl-Entwicklung: http://perl-services.de/

View full thread dateinamen parsen