How to extract suffix from a filename?
Jonadab the Unsightly One
jonadab@bright.net
Tue Jun 26 18:54:00 GMT 2001
> Okay, it's a silly question - how can I extract the suffix from
> a file name (I know I can use "basename" and "dirname" to get
> the file and directory components)?
$filename =~ /[.]([^.])$/; $ext = $1;
-- jonadab
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
More information about the Cygwin
mailing list