Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Perl (http://www.velocityreviews.com/forums/f17-perl.html)
-   -   Multiple input lines (http://www.velocityreviews.com/forums/t24573-multiple-input-lines.html)

Elizabeth Gary 11-12-2003 04:14 AM

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.


Leonard



Gunnar Hjalmarsson 11-12-2003 05:21 PM

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[0] = <STDIN>;

or

push @address, scalar <STDIN>;

This group is defunct, so you'd better use comp.lang.perl.misc instead.

--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl



All times are GMT. The time now is 08:43 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.