in reply to Trying to read numbers from a text file
Also be aware that because of the way your file-reading while-loop is set up, you are getting values for $L $D $M etc. only for the very last line of the file. (Update: It might also be wise to introduce the use of warnings and strict into your code!)
Give a man a fish: <%-{-{-{-<
|
|---|