Help for this page

Select Code to Download


  1. or download this
    opendir HTMLDIR, $directory_name or die "Can't open $directory_name: $
    +!\n";
    while (readdir (HTMLDIR)) {
        push @images, $_) if /\.(png|jpg|gif|tiff)/;
    }
    
  2. or download this
    foreach ((readdir(HTMLDIR)) {
    # stuff
    }
    
  3. or download this
    my @files = grep { /png|gif|jpg|tiff$/ } (readdir(DIR));