Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I'm new to Perl, so my question might seem stupid, but please don't laugh.
I want to write a program to capture all incomes to be enterred by the user. I can print a question, and prompt for user to enter their different incomes and capture these with the use of an array as per below:
My problem is, how can I put a stop to the array without prompting for user to press Ctl+D to enter an EOF?print "Enter incomes: /n"; @income=<STDIN>;
Your help is much appreciated!
Thanks & regards,
PerlNovice
update (broquaint): added formatting + <code> tags
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Array input
by diotalevi (Canon) on Nov 14, 2002 at 03:39 UTC | |
by Anonymous Monk on Nov 14, 2002 at 03:47 UTC | |
by diotalevi (Canon) on Nov 14, 2002 at 03:50 UTC |