Hi Everybody,
I am new registered user however I've been reading this great forum for a long time. However did not find answer to the following question:
###
$a = "1A"; # values will be changing
$b = "52"; # values will be changing
$c = "7_12"; # values will be changing
@myArray = ($b,$a,$c);
sub myArray_logic
{
my ($count) = @_;
if ( $count == 1 ){
$X = "some_String";
$Y = "some_Other_Sting";
$Z = "string";
}
elsif ( $count == 2 or $count == 3 )
{
$X = "StRinG";
$Y = "other_sTriNg";
}
This works fine for me, but it is based on the count of the array and if I have another array of change the order count, I would need to change all my conditions.
One more time:
If $count == 0 - it is "52"
I need my script to ALSO know that it is $b
Thank you in advance,
Zen20.net
I am new registered user however I've been reading this great forum for a long time. However did not find answer to the following question:
###
$a = "1A"; # values will be changing
$b = "52"; # values will be changing
$c = "7_12"; # values will be changing
@myArray = ($b,$a,$c);
sub myArray_logic
{
my ($count) = @_;
if ( $count == 1 ){
$X = "some_String";
$Y = "some_Other_Sting";
$Z = "string";
}
elsif ( $count == 2 or $count == 3 )
{
$X = "StRinG";
$Y = "other_sTriNg";
}
This works fine for me, but it is based on the count of the array and if I have another array of change the order count, I would need to change all my conditions.
One more time:
If $count == 0 - it is "52"
I need my script to ALSO know that it is $b
Thank you in advance,
Zen20.net