open(plate_file,'<',$filename.".csv") or die "Can't open: $!";
See open,perlopentut for some more details.
#!/usr/bin/perl use strict; use warnings; my @data; while(<DATA>) { my @row = split /,/,(/(.*)\n?/)[0]; # <-- nice and clear, right? shift(@row); push(@data,@row); } print join "\n", @data; __DATA__ 1,2,3,4 2,3,4,5 3,4,5,6
I could go on, but that should give you plenty to chew on.
In reply to Re: Removing Newline Characters from File Data (chomp not working)
by kennethk
in thread Removing Newline Characters from File Data (chomp not working)
by mlux
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |