Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/perl
- use strict;
- use warnings;
- use Text::CSV;
- #object for csv
- my $csv = Text::CSV->new( {binary=>1, eol=>"\n", sep_char=>';'});
- #open file
- open my $fh, '<', 'brown.csv' or die $!;
- #loop
- while(<$fh>) {
- $csv->parse( $_ );
- my @columns = $csv->fields();
- print $columns[1], "\n";
- }
Add Comment
Please, Sign In to add comment