"be consistent" | |
PerlMonks |
Re: Is it possible to split a hash key?by diotalevi (Canon) |
on Jul 28, 2007 at 23:06 UTC ( [id://629340]=note: print w/replies, xml ) | Need Help?? |
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 /\./. ⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊
In Section
Seekers of Perl Wisdom
|
|