Multiple input lines

E

Elizabeth Gary

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
 
G

Gunnar Hjalmarsson

Elizabeth said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top