I am using the following code for reading the last line of a csv file. How do I split the line received into an array?
use warnings;
use Tie::File;
tie my @file, 'Tie::File', 'server1-20130205.csv', mode=>O_RDONLY or die $!;
print $file[-1];
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
See Text::CSV.
Using
$file[-1]assumes there are no newlines in your fields.