- or download this
my @data = <$fh>;
- or download this
my $data_ref;
@$data_ref = <$fh>;
- or download this
my $data_ref = [ <$fh> ];
- or download this
$ ls -lSr text_?_1
-rw-r--r-- 1 ken staff 1000 8 Feb 2013 text_K_1
-rw-r--r-- 1 ken staff 1000000 8 Feb 2013 text_M_1
-rw-r--r-- 1 ken staff 1000000000 8 Feb 2013 text_G_1
- or download this
#!/usr/bin/env perl -l
...
print 'size($data_ref): ', size($data_ref);
print 'total_size($data_ref): ', total_size($data_ref);
}
- or download this
$ pm_1171361_mem_use_array.pl ~/local/dev/test_data/text_K_1
size(\@data): 144
...
total_size($data_ref): 1494
size($data_ref): 144
total_size($data_ref): 1494
- or download this
$ pm_1171361_mem_use_array.pl ~/local/dev/test_data/text_M_1
size(\@data): 80064
...
total_size($data_ref): 1420366
size($data_ref): 80064
total_size($data_ref): 1420366
- or download this
$ pm_1171361_mem_use_array.pl ~/local/dev/test_data/text_G_1
size(\@data): 80000064
...
total_size($data_ref): 1420322314
size($data_ref): 80000064
total_size($data_ref): 1420322314