in reply to Allocated memory to Script
The simple way:
#! perl -slw use strict; open FH, '<', $ARGV[0] or die "file not found"; my $line = 0; my %hash ; while( <FH> ) { $hash{ $line } = undef; #6ht line $line++; } close FH; print `tasklist /nh /fi "PID EQ $$"`; __END__ c:\test>junk3 junk.dat perl.exe 1128 Console 1 29 +,176 K
That said, your code makes no sense. You are keying a hash with consecutive numbers, why not use an array? But then your values are undef, what is the point?
|
|---|