in reply to Re: Trying to build a hash from a string...
in thread Trying to build a hash from a string...
... escaping a literal space, "/\ /", makes no sense.
It's pointless in this case, but it does no harm.
%info = split (/(":\ )/, $info);
However, putting the split pattern into a capture group /(":\ )/ causes the separator sub-strings to be returned along with the stuff one might possibly want, resulting, in this case, in a bunch of extraneous (Update: and confounding) '": ' thingies in the output list.
|
|---|