Hello all
i have this simple loop that gets me every time the match of "<#" in my string
something like that :
my $str ="gggg<#nnnnn#>kkkk<#ssss#>llllll";
while($str =~m/<#/g){
print pos($str);
}
but now i like to get another pos in the same loop iteration , i will like to get the... (1 Reply)
When we give an input sequence , the program should match with the pattern and give the matches and mismatches in the output.
i will give you 2 small examples. if you cant get it pls let me know.
i will try to give a clear idea.
example 1:
$a=APPLE; # let it be a pattern... (0 Replies)
#!/usr/bin/perl
use Shell;
open THEFILE, "C:\galileo_integration.txt" || die "Couldnt open the file!";
@wholeThing = <THEFILE>;
close THEFILE;
foreach $line (@wholeThing){
if ($line =~ m/\\0$/){
@nextThing = $line;
if ($line =~ s/\\0/\\LATEST/g){
@otherThing =... (2 Replies)
Hi All,
I have a small problem of counting the number of times a particular entry that exists in a horizontal string of elements and a vertical feild (column of entries). For example AATGGTCCTGExpected outputA=2 C=2 G=3 T=3 I have an idea to do this but I dont know how to do that if these entries... (1 Reply)
Hi,
I am trying with the below Perl command to print the first field when the second field matches the given pattern:
perl -lane 'open F, "< myfile"; for $i (<F>) {chomp $i; if ($F =~ /patt$/) {my $f = (split(" ", $i)); print "$f";}} close F' dummy_file
I know I can achieve the same with the... (7 Replies)
Im not sure how to tell this awk command to only print when there is a match between the two files. Right now its printing the words in quotation even if there is not a match. I tried removing the additional info and it prints blank spaces??
awk ' {
IP = $1
$1 = ""
}
FNR == NR {
... (2 Replies)
Hi all,
I have two files, chap.txt and complex.txt.
chap.txt looks like this:
a
d
l
m
r
k
complex.txt looks like this:
a c d e l m n j
a d l p q r
c p r m
......... (7 Replies)
Hi friends
i need a help on Perl Script
In My Home directory, i have some other directories and inside those directories i have some subdirectories and all the directories contains files.
Now i want to count a word in all files and i want the output like below
wordcount in which file(name... (5 Replies)