in reply to file data vs data in script

while (<XLSFILE>) already reads the file line by line, no point in splitting on newlines again (there will be just one line, ending in a newline). If you want all lines in an array, just do: @accounts = <XLSFILE>;, without an explicite while.

Replies are listed 'Best First'.
Re^2: file data vs data in script
by rev_1318 (Chaplain) on Jan 24, 2005 at 10:35 UTC
    and don't forget to chomp @accounts to get rid of unwanted newlines...

    Paul