Margaret wrote:
> This is probably quite obvious - (but i am a newbie) how do i stop/hide the
> . and .. from appearing on my list as a hyperlink?
>
> Here's the code snippet
>
> opendir(WD,"./scripts/cgi-bin/NIS_REPORTS") ||
> die "Cannot opendir . (serious dainbramage): $!";
> foreach (sort readdir(WD))
> {
next if $_ eq '.' || $_ eq '..'; # ignore . and ..
next if $_ =~ /^\./; # ignore any .file
>
> print qq|<a href="NIS_REPORTS/$_">$_</a><br>\n|;
> }
> closedir(WD);
Or, to truly stop/hide .files from your list do this:
foreach (grep {!/^\./} sort readdir(WD))
{
print qq|<a href="NIS_REPORTS/$_">$_</a><br>\n|;
}
---
You are currently subscribed to perl-win32-users as: [archive@jab.org]
To unsubscribe, forward this message to
[EMAIL PROTECTED]
For non-automated Mailing List support, send email to
[EMAIL PROTECTED]