Guest User

Untitled

a guest
Jul 22nd, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. use strict;
  2. use warnings;
  3.  
  4. my $file = shift;
  5.  
  6. my $datas = [];
  7.  
  8. open my $fh, '<', $file
  9. or die "Cannot open '$file': $!";
  10.  
  11. while (my $line = <$fh>) {
  12. chomp $line;
  13.  
  14. my @record = split /,/, $line;
  15.  
  16. push @$datas, \@record;
  17. }
  18.  
  19. close $fh;
  20.  
  21. 1;
Add Comment
Please, Sign In to add comment