In article <[EMAIL PROTECTED]>, Alan C. wrote:
[...]
> print @foodlist, "\n\n";
> print "$foodlist[0]\n";
> print "$foodlist[1]\n";
>
> # hmm, @foodlist prints without space between each word; I not sure how
> to get a space put back in between each word there.
One "quick and easy way":
print "
Joshua Lokken wrote:
[ . . ]
While your way is much easier and works well, I wonder why
my original syntax did not produce the desired result?
Your (next, below) original syntax does produce the desired result here
(tested). Win32 Activestate Perl 5.61 build 633
#!perl
print "Enter 5 of your fav
oshua
> -Original Message-
> From: Dan Muey [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 28, 2003 2:16 PM
> To: Joshua Lokken; [EMAIL PROTECTED]
> Subject: RE: printing elements of an array
>
>
> > > Hello
>
> Howdy
>
> > >
> >
> > Hello
Howdy
> >
> > This should be very straightforward:
> >
> > print "Enter 5 of your favorite foods: ";
> > $favorites = ( );
[snip]
> >
> > The desired output would be:
> >
> > food1 food2 food3 food4 food5
> >
> > food1
> > food2
> > food3
> > food4
> > food5
> >
> >
> > Can so