Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Perl Beginners > simple question
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 3 Topic 10996 of 11065
Post > Topic >>

simple question

by a_goor@[EMAIL PROTECTED] (Alex Goor) Apr 27, 2008 at 09:36 AM

i have a data set of stock orders and i want to count the number of unique
stock symbols in the set.  

i have turned the data set into an array and based on the message spec, i
can identify the stock symbols.  but i don't know how to make sure i'm
only counting unique ones.

i had thought to do an if statement along the lines of 


$symbolset = "@[EMAIL PROTECTED]
";
if $symbolset !~ /substr($message,17,6)/  #if the array doesn't contain
the new symbol
{
#then add it to the array
push (@[EMAIL PROTECTED]
 "substr($message,17,6)

}

substr($message,17,6) is the symbol info within each line of the array of
the data set.

the problem is that that doesn't work!

does anyone have any ideas how to do this?




 3 Posts in Topic:
simple question
a_goor@[EMAIL PROTECTED]   2008-04-27 09:36:15 
Re: simple question
krahnj@[EMAIL PROTECTED]   2008-04-27 09:58:03 
Re: simple question
rich.japh@[EMAIL PROTECTE  2008-04-27 12:47:42 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Thu May 15 0:28:31 CDT 2008.