On Tue, 18 Mar 2003, Marcelo Taube wrote: > As u probably have guessed some part of my code is not working properly and > i don't understand why!! > > This is the code. > ##################################### > $file_completename =~ /(.*?)\.(.*)/; > if ($2 eq $extension]) { > #DO SOMETHING!!! > } > #####################################
You should use the split function here: my @file = split /\./, $file_completename; $file[1] will contain the extension, without the leading . -- Brett http://www.chapelperilous.net/ ------------------------------------------------------------------------ When you speak to others for their own good it's advice; when they speak to you for your own good it's interference. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]