in reply to Re^2: undef a variable for a loop
in thread undef a variable for a loop
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: undef a variable for a loop
by ikegami (Patriarch) on May 15, 2009 at 19:00 UTC | |
by kennethk (Abbot) on May 15, 2009 at 19:28 UTC | |
by ikegami (Patriarch) on May 15, 2009 at 19:34 UTC | |
by kennethk (Abbot) on May 15, 2009 at 19:43 UTC | |
by ikegami (Patriarch) on May 15, 2009 at 20:48 UTC | |
by csiepka (Initiate) on May 15, 2009 at 21:33 UTC |