Gossamer Forum
Home : General : Perl Programming :

Problem

Quote Reply
Problem
Hi,

I am just going to give an example. I tried to explain it but I couldnt even understand what I was saying so here is the example of what I want to be able to do.

i have the following code:

($pos[0],$pos[1],$pos[2],$pos[3],$pos[4]) = split(/-/,$setmembers);

$setmembers is equal to 1-2-3-4-5

so I know that i need $pos[0] through $pos[4]. But what if I didnt know that it was 1-2-3-4-5 and lets say it was 1-2-3-4-5-6-7-8 how would I be able to know how many $pos variables i need?

Any help would be greatly appreciated.

Thanks,
Kurt
Subject Author Views Date
Thread Problem snowdude46 3849 Jan 19, 2004, 8:57 PM
Thread Re: [snowdude46] Problem
yogi 3741 Jan 19, 2004, 10:43 PM
Post Re: [yogi] Problem
snowdude46 3729 Jan 20, 2004, 12:08 PM