470,811 Members | 1,271 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,811 developers. It's quick & easy.

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
Jul 19 '05 #1
1 1990
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

Jul 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

12 posts views Thread by shank | last post: by
17 posts views Thread by nergal | last post: by
19 posts views Thread by =?Utf-8?B?QnJpYW4gQ29vaw==?= | last post: by
reply views Thread by mh121 | last post: by
reply views Thread by mihailmihai484 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.