in reply to School assignment

Hello mb92,

I think you answer lies on File::Find. There is a really easy to follow tutorial that practically gives the answer to your question here Beginners guide to File::Find.

The way that I would solve your problem would be something like:

print "Enter a file to look up for: "; my $file = <STDIN>; chomp $file; # Get rid of newline character exit 0 if ($file eq ""); # If empty string, exit. use File::Find; my $dir = # whatever you want the starting directory to be find(\&do_something_with_file, $dir); sub do_something_with_file { #.....count number of lines of the file and simply concatenate the + lines. #.....$numlines[$i++] . each line etc. etc. }

Hope this helps.

Seeking for Perl wisdom...on the process of learning...not there...yet!