Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^7: How can one get all possible combinations of elements of different arrays using File::Glob(bsd_glob)?

by hdb (Prior)
on Apr 25, 2013 at 07:31 UTC ( #1030615=note: print w/ replies, xml ) Need Help??


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

Not what I get. I only get the six desired lines. Probabaly your k?.txt files have a lot of empty lines??? In which case, you need to modify the code by adding two more lines:

chomp $DNA; $DNA=~s/\n/,/g; $DNA=~s/,+$//g; # new $DNA=~s/,,+/,/g; # new $string .= "{$DNA}";

This removes multiple commata or trailing commata created by empty lines. Let me know whether this solves the problem.


Comment on Re^7: How can one get all possible combinations of elements of different arrays using File::Glob(bsd_glob)?
Download Code
Replies are listed 'Best First'.
Re^8: How can one get all possible combinations of elements of different arrays using File::Glob(bsd_glob)?
by supriyoch_2008 (Scribe) on Apr 25, 2013 at 11:07 UTC

    Hi hdb,

    Thanks a lot. I have put the two new lines given by you in the script. Now the script has worked nicely and I have got the results the way I wanted. My heartfelt thanks to you. I wish I could develop the skills like you in perl. It appears to me that possibly no problem in perl is insurmountable to you. My heart knew no bounds when I had found the correct results using the code given by you.

    With deep REGARDS to you for your kind help and guidance.

    I SALUTE your intellectual achievement. This is the message from my heart to you. My English is not very good and so I don't know which words or sentences I should use here appropriately to thank you.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1030615]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (10)
As of 2015-07-30 10:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (271 votes), past polls