@ZER0: Although I am not familiar with this "array" assignment i like this solution. I just modified regexp to /^([^-]*)-(.*)$/ as it seems to be more deterministic.