can i compare individual string with complete array i am comparing excel row with array using the following way, description variable contains string to match with @steps_name array
my @steps_name=("1-2 Steps", "5-7 Steps", "8-10 Steps", "11-15 Steps") +; foreach $sheet (@{$workbook->{Worksheet}}) { foreach $col ($sheet->{MinCol} .. $sheet->{MaxCol}) { if ($sheet->{Cells}[0][$col]->{Val} eq "DESCRIPTION") { $description = $col; } } foreach $row ($sheet->{MinRow}+1 .. 50) { my $db_description = $sheet->{Cells}[$row][$description]->{ +Val}; my $needle_regex = quotemeta $db_description; if (grep { /(?i)\Q$db_description\E/ } @steps_name) + { print "<br><h1>Element '$db_description' found $st +eps_name[$row+1] --- $seq_code[$row+1] !</h1></br>" ; } else { print "<br>$db_description not found </br>" } push(@excel_array,$db_description); }## end of for each }
In reply to compare individual string with complete array by rohan_532
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |