How to extract suffix from a filename?

Jonadab the Unsightly One
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:
Bug reporting:

More information about the Cygwin mailing list