in reply to Seemingly odd issue with push in foreach loops?
Check the documentation of printf. The first argument is supposed to be a format string, which is "md1" in your example and therefore will not print anything else. Change printf to print or use Data::Dumper to inspect your array and you will see that your code works as expected.
|
|---|