Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Re^3: Debugging help!

by NetWallah (Abbot)
on Aug 31, 2012 at 14:35 UTC ( #991016=note: print w/ replies, xml ) Need Help??

in reply to Re^2: Debugging help!
in thread Debugging help!

{ s/\.\d+//g; $1=>$2 if/(.+)\s+\|\s+(.+)/; }
This will supply 2 elements to properly populate the hash if the match succeeds.

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.

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.

Comment on Re^3: Debugging help!
Select or Download Code

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://991016]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (5)
As of 2016-02-06 16:53 GMT
Find Nodes?
    Voting Booth?

    How many photographs, souvenirs, artworks, trophies or other decorative objects are displayed in your home?

    Results (233 votes), past polls