Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
wow! for a first reply, it's pretty much impressive how much I'm benefiting from these brain storming, in both, Perl and grammatical sense! :P well, I was like "what if the person is he, then what if he is a she" then I thought of replacing it with an "it" for time saving purposes as my main concern was actually running the code! lol I totally agree with what you just mentioned, because I've been in the situation of printing the number of elements there and not only once but in the same number as key-value pairs was there! after fixing it, I can understand the context concept you're talking about! I understood it even more, from the latter example you proposed! loved how you made use of arrays to print the index of the key that has been entered by the user, and then printing it's value! what's interesting even more in your code and might need a bit of elaboration, if you don't mind me, is that part when you invoke the retHashVal and both parameters are scalars, while in it's body you would use the array's default variable in assigning to $n and $i .. how things are working there? depending on context I'd say that @_ would be converted implicitly to a scalar, is this how it goes in this case?

In reply to Re^2: Comparing Hash's key to an <STDIN> and print it's corresponding value by xxArwaxx
in thread Comparing Hash's key to an <STDIN> and print it's corresponding value by xxArwaxx

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2024-03-29 08:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found