RE: converting a list into array

2002-09-11 Thread eric-perl
On Wed, 4 Sep 2002, Bob Showalter wrote: >chomp(@list = ); >print join(',', map "'$_'", @list), "\n"; >__DATA__ >AAPL >AMCO >IBM >ORCL What is the __DATA__? Please explain. -- Eric P. Sunnyvale, CA -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional comman

Re: converting a list into array

2002-09-05 Thread ANIDIL RAJENDRAN
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 = );

Re: converting a list into array

2002-09-04 Thread Dharmendra Rai
Earlier you were reading from no where. In later case you started reading using the file handle. - Get a bigger mailbox -- choose a size that fits your needs.

Re: converting a list into array

2002-09-04 Thread Luinrandir Hernsen
Hallo I had to replace the pull down menues to text boxes on my order form. This means I need to filter out unwanted text. I need to make it alphanumeric only.for security reasons. I have red/bold the two lines I changed last time to eliminate all "0" "zero" orders. if you are not receiving th

Re: converting a list into array

2002-09-04 Thread david
[EMAIL PROTECTED] wrote: > The script gave a syntax error at > > chomp(my @data = ); that's sure going to give red flag. :-) > > However, when I tried with the following it worked - any ideas why? > chomp(my @data = ); > that's what i orginally posted but i guess my newsreader is trying to

Re: converting a list into array

2002-09-04 Thread sangeeta
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 = ); 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

Re: converting a list into array

2002-09-04 Thread sangeeta
Thanks a lot :) 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:

Re: converting a list into array

2002-09-04 Thread david
[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("','",

Re: converting a list into array

2002-09-04 Thread Bridget Benson
>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 Maybe open (FILE, "$filename"); # READS in one line at a time ($_ contains all characters on that line) while () { print "$_, "; } >

RE: converting a list into array

2002-09-04 Thread Bob Showalter
> -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, September 04, 2002 2:51 PM > To: [EMAIL PROTECTED] > Subject: converting a list into array > > > Hi, > > I have a file with a list of symbols: > > AAPL > AMCO > IBM > ORCL > > I want to print

Re: converting a list into array

2002-09-04 Thread Jeff 'japhy' Pinyan
On Sep 4, [EMAIL PROTECTED] said: >AAPL >AMCO >IBM >ORCL > >I want to print like >'AAPL','AMCO','IBM''ORCL' Have you tried anything? open FILE, "tickers.txt" or die "can't read tickers.txt: $!"; chomp(my @sym = ); close FILE; Now you have @sym with the tickers. If you want to print it w