on STDIN

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sasimca007
    New Member
    • Sep 2007
    • 129

    on STDIN

    Hello friends,
    I have a small doubt that when we want to take a value from keyboard we use STDIN in perl. When we use that word the control will waits to take input and after giving the input we have to press enter at the end of input. Then only it consider the input or stores the value in some variable.

    But what my context is, after giving input we don't want to press enter i.e after giving the input it do the next action no pressing of enter.
    Can anybody solve this problem?
  • gaurav1086
    New Member
    • Oct 2008
    • 4

    #2
    hi there...the reason of pressing "enter-key" is to denote that you are marking the end of your input text stream.(data/keyword.. whatever....)
    if you dont press enter, how is perl going to interpret that the data input supplied by you.is of the extent limited by you..
    Alternately, you can press EOF ("ctrl-d") twice. it actually means 'end-of-file' but it can be used like that(mentioned above ) to signify end of your input text stream.

    Comment

    Working...