in reply to Re: read and link !
in thread read and link !

thank you for your help, but now how can create a link in my html page with @files ??? example: the folder is c:\temp the file is pippo.tif how can create ??? thank you claudia

Replies are listed 'Best First'.
Re: Re: Re: read and link !
by Anonymous Monk on Oct 29, 2002 at 16:01 UTC
    i'm sorry but i have lost a part of question: example: the folder is c:\temp - the file is pippo.tif. I need to create a href ..... of all files in $dir how can create ??? thank you claudia
      my $dir = '/path'; # the directory to list my $url = 'http://blah/path'; # the url for that directory opendir DIR, $dir or dir $!; my @links = map { qq(<a href="$url/$_">$_</a>) } readdir DIR; use CGI qw(ul li); print ul(li([@links]));
      --
      <http://www.dave.org.uk>

      "The first rule of Perl club is you do not talk about Perl club."
      -- Chip Salzenberg

Re: Re: Re: read and link !
by roik (Scribe) on Oct 29, 2002 at 16:44 UTC
    Try replacing the print statement above with :
    print "<a href=\"$dir$_\">$_</a>\n"
    I wonder if that is what you mean?
      thank you for your help claudia