in reply to Getting File Type using Regular Expressions
Just to be helpful, try something like $filename =~ /\.(jpg|gif|bmp)$/ for image files. I'll assume you can figure out the text file version from that. . .
- - arden.
Update: For more information, see Perl in a Nutshell Chapter 4 section 6, Programming Perl Chapter 1 section 7, Learning Perl Chapter 7 section 1, Perl Cookbook Chapter 6, or even the Tutorials here at PerlMonks!
|
|---|