Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com From: "Jonadab the Unsightly One" Organization: There is no organisation. To: cygwin AT cygwin DOT com Date: Tue, 26 Jun 2001 21:54:55 -0400 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Re: How to extract suffix from a filename? Reply-to: jonadab AT bright DOT net Message-ID: <3B3904AF.528.280120E@localhost> In-reply-to: X-Eric-Conspiracy: My name is not Eric. X-Platform: Windows '95 OSR2 (heavily adjusted and customised) X-mailer: Pegasus Mail for Win32 (v3.12) > 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/