This will supply 2 elements to properly populate the hash if the match succeeds.{ s/\.\d+//g; $1=>$2 if/(.+)\s+\|\s+(.+)/; }
However, on match failure, the return value is undef() (I think), but the important thing is that a single (ODD NUMBER) value is returned, so the hash is not happy.
Update:
I would correct it as :
{ s/\.\d+//g; /(.+)\s+\|\s+(.+)/ ? ($1=>$2) : () }
I hope life isn't a big joke, because I don't get it.
-SNL
In reply to Re^3: Debugging help!
by NetWallah
in thread Debugging help!
by invaderzard
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |