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.
In reply to Re: Seemingly odd issue with push in foreach loops?
by hdb
in thread Seemingly odd issue with push in foreach loops?
by akio_outori
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |