Tom Phoenix wrote:
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
Thanks, Tom.
So, perhaps I understood the programming behind your sage suggestion.
If so, I hope this modification is an improvement:
my $sym = substr( $_ , $initial_position , $length ) ;
$sym =~ s/\s//g ;
push @Symbol , $sym ;
( my $sym = substr( $_ , $initial_position , $length )) =~ s/\s//g ;
push @Symbol , $sym ;
It may be too much, but it still looks pretty clear to me.
Kind regards,
Kevin
--
Kevin Viel
Department of Genetics [EMAIL PROTECTED]
Southwest Foundation for Biomedical Research phone: (210)258-9884
P.O. Box 760549 fax: (210)258-9444
San Antonio, TX 78245-0549
Kevin Viel
PhD Candidate
Department of Epidemiology
Rollins School of Public Health
Emory University
Atlanta, GA 30322
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/