 |
|
Home:
Perl Programming Help:
Beginner:
Re: [eyebrowsbutt] Reading files from directory and subdirectory:
Edit Log
|
|

Zhris
User
Sep 11, 2012, 1:17 PM
Views: 994
|
|
Re: [eyebrowsbutt] Reading files from directory and subdirectory
|
|
|
Hi, I haven't tested your code but I immediately notice a couple of issues. The first thing the subroutine list_recursively does is assign $directory with 'all.fna' regardless. You most likely meant to assign $directory the first argument passed in:
my $directory = 'all.fna'; my $directory = shift;
I'm pretty certain you don't mean to print the result of $directory divided by $file. Don't forget to wrap in double quotes to ensure the value is interpolated appropriately. Also chuck in \n for readability purposes:
print $directory/$file; print "$directory/$file\n";
Finally, not sure if you meant to put an exit at the end of the GC subroutine. There are also 2 closing curly braces afterwards (I am unable to tell if they are both necessary due to the formatting of your code upon post). Thats a start! Chris
(This post was edited by Zhris on Sep 11, 2012, 1:26 PM)
|
|
|
Edit Log:
|
|
Post edited by Zhris
(User) on Sep 11, 2012, 1:17 PM
|
|
Post edited by Zhris
(User) on Sep 11, 2012, 1:18 PM
|
|
Post edited by Zhris
(User) on Sep 11, 2012, 1:20 PM
|
|
Post edited by Zhris
(User) on Sep 11, 2012, 1:25 PM
|
|
Post edited by Zhris
(User) on Sep 11, 2012, 1:26 PM
|
|
|  |