in reply to Re: optimise perl code
in thread optimise perl code

I remove some thing ...
(my $newValue = $tempValue) =~ s|([^/]*)$|$temp1.$temp2.$1|;
and now works well
#!/usr/bin/perl -w
use strict;

my $tempValue = "/home/madam/scripts/madam.tcl";
my $temp1 = "temp1";
my $temp2 = "temp2";
(my $newValue = $tempValue) =~ s|([^/]*)$|$temp1.$temp2.$1|;
print $newValue;