foreach $exch(@exch) { undef($su_adapter); undef($su_date); for($i=0; $i<=$#completefile; $i++) { if($completefile[$i]=~ m/^.+\\(.+)_.+\..+?:(.+?)\s-\s(.+?)\s.+ +?\/$exch\s\|.+::(.*Up)\(\)/) { $su_adapter=$1; $su_date=$2; } } print $su_adapter, $su_date; }
Note that there are a bunch of easy modifications (as shown in ikegami's post) that can simplify your code and reduce its predilection for bugs.
In reply to Re^3: undef a variable for a loop
by kennethk
in thread undef a variable for a loop
by csiepka
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |