in reply to optimise perl code
(my $newValue = $tempValue) =~ s|([^/]*)$|".$temp1.$temp2.$1"|e [download]
Paul
(my $newValue = $tempValue) =~ s|([^/]*)$|$temp1.$temp2.$1|;
#!/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;