Thread Problem mit splitfunktion (2 answers)
Opened by michaelf2050 at 2010-07-14 11:49

topeg
 2010-07-14 12:00
#139792 #139792
User since
2006-07-10
2611 Artikel
BenutzerIn

user image
So kann man es machen:
Code (perl): (dl )
my ($name) = $file=~/\\([^\\_]+)_/;


oder besser:
Code (perl): (dl )
1
2
3
4
5
6
use File::Spec;

#...

my $name=File::Spec->splitpath( $file );
$name=~s/_.+?$//;

View full thread Problem mit splitfunktion