473,545 Members | 2,788 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to get elements outside the for loop

1 New Member
use strict;
use warnings;
use feature qw( say );

my @aa = ("A", "C", "D", "E", "F", "G", "H", "I", "K", "L", "M", "N", "P", "Q", "R", "S", "T", "V", "W", "Y");

my $pair;
for my $n1 (@aa) {
for my $n2 (@aa) {
$pair = $n1 . $n2;
}
}
my @codons=unpack( "(a2)*",$pa ir);
print @codons;

# these are the 20 amino acids and i have to make 400 possible combination of two

# amino acid(di amino acid) like this: AA AC AD ...... CA CC CD CE CF CG.....YA.....Y Y
#showing output only "YY"
Jul 7 '17 #1
0 4517

Sign in to post your reply or Sign up for a free account.

Similar topics

2
16716
by: deko | last post by:
I need to populate a file with past unix time stamps over a period of time specified by the user. The time stamps should be evenly spaced, based on user-defined parameters. My question is: How do I add an element to an array, then increment it and loop so that each element builds on the previous element just added? Here's a first crack...
1
1960
by: Gordon Williams | last post by:
Hi, I have been using this code for a number of weeks without problems. Now I am getting an exception after the program has run a short while. It has already passed through this function several hundred time before the exception. The code in the function is (exactly as shown): for i, obsData in enumerate(epochData):
1
5442
by: Jehan | last post by:
At the end of my HTML page I have following..... <script> for (i = 0; i < document.section_entry.length;i++) { // some code } </script>
3
1607
by: Kant | last post by:
Hi, i have a simple problem. i have a form with a lot's of number of Text and Hidden Fields. I just do a simple loop to get each value for each attribute. I have about more than 2000. if i do something simple like : for (var i=0; i<2000; i++) aValue = i+10;
3
2856
by: Sam | last post by:
I wrote a script to show or hide items in an HTML list (<ul id="stuff">) depending on whether a list-item's CLASS attribute matches an input string (catString), which is chosen from a SELECT menu. Can anyone suggest any improvements to this (below)? I'm a JS beginner. It seems to work Camino/Firefox and Mac Explorer-5, but not in...
3
3487
by: Jody Greening | last post by:
How do I write a schema that is only validating elements: 1,4,7,8,9 and ignores every other element? I also need to not to care about the order of the elements or how many are in between elements that I am trying to validate. XML:
2
2025
by: dSchwartz | last post by:
I need help adding a column to a dataset, but its a little bit more complicated then just that. Here's the situation: I have many xml files in one directory, each which represent a newsletter. I want to create a page that will display a title and date of each newsletter, along with a link to it. here's a code snip: ...
56
5112
by: Zytan | last post by:
Obviously you can't just use a simple for loop, since you may skip over elements. You could modify the loop counter each time an element is deleted. But, the loop ending condition must be checked on each iteration, since the Count changes as you delete elements. I would think it is guaranteed to be computed each time, and not cached. ...
2
3826
by: chintan85 | last post by:
Hi Guys, Any suggestion would be very helpful on this. My codes goes likes this while(@row = $sql_query->fetchrow_array()) { print $row; )
2
1993
ditditsasa
by: ditditsasa | last post by:
while (false !== ($sfname = readdir($dh))) { if (substr($sfname, 0, 1) == '.') continue; if ($sfname == 'CVS' ) continue; $sitedir = "$OE_SITES_BASE/$sfname"; if (!is_dir($sitedir) ) continue; if (!is_file("$sitedir/sqlconf.php")) continue; $siteslist = $sfname; } echo $sfname;//here not prints...
0
7499
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7689
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7943
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7456
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7786
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5076
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3470
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1919
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
743
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.