Thread welche Trennzeichen erlaubt ?? (11 answers)
Opened by worst_case at 2007-12-13 20:36

pq
 2007-12-15 01:42
#103916 #103916
User since
2003-08-04
12208 Artikel
Admin1
[Homepage]
user image
#Kein Kommentar+2007-12-14 17:15:34--
Code (perl): (dl )
1
2
3
my $string = "Maschine1_Temperatur_hinten_rechts";

my ($first_part, @parts) = split /\_/, $string;

bzw.
Code (perl): (dl )
1
2
3
my $string = "Maschine1_Temperatur_hinten_rechts";

my ($first_part, $last_part) = split /_/, $string, 2;

dann wird nur einmal gesplittet
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 welche Trennzeichen erlaubt ??