11/09/2011 03:36 by LindaRodrigues
Create a new text file in a text editor. Any text editor will do, including Windows Notepad, but the file should end with the ".pl" file extension and not ".txt" or ".rtf."
Paste the following signature to the first line of the text file. Though not required, it helps if you distribute your work to others or forget later what language the script is using.
#!/usr/bin/perl
Add the following line to the text file to import the Perl CSV parsing library:
use Text::CSV;
Parse and print out the contents of a CSV file by pasting these lines:
my $input = 'file.csv';
my $parser = Text::CSV->new();
open (CSV, "parse($_)) {
my @columns = $parser->fields();
print "@columns\n";
}
}
close CSV;
Replace 'file.csv' with the name of the CSV file to parse.
A: Open the Yahoo! Mail website at Mail.Yahoo.com and sign in with your username and password. Click the "Available," "Busy" or "Invisible" l...(more)
A: Download, install and open SolidWorks. Click "File" in the toolbar. It is located in the upper-left corner of the software window. Click...(more)
A: Create an instance of the file system object. The file system object is a standard object within ASP that allows for the manipulation of fil...(more)
A:From Windows Explorer Click the "Start" Menu then click "Run" and type "explore" into the dialog box to open Windows Explorer. This will bri...(more)
A: Start Solaris by booting the computer and waiting for the operating system to load. Only administrators have access to lastlog functions, so...(more)
Added Successfully!
×Voted Successfully!
×You can't vote for yourself
×You can't choose your own answer
×