Quick question,
 is there another way of ending the input of information into an array?
Didn't know that CTRL-Z had to be used to terminate the input from the user
before the rest of the prog would work. :o)
 like, for example, is there a way of limiting the size of the array to only
1 or 2 entries?
 Apologies if I'm asking a no-brainer question here, have yet to reach the
chapter on arrays and thought I'd ask considering i'll be using it a lot.

DerekB

-----Original Message-----
From: Rob Anderson [mailto:[EMAIL PROTECTED]
Sent: 25 June 2003 14:33
To: [EMAIL PROTECTED]
Subject: Re: Array Question



>"Anthony Beaman" <[EMAIL PROTECTED]> wrote in message ?
>news:[EMAIL PROTECTED]
>I typed in 3. For example, "Sam Mary Joe". I expect to get "I know Mary",
since she's [1] but I'm getting
>a blank space. I've tried this on NT and on my 98 machine here at work.

Hmm, are you just putting spaces between your names. You'll get a new
element in your array each time you press enter if you use "@array =
<STDIN>".

Can you confirm your input data is.

Sam[RETURN]
Mary[RETURN]
Joe[RETURN]
CTRL-Z[RETURN]    (as you're on windows)

try printing $names[0] to prove the point, or print the entire array with...

foreach my $name (@names) {
    print "==> $name\n";
}

Good luck





-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


************************************************************************
Meteor web site http://www.meteor.ie
************************************************************************


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to