Rob Roudebush wrote:

>  Okay my script takes names from a fom and puts them into an array - then later I 
>need to match a $variable (one of the names) against that array and take that 
>specific element out of the array. I figure there is probably an easy function to do 
>this?
> @array=(john, lucy, mike);
> $name=john  
> I need to modify the array and remove john.


one way i've done this in the past is to create a hash with the array 
values as keys and their position in the array as the value.  then you 
just have to check if the hash key exists and use splice to remove that 
element from the array.


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

Reply via email to