in reply to Array of strings search
my ($date) = split /'[A-z]*.[0-9]*.[0-9]*:[0-9]*:[0-9]*/, $x;
The leading single quote is not part of the data, so your regex will not match. Even if it did match, you are losing precisely the data you want to retain.
Better to either split on something appropriate (like whitespace) and work on those fields, or else extract via a regex with m// without splitting.
Addendum: Or use substr for fields of fixed position and width such as the timestamp.
|
|---|