Tuesday, 19 January 2021

PERL Reading CSV File Format :

 PERL Reading CSV File Format : 


use Text::CSV;

  # Open Input File

  open(my $INP_CSV, '<',$input_file) || die( "Can't open file $input_file \n");

  my $csv = Text::CSV->new( { binary => 1 } );

 

  while ( my $row = $csv->getline( $INP_CSV) )

  {

       tr/\r\n//d for @$row;

       < required flow >

  }

 


No comments: