-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi all,

I'm trying to get data from several files using memory-mapped input,
i.e. I wrote the files with writeflex($outfile, $pdl1, $pdl2,...)
and now I try to get their contents into a set of  arrays

($h[$i],$x[$i],$y[$i]) = mapflex($infile[$i], {READONLY => 1});

Unfortunately, all $h,$x,$y contain tidentical data, i.e. those from the
last file mapped, $infile[max($i)]

Either I didn't get the gist of memory mapping, or I'm doing something
wrong, probably both, but what ?

I also wrote a 4-line routine for the reading, using private variable
inside, but to the same result:

sub read_pdl{
my $h; my $x; my $y;
($h,$x,$y) = mapflex($ARGV[0], {READONLY => 1});
return($h,$x,$y);
}

I didn't really expect this to work better, but what am I doing wrong ?
N.B. using readflex instead, I get the expected results.


- --

Dieter Meinert
~                    Visionär       (-
~                                   /\
- ------------------------------------------------------
~ Don't support spam - only use plain text for emails
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFIf1i/vPE3QtvTw0IRAic8AJ0Y/ULAeZMylZlBa7FlxXSdn4l/GgCg0qke
QgYQa3DcF+jptXxkG0ZrDNA=
=fYgB
-----END PGP SIGNATURE-----

_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl

Reply via email to