Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

Re^2: using hashes

by R56 (Acolyte)
on Sep 26, 2013 at 15:53 UTC ( #1055857=note: print w/ replies, xml ) Need Help??

in reply to Re: using hashes
in thread iterating hash keys?

Thanks Kenneth, I understand your code, but I may have more than one name in the same line, such as:





So we couldn't use that kind of cycling on the array positions, right? Or am I missing something?

Comment on Re^2: using hashes
Replies are listed 'Best First'.
Re^3: using hashes
by AnomalousMonk (Canon) on Sep 26, 2013 at 16:17 UTC
    ... am I missing something?

    You're missing what BrowserUk said here, an approach that processes an entire line at a time.

    The next part to think about is what happens if you encounter a 'word' in a line that doesn't exist in your translation hash, e.g., the line
    (hints: exists, next, maybe  // (defined-or) or  ?: (ternary/conditional operator) – see perlop for the latter two).

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (2)
As of 2016-02-07 06:09 GMT
Find Nodes?
    Voting Booth?

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

    Results (249 votes), past polls