Thread Split-delimiters -> " " und "" und // und / / (19 answers)
Opened by Student87 at 2012-11-21 15:10

Linuxer
 2012-11-21 15:18
#163482 #163482
User since
2006-01-27
3872 Artikel
HausmeisterIn

user image
Fall 2 wird in der Doku erwähnt:

perldoc -f split
A pattern matching the null string (not to be confused with a null pattern "//", which is just one member of the set of patterns matching a null string)
will split the value of EXPR into separate characters at each point it matches that way. For example:

print join(':', split(/ */, 'hi there'));

produces the output 'h:i:t:h:e:r:e'.


Oder worin ist für Dich der Unterschied zwischen "null string" und "empty string"? (Grad unter Blick auf Fall 3.)
Last edited: 2012-11-21 15:19:11 +0100 (CET)
meine Beiträge: I.d.R. alle Angaben ohne Gewähr und auf Linux abgestimmt!
Die Sprache heisst Perl, nicht PERL. - Bitte Crossposts als solche kenntlich machen!

View full thread Split-delimiters -> " " und "" und // und / /