Hi,
The answer is in your question.
Cheers
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, September 04, 2002 1:49 PM
Subject: Re: converting a list into array
> The script gave a syntax error at
>
> chomp(my @data = );
>
> However, when I tried with the following it worked - any ideas why?
> chomp(my @data = <FOO>);
>
> On Wed, 04 Sep 2002 12:06:14 -0700 david <[EMAIL PROTECTED]> wrote:
>
> > [EMAIL PROTECTED] wrote:
> >
> > > Hi,
> > >
> > > I have a file with a list of symbols:
> > >
> > > AAPL
> > > AMCO
> > > IBM
> > > ORCL
> > >
> > > I want to print like
> > > 'AAPL','AMCO','IBM''ORCL'
> > >
> > > Thanks for the help
> > >
> > > Sangeeta
> >
> > you can try:
> >
> > open(FOO,'foo.txt') || die $!;
> > chomp(my @data = );
> > close(FOO);
> >
> > print "'",join("','",@data),"'";
> >
> > which avoid the map function all together
> >
> > david
> >
> > --
> > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> >
> >
>
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]