The problem comes when you need to build a list of indexes as with the OPs code:
sub checkMem{ `tasklist /nh /fi "pid eq $_[0]"`; };; print checkMem( $$ );; perl.exe 3040 Console 1 +9,544 K $#a = 1e6;; print checkMem( $$ );; perl.exe 3040 Console 1 1 +7,428 K map{ $_ } 0 .. $#a;; print checkMem( $$ );; perl.exe 1224 Console 1 7 +3,272 K ### 56MB to build the list of 1e6 indices ###
In reply to Re^7: Abusing Map
by BrowserUk
in thread Abusing Map
by writch
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |