Multiple input lines
How can I enter in multiple input lines to an array? Example:
Enter your mailing address:
7660 Eyespy Court
Clinton, Mississippi 32322
When I try to do this perl just sits and waits for Ctrl-D or Ctrl-C and
quits my program.
Re: Multiple input lines
Elizabeth Gary wrote:
> How can I enter in multiple input lines to an array? Example:
> Enter your mailing address:
> 7660 Eyespy Court
> Clinton, Mississippi 32322
> When I try to do this
What is "this"? How about showing us the code you have so far?
Anyway, these suggestions might be what you need:
$address = <STDIN>;
push @address, scalar <STDIN>;
This group is defunct, so you'd better use comp.lang.perl.misc instead.
|All times are GMT. The time now is 10:02 AM.|
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.