Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3990846
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T06:32:38+00:00 2026-05-20T06:32:38+00:00

kindly tel me the concept to write a Perl program behind this ? 167

  • 0

kindly tel me the concept to write a Perl program behind this ?

167 GATCAAAATACTTGCTGGA 185
192 TAGTAGATAGATAGATAGTAGTAG 228

in a fileA i ve a range from 167 to 185 as given as above and also 192 to 228

in another fileB i ve set of numbers

2 3 4 5 6 7 8 168 169 179 185 193 1000

now from the above set of numbers in file B, i need to find out which are the numbers present between the range of 167 to 185 and
print those numbers in the output.

so, output will be 168,169,179,185, 193

what will be the concept behind writing this program?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T06:32:39+00:00Added an answer on May 20, 2026 at 6:32 am
    use strict;
    use warnings;
    
    open my $fh, '<', $file1  or die "unable to open '$file1' for reading :$!";
    my @arr1 = ();
    while(my $line = <$fh>){
     while($line =~ /(\d+).*?(\d+)/gs){
        push (@arr1, $1..$2);
     }
    }
    close($fh);
    my @arr2 = qw/2 3 4 5 6 7 8 168 169 179 185 193 1000/;
    my %hash;
    @hash{@arr1} = ();
    for my $num (@arr2){
    print"$num is present in the list\n" if(exists $hash{$num});
    }
    

    Output:

    168 is present in the list
    169 is present in the list
    179 is present in the list
    185 is present in the list
    193 is present in the list
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to get substed drive letter in Perl. Could anyone kindly help me?
Experienced product developers,web developers and gurus in this forum ,kindly share your experiences.
Kindly need your help as this really taking me long time to try. From
Perl newbie here. Can someone kindly show me how to use perl to extract
I am reading this article on provider patren. Kindly guide me what do this
Could somebody kindly explain this to me, in simple words: there is no way
amm please kindly check this code? cos it won't work.. <?php $page = file_get_contents(http://natadec0c0.tumblr.com/);
Kindly point towards theory/material to read for understanding colors and what makes a good
Kindly look at the following code: <!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd>
Kindly read the following code as an example (pay attention to the padding-bottom of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.