This solution is simple. Why reinvent the wheel.
Use the reverse function in the perl and compare the value with the original string....
User Profile
Collapse
-
You can use the exec command to create a detached process.
...Code:exec("notepad.exe")Leave a comment:
-
-
-
Count the number of character(case insensitive) in a file
Hi,
I want to write a perl script to count the number of character(case insensitive) in a file.
let me know if this is write way to do this.
...Code:open(IN,"words.txt"); $count=0; $char="a"; $char=lc($substr); $char2=uc($substr); while(<IN>) { $result= rindex($_,$char,length($_)); $result2= rindex($_,$char2,length($_)); -
Little modification to your code
...Code:# #!/usr/bin/perl; # #subroutine to concatenate two strings of dna # #practicesubroutines1.txt sub conc($$); print "enter the dna sequence1>>"; $dna1=<>; chomp($dna1); print "enter dna sequence2>>"; $dna2=<>; chomp($dna2); $newdna=conc($dna1,$dna2); print "the new
Leave a comment:
No activity results to display
Show More
Leave a comment: