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

Input problem with Enter key...

by PriNet (Monk)
on Nov 07, 2016 at 02:11 UTC ( [id://1175401]=note: print w/replies, xml ) Need Help??


in reply to Input problem with Enter key...
in thread Input problem with Enter key...

i don't imagine it has anything to do with the fact i'm using strawberry on xp?

I tried re-inventing the wheel again, but everytime I push it, it still falls flat on it's side...

Replies are listed 'Best First'.
Input problem with Enter key...
by Marshall (Canon) on Nov 07, 2016 at 02:37 UTC
    I sincerely doubt that XP or Strawberry has anything to do with this! This very simple program should work on any version of Perl and on any platform!
    use warnings; use strict; print "type something: "; my $input = <STDIN>; print "you typed", $input; # of course: # print "you typed $input"; # would be the same
    I don't know if you are using some kind of development environment to run the code or not? Save this .pl file verbatim and run it from the Windows XP command line - not from within any development environment.

    Before posting, I tested this on Win XP to avoid a typo problem. I am using an Active State build, but that shouldn't matter in the slightest.

      i'm going to try the suggested reboot... I hadn't tried that yet because i was watching this post, but i have a way around that here...

      I tried re-inventing the wheel again, but everytime I push it, it still falls flat on it's side...
        A thousand thanx to everyone... I'm not sure what happened, but the reboot fixed it... I am so sorry i didn't "think" of that myself, we all probably know that reboots will fix alot of microsofts bugs... thank you everyone, now i can go on with my project...(thanx Ken)

        I tried re-inventing the wheel again, but everytime I push it, it still falls flat on it's side...
Input problem with Enter key...
by ww (Archbishop) on Nov 07, 2016 at 12:18 UTC

    Only if you're trying to run this as a one liner, which is contrary to what you said in the OP.

    If, however, a one liner is at work, MSWin (of any flavor) will hate your quoting. Oversimplifying just a bit, Windows demands double quoting the entire "script" and use of escaping or one of the quote-like (q/single quoted text/ [no interpolation] or qq/double quoted text/ [interpolates]) alternatives in the spots where a script would use double-quotes.


    check Ln42!

Log In?
Username:
Password:

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

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

    No recent polls found