#!/usr/bin/env perl use strict; use warnings; use NetAddr::IP; use SNMP_util; use Text::CSV (); my $csv = Text::CSV->new({binary => 1}) or die "Can't use Text::CSV: ".Text::CSV->error_diag(); open my $fh, "<:encoding(utf8)", "formerlyBridges2Input.csv" or die "Can't open CSV: $!"; while (my $row = $csv->getline($fh)) { # $row is now an array reference containing the # CSV's fields. # If the line is "a,b,c" then we will have: # $row->[0] "a" # $row->[1] "b" # $row->[2] "c" }