in reply to read/write perl variables to/from file
You may also want to look at Tie::File or dbmopen. The first links an array to a flat text file, the second will link a hash to a binary dbm file.
Cheers,R.