Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

Hi hdb,

Thank you for the code. It works but the problem is that it produces all the combinations alongwith the desired 6-letter combinations i.e.

~A1T1C1G1A1C1~ ~A1T1C1G2A1C1~ ~A1T1C2G1A1C1~ ~A2T3C1G1A1C1~ ~A2T3C1G2A1C1~ ~A2T3C2G1A1C1~

Here is the text output of your code:

~A1T1C1G1A1C1~ ~A1T1C1G1~ ~A1T1C1G1~ ~A1T1C1G1~ ~A1T1C1G1~ ~A1T1C1G1~ ~A1T1C1G1~ ~A1T1C1G1~ ~A1T1C1G2A1C1~ ~A1T1C1G2~ ~A1T1C1G2~ ~A1T1C1G2~ ~A1T1C1G2~ ~A1T1C1G2~ ~A1T1C1G2~ ~A1T1C1G2~ ~A1T1C2G1A1C1~ ~A1T1C2G1~ ~A1T1C2G1~ ~A1T1C2G1~ ~A1T1C2G1~ ~A1T1C2G1~ ~A1T1C2G1~ ~A1T1C2G1~ ~A1T1A1C1~ ~A1T1~ ~A1T1~ ~A1T1~ ~A1T1~ ~A1T1~ ~A1T1~ ~A1T1~ ~A1T1A1C1~ ~A1T1~ ~A1T1~ ~A1T1~ ~A1T1~ ~A1T1~ ~A1T1~ ~A1T1~ ~A1T1A1C1~ ~A1T1~ ~A1T1~ ~A1T1~ ~A1T1~ ~A1T1~ ~A1T1~ ~A1T1~ ~A1T1A1C1~ ~A1T1~ ~A1T1~ ~A1T1~ ~A1T1~ ~A1T1~ ~A1T1~ ~A1T1~ ~A1T1A1C1~ ~A1T1~ ~A1T1~ ~A1T1~ ~A1T1~ ~A1T1~ ~A1T1~ ~A1T1~ ~A1T1A1C1~ ~A1T1~ ~A1T1~ ~A1T1~ ~A1T1~ ~A1T1~ ~A1T1~ ~A1T1~ ~A2T3C1G1A1C1~ ~A2T3C1G1~ ~A2T3C1G1~ ~A2T3C1G1~ ~A2T3C1G1~ ~A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not very easy task in perl. I think so because poj has also suggested a script which produces many unwanted combinations along with the desired 6-letter longest combinations. From the output text file, the unwanted combinations are to be deleted manually to retain only the longest correct, desired combinations. It will be a very time-taking task for more input files with large size. I wish perl could solve this problem.


In reply to Re^6: How can one get all possible combinations of elements of different arrays using File::Glob(bsd_glob)? by supriyoch_2008
in thread How can one get all possible combinations of elements of different arrays using File::Glob(bsd_glob)? by supriyoch_2008

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



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2024-04-23 23:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found