fish496 has asked for the wisdom of the Perl Monks concerning the following question:
¥ - å €Ã -ä ¶Ã - öthis is my code to reverse the word. How do i convert the string to reverse without getting above mentioned characters my code to reverse is like this
Is#!/usr/bin/perl -w # Reading protein sequence data from a file, take 3 # The filename of the file containing the protein sequence data $filename = 'svensk.txt'; # First we have to "open" the file open(FILE, $filename); # Read the protein sequence data from the file, and storeit # into the array variable @protein @WORDS = <FILE>; # Print the protein onto the screen ##print scalar (@protein); foreach $str (@WORDS) { $str2 = reverse $str; print $str2; } close PROTEINFILE; exit;
2019-02-08 Athanasius added code and pre tags
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Creating reverse dictionary
by GrandFather (Saint) on Feb 08, 2019 at 01:53 UTC | |
|
Re: Creating reverse dictionary
by haukex (Archbishop) on Feb 08, 2019 at 07:19 UTC | |
|
Re: Creating reverse dictionary
by hippo (Archbishop) on Feb 08, 2019 at 09:54 UTC | |
|
Re: Creating reverse dictionary
by NetWallah (Canon) on Feb 08, 2019 at 01:47 UTC |