comments say all, goodluck

bw bliako

#!/usr/bin/env perl # author: bliako # for: https://perlmonks.org/?node_id=1227228 # date: 14/12/2018 use strict; use warnings; # our $biologists = new alchemists() and fork until pop(@the::bubble); + do not tell until tied $all; # Below, set the complete pathname of the file with DNA strings my $filename = "dna.txt"; # a DNA string is a sequence (any order) of A,C,G,T of at # least 5 items in length. Adjust 5 to suit you and # not detect TATA FOR NOW # or GATTAGA or ATTAC or CACA or GAGA or TAGA # similar detection to https://perlmonks.org/?node_id=1227232 by 1nick +t my $regex = q/([ACGT]{5,})/; # # nothing to change below # my $FH; open($FH, '<', $filename) or die "opening file: $!"; # slurp the file my $contents = undef; {local $/ = undef; $contents = <$FH> } close $FH; print "Possible DNA:\n$1\nEnd\n\n" while $contents =~ /$regex/gi

In reply to Re: how to isolate text in a text file. by bliako
in thread how to isolate text in a text file. by undergradguy

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.