@split_hit_non_barrel=split(/\n/, $separate_hit_non_barrel);
Since split absorbs its seperators, it would then return an empty list.
The first entry of an empty array would give an undef value:
$hit_line_non_barrel=$split_hit_non_barrel[0];
Using an undef value for a match would give a warning then:
This is just guessing, using the Perl debugger would be much better. You can even customize the debugger, so it stops right at the point when the warnings occurs -> Re: Debugging a program and Re^3: Debugging a program allowing you to look what has gone wrong while having the whole context available. I am using this regularly with my code.$hit_line_non_barrel=~/^(.*?)\s+/
In reply to Re: Can you tell me why I get this error and if I can optimize my code somehow?
by hexcoder
in thread Can you tell me why I get this error and if I can optimize my code somehow?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |