in reply to Is it possible to split a hash key?
You are too scared of proper escaping. The first parameter to split is always a regexp even if you write a string (unless that string happens to be a single space). You have written split( /./ , $log ) says to split between every non-newline character. Further, the performance of all non-5.10 regexp engines are reduced by writing your dots as [.] instead of the literal \.. Your regexp and pattern to split should both read /\./.
⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Is it possible to split a hash key?
by dbmathis (Scribe) on Jul 28, 2007 at 23:49 UTC | |
|
Re^2: Is it possible to split a hash key?
by Anno (Deacon) on Jul 29, 2007 at 12:13 UTC | |
by almut (Canon) on Jul 29, 2007 at 12:39 UTC | |
by Anno (Deacon) on Jul 29, 2007 at 13:23 UTC | |
by diotalevi (Canon) on Jul 29, 2007 at 17:31 UTC |