Thanks for the tip on finding the array element number. T was thinking there was a special variable that keep that element number. But no my question is on the if statment you wrote:
foreach my $i (0..$#array) {
if (($array[$i] || "") =~ m/HELP/) {
$index_number = $i;
last;
}
}
I know what this is: if ($array[$i] =~ m/HELP/)
But what is this: if (($array[$i] || "") =~ m/HELP/)
foreach my $i (0..$#array) {
if (($array[$i] || "") =~ m/HELP/) {
$index_number = $i;
last;
}
}
I know what this is: if ($array[$i] =~ m/HELP/)
But what is this: if (($array[$i] || "") =~ m/HELP/)