sanjaysingh has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/local/bin/perl opendir DH, "Sanjay" or die "fail" ; while($temp = readdir(DH)) { print "$temp\n"; open FILE, "$temp" or die "fail"; print "pass"; while(<$temp>) { print "sucess"; } }
2006-03-29 Retitled by planetscape, as per Monastery guidelines
Original title: 'new to perl need help'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How do I read the contents of each file in a directory?
by merlyn (Sage) on Mar 29, 2006 at 03:47 UTC | |
|
Re: How do I read the contents of each file in a directory?
by NetWallah (Canon) on Mar 29, 2006 at 04:25 UTC | |
|
Re: How do I read the contents of each file in a directory?
by gube (Parson) on Mar 29, 2006 at 04:49 UTC | |
|
Re: How do I read the contents of each file in a directory?
by mk. (Friar) on Mar 29, 2006 at 14:08 UTC |