Assuming they supply an accurate name:
$filename = "/foo/bar/myfile.txt"; ($ext) = $filename =~ m/\.(\w+)$/; print $ext;
cheers
tachyon
s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print
In reply to Re: filetype extension query
by tachyon
in thread filetype extension query
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |