This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Re: How to extract suffix from a filename?
- To: cygwin at cygwin dot com
- Subject: Re: How to extract suffix from a filename?
- From: "Jonadab the Unsightly One" <jonadab at bright dot net>
- Date: Tue, 26 Jun 2001 21:54:55 -0400
- Organization: There is no organisation.
- Reply-to: jonadab at bright dot net
> 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/