#! /usr/bin/perl use strict; use warnings; use diagnostics; print "########## memory usage of perl start of execution ###########\n"; system("tasklist | grep perl"); print "##############################################################\n"; for(my $iter = 0; $iter < 5000; $iter++){ system("adb devices"); print "iteration Completed : $iter\n"; } print "########## memory usage of perl end of execution ###########\n"; system("tasklist | grep perl"); print "##############################################################\n";