in reply to How can I make this code ignore case ?
in thread Upper / Lower case extensions

$file =~ s/\.dat//i;
see:perlre

Replies are listed 'Best First'.
Re: Re: How can I make this code work ?
by Anonymous Monk on Jul 30, 2002 at 19:58 UTC
    Or alternately: $file =~ s/\.(dat|DAT)//; (although why you would want to *not* cope with .DaT I don't know)