int constrainedCount = yourSequence.Take(2).Count();
// if constrainedCount == 0 then the sequence is empty
// if constrainedCount == 1 then the sequence contains a single element
// if constrainedCount == 2 then the sequence has more than one element
чит: переименовать data.csv
в data.xls
. excel открывает его, и вы никогда не заметите разницы
Модуль Perl ExcelWriter позволит вам создавать электронные таблицы Excel.