Thread Aufsplitten von Dateinahmen (10 answers)
Opened by Rippchen at 2004-09-02 15:38

pq
 2004-09-02 18:18
#49844 #49844
User since
2003-08-04
12208 Artikel
Admin1
[Homepage]
user image
[quote=snarf,02.09.2004, 14:14]
Code: (dl )
 $part = join '', ((split /(-|_)/, $filename)[0..2])
[/quote]
da würde ich das hier
 $part = join "", (split /(?=-|_)/, $filename)[0..1];
vorziehen.
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. -- Damian Conway in "Perl Best Practices"
lesen: Wiki:Wie frage ich & perlintro Wiki:brian's Leitfaden für jedes Perl-Problem

View full thread Aufsplitten von Dateinahmen