On 1/24/07, Kevin Viel <[EMAIL PROTECTED]> wrote:
How can take the value of one variable, substitute say its suffix, and assign it to another? I have only figured out how to do it using an intermediate variable: if ( $code eq "" ){ my $base = $out ; $base =~ s/\.out$/\.cde/ ; $code = $base ; }
Are you wishing to simplify that code, maybe like this? ($code = $out) =~ s/\.out$/.cde/ if $code eq ""; Hope this helps! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/