Advertisement
happy-barney

Idea - IO::Text__CSV_XS

Mar 26th, 2021
294
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. use IO::Text::CSV_XS;
  2.  
  3. IO::Text::CSV_XS::open my $fh, '<', $file,
  4. columns => 'detect',
  5. column_names => 'lc',
  6. record => 'HASH',
  7. %options
  8. or die ...;
  9.  
  10. while (my $record = <$fh>) {
  11. ...;
  12. }
  13.  
  14. IO::Text::CSV_XS::open my $fh, '>', $file,
  15. columns => [qw[ foo bar ]],
  16. column_names => 'uc',
  17. record => 'HASH',
  18. %options
  19. or die ...;
  20.  
  21. print $fh [qw[ 1 2 ]], [qw[ 3 4 ]], { foo=> 5, bar => 6 };
  22.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement