heres the really strange thing...i run it with a -d flag, and after the split (you were right, changed it to /\n\n/), @sections is assigned "4881", i dont know why. its not returning scalar because there are only about 800 lines in the text file im inputting. and it IS loading the file contents into @infile, i verified that.