What I have so far is
I need help with making sure this is the proper or best regex to go about this. I just need the ext, not the filename. I also don't know how to then check to see if $ext is within the array. I know I could do it by using a hash instead but that seems like overkill. Hopefully a foreach() isn't needed.my @quicktime_ext = qw( .sdp .rtsp .rts .mov .qt .smi .sml .smil .avi .vfw .flc.fl +i .wav .bwf .aiff .aif .aifc .cdda .au .snd .ulw .mid .midi .smf .kar .qcp . +sd2 .amr .gsm .mpeg .meg .m2s .m1v .ma1 .m75 .m15 .mpm .mpv .mpa .3gp .3gpp .3 +g2 .3gp2 .mp4 .mpg4 .m4a .m4p .m4b .m4v .sdv .amc .swa .m3u .m3url .swf .fpx . +fpix .dv .dif); my $ext = $url; $ext =~ /$(\..+)/; $ext = $1;
Thanks.
In reply to file extensions by coldfingertips
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |