http://qs321.pair.com?node_id=1196287


in reply to Spreadsheet::Read not reading CSV data passed as string

It appears that ReadData requires a file handle when using the csv parser. The following seems to work.
#!/usr/bin/env perl use strict; use warnings; use v5.10; use Data::Dumper; use Spreadsheet::Read; my $data_str = "A,B,C\na,b,c"; open (my $fh, '<', \$data_str ) or die 'Could not open file handle'; my $data = ReadData( $fh, parser=>"csv", debug => 9 ); close($fh); say Dumper $data; exit;