Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^3: Why are my hash keys undefined?

by choroba (Cardinal)
on Feb 08, 2016 at 17:46 UTC ( [id://1154654]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Why are my hash keys undefined?
in thread Why are my hash keys undefined?

Windows line endings, then? The keys aren't empty, but contain "\r" at the end. When printed, the character moves the cursor to the beginning of the line, and the value then overwrites the key. Convert your files to the *nix format using dos2unix or fromdos, or apply
s/\r//
to your input lines.
($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,

Replies are listed 'Best First'.
Re^4: Why are my hash keys undefined?
by biologistatsea (Acolyte) on Feb 09, 2016 at 13:52 UTC
    Your quite right - the data wasn't in unix format and the function suggested solves the issue. Many thanks indeed!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (5)
As of 2024-04-19 10:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found