ganilmohan has asked for the wisdom of the Perl Monks concerning the following question:

May be this question looks silly but very IMP for me. Can someone suggest me what function is used to hit ENTER in the keyboard?

Replies are listed 'Best First'.
Re: hit ENTER in the keyboard
by ww (Archbishop) on Aug 22, 2008 at 13:10 UTC
    I generally tap it with my right little finger.

    If this is a silly answer, please provide more information on what you're trying to do, on what OS, etc.

    Or, maybe, show us what you've tried, and what references you've read?
Re: hit ENTER in the keyboard
by Illuminatus (Curate) on Aug 22, 2008 at 13:13 UTC
    Sounds like you need a robotic arm with either an IP or serial interface :)
    Your question is woefully lacking in details. What you really want to do is send either a LF or a CR-LF to some process, presumably one currently selected in a GUI. The problem is that in most cases (at least for unix), the pipes between the keyboard input and STDIN for the connected application may not be writeable by other processes. There are a few CPAN modules that support keyboard input interception. You could then act as a kind of proxy and inject extra data whenever you want.
Re: hit ENTER in the keyboard
by zentara (Cardinal) on Aug 22, 2008 at 13:16 UTC
Re: hit ENTER in the keyboard
by Anonymous Monk on Aug 22, 2008 at 13:19 UTC
Re: hit ENTER in the keyboard
by Skeeve (Parson) on Aug 22, 2008 at 15:43 UTC
    How can a question be a fairy or demon to someone? At least wikipedia describes an IMP as a fairy or demon. Please elaborate.

    s$$([},&%#}/&/]+}%&{})*;#$&&s&&$^X.($'^"%]=\&(|?*{%
    +.+=%;.#_}\&"^"-+%*).}%:##%}={~=~:.")&e&&s""`$''`"e