Is it possible to remove an array element by its actual value. For instance:
$input_Color=Green;
@array=(Red,Blue,Green,Yellow,Black);
splice(@array,$input_Color);
The problem is I do not know the value of $input_Color, and I would not know the index of which element to remove without creating a bunch of IF statements or cycling it through a loop (Which I am currently doing)
$input_Color=Green;
@array=(Red,Blue,Green,Yellow,Black);
splice(@array,$input_Color);
The problem is I do not know the value of $input_Color, and I would not know the index of which element to remove without creating a bunch of IF statements or cycling it through a loop (Which I am currently doing)