in reply to array problem
A couple more suggestions. Instead of
you can do the same much more simply by justopendir DIR, "$dir"; my @arr = grep -f, grep /\.jpg$/i, map "$dir/$_", readdir DIR;
See "perldoc -f glob" for more information.my @arr = glob("*.jpg");
Also, when you call a subroutine you're gonna wanna do a &print_it or print_it(), but not a &print_it(). They are different, but you only have to tell Perl it's a subroutine once. :-D
Gary Blackburn
Trained Killer
In Section
Seekers of Perl Wisdom