Julian Martin wrote:
> 
> Hi
> I am new to perl and would like to make a asp page with a script that will
> find all files in a given directory and create links to different files in
> another directory. The two sets of files are images (thumbnails and big
> pics) so I would also like to show the thumbnails on the page and have the
> links to the bigger pics.
> I already have all the images and do not need a thumbnail generator. I just
> want it so that when I add new images thats it. I am not asking for a
> complete answer only a pointer towards which functions would best do this
> job etc.
> Any help you can give would be great.
> Ju.
> 

This isn't really an Apache::ASP ( or modperl ) question, so in the 
future another forum should be used for posting perl questions of
this nature like news:comp.lang.perl.misc ... for Apache::ASP issues the 
list is [EMAIL PROTECTED], subscribe at [EMAIL PROTECTED]

# find all files in a given directory
my @files = globa("/path/to/dir");

# create a link to another file, see perldoc -f symlink
symlink($old_file, $new_file) || die("can't symlink $old_file to $new_file: $!");

If you are unix, and are more familiar with command line commands,
then you can also do:

  my $output = `ln -s $old_file $new_file`;
  $output || die("error doing ln -s $old_file $new_file: $output");

If glob() doesn't work on your platform, you can try 
opendir(), readdir(), closedir()

Since it sounds like you are writing a gallery, you might try
instead to use one already written like Apache::Gallery.

--Josh

_________________________________________________________________
Joshua Chamas                           Chamas Enterprises Inc.
NodeWorks Founder                       Huntington Beach, CA  USA 
http://www.nodeworks.com                1-714-625-4051

Reply via email to