regex - Perl: use of uninitialized variable in nested foreach -


trying check array of strings against array of regex 's.

throws:

'use of uninitialized value in $string in pattern match (m//) @ myscript line '

if take out if statement, still gives warning prints each element in @string_list

foreach $expr (@expr_list) {    foreach $string (@string_list) {      if ($string =~ $expr) {         print $string,"\n"      }    }  } 

that means 1 of elements of @string_list undef.


Comments

Popular posts from this blog

How to understand 2 main() functions after using uftrace to profile the C++ program? -

c# - Update a combobox from a presenter (MVP) -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -