If you want to collect something into an array it is not beneficial to clear that array in every loop iteration. Put my @commands_run = (); before the loop instead of inside the loop and it should work
In reply to Re: sending commands to CLI and then appending to end of array with push
by jethro
in thread sending commands to CLI and then appending to end of array with push
by sqspat
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |