Perl: Directory Read
Read the contents of a directory of images. Exclude the non-image directory entries. Create a caption by deleting the file extension and capitalizing the file name.
Choose a directory: Comics • Embroidery • Carving • Tech
![](../images/stone/04_judah.jpg)
![](../images/stone/08_asher.jpg)
![](../images/stone/12_benjamin.jpg)
![](../images/stone/07_gad.jpg)
![](../images/stone/01_reuben.jpg)
![](../images/stone/11_joseph.jpg)
![](../images/stone/05_dan.jpg)
![](../images/stone/10_zebulun.jpg)
![](../images/stone/02_simeon.jpg)
![](../images/stone/06_naphtali.jpg)
![](../images/stone/09_issachar.jpg)
![](../images/stone/03_levi.jpg)
We can change the order of the files (for example, birth order instead of alphabetical order) by prepending each file name with a number and removing the number from the caption string.
Images courtesy of:
Stone Paperweight at World of Judaica
Embroidery Designs at 4-Hobby.com
Dumbing of Age
Scary Go Round
Questionable Content