http://www.perlmonks.org?node_id=1044787


in reply to appending file name

Consider using a regular expression,
#!perl use strict; my $filename = 'ABcde.cSv'; (my $fff = $filename) =~ s/\.csv$/_header.txt/i; print "$filename -> $fff\n";
poj