alchang ,
If there was no output at all, then you likely have an empty file. That code should have done 1 of 2 things:
1. Generated an error because you were unable to open the file
2. Printed every line in the file
Since it did neither, I must assume that the file exists, you can open it, but that it is empty. Using a module will not change that. I recommended it because CSV can be tricky but you aren't yet at the tricky part.
Update: Since you have said elsewhere in the thread that the file is 63MB - consider that you may have two files with the same name in different directories. Since you have not told perl to open a file with an absolute path, it is looking for a file in the same directory that you executed perl from.
| [reply] [d/l] |
I think i gave Perl a path to find the file but there is still no output. To be sure I did the right thing here's what I changed:
open(my $fh, '<', 'C:\bio stuff\Aubrey\'s project\dev.csv') or die "Un
+able to open 'dev.csv' for read
Is that what you meant? | [reply] [d/l] |
alchang,
Yes, that is an absolute path. I apologize if the following sounds a bit hand-holdy, but it is difficult to troubleshoot without seeing what you see:
C:\>cd "bio stuff\Aubrey's project"
C:\bio stuff\Aubrey's project>more dev.csv
hit q once you are satisfied that the file is not empty
C:\bio stuff\Aubrey's project>notepad testit.pl
Copy and paste my code exactly into testit.pl - without absolute path
C:\bio stuff\Aubrey's project>perl testit.pl
If that produces no output and all the steps leading up to it appear to be successful, I give up.
| [reply] [d/l] |
open(my $fh, '<', 'C:\\bio stuff\\Aubrey\'s project\\dev.csv')
<–radiant.matrix–>
Ramblings and references
The Code that can be seen is not the true Code
I haven't found a problem yet that can't be solved by a well-placed trebuchet
| [reply] [d/l] |