First off, please try to learn how to use the preview button. If things don't look easy to read to you, probably it isn't easy for us to read, either.
Second, the diamond operator, <> is only special in special circumstances. You need to do something like this:
This is so that when you add $_ to @arr1, it actually has something in it. Actually, we've lost a lot of specialness here already. So you also likely need to add 'defined' like this:while (($i <= 4) and ($_ = <>))
You also should look at things like push as a way to add something to the end of an array.while (($i <= 4) and defined ($_ = <>))
In reply to Re: Input to array from STDIN, then print, but print is not working
by Tanktalus
in thread Input to array from STDIN, then print, but print is not working
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |