in reply to Re: Array ending up empty when processing more than a single file
in thread Array ending up empty when processing more than a single file
The sub keyword will only define the subroutine once
This is interesting and, to me at least, unexpected. Why does this only warn once instead of twice?
perl -wle 'for(1,2){ sub moo{} }; sub moo{}' Subroutine moo redefined at -e line 1.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Array ending up empty when processing more than a single file
by Eily (Monsignor) on Oct 05, 2017 at 16:44 UTC | |
by LanX (Saint) on Oct 05, 2017 at 17:35 UTC | |
by Your Mother (Archbishop) on Oct 05, 2017 at 18:01 UTC | |
by Eily (Monsignor) on Oct 06, 2017 at 01:36 UTC | |
by LanX (Saint) on Oct 06, 2017 at 01:57 UTC | |
by Eily (Monsignor) on Oct 06, 2017 at 08:10 UTC | |
|