in reply to Reading from file, not to memory
Using this code, you code might look like:
# Tie the array @file to /path/to/file using a maximum of 1Mb of mem +ory tie my @file, 'Tie::File', '/path/to/file', 'memory' => 1_000_000 or die "Cannot open file - $!"; foreach my $line ( @file ) { # ... Your code follows ... }
This module is quite stable, despite the beta label given to it by its author, and works exceptionally well in a production environment (even under 5.005.03).
perl -le 'print+unpack("N",pack("B32","00000000000000000000001000110010"))'
|
|---|