"be consistent" | |
PerlMonks |
Re: list dir contents, w/o some stuffby Rich36 (Chaplain) |
on Jan 14, 2002 at 12:21 UTC ( [id://138541]=note: print w/replies, xml ) | Need Help?? |
You're very close on this one... The other problem is with the unless statement. $f eq @noshow won't work. It won't tell you if $f is equal to a value in @noshow. What you need to do is use the grep function. This pulls out information from a list based on the criteria that you set. In the code below, it searches for $f in the list of filenames not to display. If it finds it, it won't print it out. Finally, another recommendation - use CGI or die. The module CGI.pm provides many, many built in functions for creating CGI scripts. It's invaluable for creating CGI programs.
Rich36 There's more than one way to screw it up...
In Section
Seekers of Perl Wisdom
|
|