in reply to Re^2: How to add input history
in thread How to add input history

See the perldoc page DESCRIPTION for Term::ReadLine . You will need one of the Term::ReadLine::* packages.

I have Term::ReadLine::Perl

That's probably why it worked for me.

Replies are listed 'Best First'.
Re^4: How to add input history
by stevieb (Canon) on Apr 06, 2015 at 22:40 UTC

    That very well could be, but if I don't have a module installed, I would expect an error message.

    If I, someone who has used Perl since ~2001, doesn't get an error message from a missing package when I'm testing for valid output, how could one expect OP or a new user to know what to expect from code without any knowledge?

    Perhaps something in the upstream package should be told to say something. I'm not bitching, I'm just stating a point. There's something missing here :)

    -stevieb

    ps. I copied and pasted your exact code.

    pps. I suppose what I'm saying here is that if you are going to respond to a thread to help someone, either ensure the module you recommend errors out if dependencies aren't found, or put a clause in your post that says "may not work if X, Y, or Z isn't installed". Think about it... if you were a new user, would you immediately think to look up the perldoc info for a module if all you were looking for was code and you didn't see a responsible piece about "read perldoc for X module"?

      Yet another case of "No good deed goes unpunished."

        I want to say one last thing here. If I've offended you, I apologize. With that said, go peep some of the other programming forums out there and try to find one like this. You won't. I'm being nice. I like it here, and I hope you'll stay despite the ego hit. The universe knows I (along with many others) have taken several boots to the face.

        The interesting part is that I didn't put you down; I just stated where there may be a code issue within the code you posted that you didn't even know you used.

        -stevieb

        Coming from a couple of Anonymous posts, I'll take that as a compliment. Again homie, I'm not trying to put you down. I'm stating facts. I never said your post wasn't good; I'm just saying that it isn't helpful in the long-run, as it gives off erroneous output.

        Loosen up, or post as an individual before you make 'anonymous' claims like you have here. Sheesh. In my early days on PerlMonks, I got hammered when I posted something people above me knew better of. To this day, they will still hammer me. Important thing is to post as yourself, so when you are called out you are FORCED to learn. (expecting major kicks in 3.2..

        -stevieb