in reply to Trying to use substring to find a reverse complement in DNA,

Just another way - using the transliteration operator.
my $dna = 'TAgc'; my $rc = uc reverse $dna =~ tr/ATGCatgc/TUCGtucg/r; print "$dna\n$rc";
Prints
TAgc GCTU

Replies are listed 'Best First'.
Re^2: Trying to use substring to find a reverse complement in DNA,
by Cristoforo (Curate) on Dec 06, 2015 at 04:47 UTC
    Could also say:
    my $rc = reverse uc($dna) =~ tr/ATGC/TUCG/r;
    Laurent_R said Except that the OP said: without using s// or tr///. That's part of the assignment.

    Yes, my bad.

Re^2: Trying to use substring to find a reverse complement in DNA,
by Laurent_R (Canon) on Dec 06, 2015 at 09:28 UTC
    Yeah, it seems much simpler and I would probably go for something along these lines.

    Except that the OP said: without using s// or tr///. That's part of the assignment.