Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: easy as

by Sherlock (Deacon)
on May 11, 2001 at 17:45 UTC ( #79708=note: print w/ replies, xml ) Need Help??


in reply to easy as

Well, it looks to me like you're trying to convert a C++ program to Perl. If that's the case, there isn't a CIN and COUT in Perl. Use these instead:

use strict; print "Insert Employee Number: "; # Prompts the user my $empNum = 1; while ($empNum) { $empNum = <>; # Gets input from STDIN print "The employee number you enetered was: $empNum\n"; print "Insert Employee Number: "; # Prompts the user }
If you're still having trouble with things like this, check out Tutorials - there's lots more help there.

Update: The old code prompted for an empty line - use this instead. Sorry about that.

Good luck,
- Sherlock

Skepticism is the source of knowledge as much as knowledge is the source of skepticism.


Comment on Re: easy as
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (12)
As of 2015-07-02 11:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (34 votes), past polls