Hi guys
I was wondering if you could help me.
 
I have the following row of data in one file:
 
405^100^200^A^B C D E
 
I have the following fragment of code that reads the data row:
 
while (<FILE_OPENED>) {
          $number_of_elements= 0;          
          chop;
          ($record, $customer, $location, $plan, @items) = split(/\^/, $_);
          $number_of_elements= $#items +  1;
          print "number_of_elements: $number_of_elements\n";
}
 
At the moment, the program prints out the value of "number_of_elements" to
be 1.
However "number_of_elements" should print out 4 because there are 4 values
(i.e. B, C, D, E)
 
Any ideas where I am going wrong ?
Any advice would be greatly appreciated.
 
Thanks in advance
Tony

 
 
 
 

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to