Open main menu

Biolecture.org β

Changes

User:Jeongmin Oh

994 bytes added, 02:07, 4 December 2015
no edit summary
<p>#!/usr/bin/perl<br />use strict;<br />use warnings;</p> <p>use Path::Class;<br />use autodie; # die if problem reading or writing a file</p> <p>my $dir = dir(&quot;C:/Temp&quot;); # C:/Temp<br />print &quot;The previous Id i made didn't work on this page but biopediaFasta File will be generated in C:/Temp\n&quot;;<br />print &quot;The name of file is FASTA20131369.txt.\n&quot;;<br />my $file = $dir-&gt;file(&quot;file.txt&quot;); # C:/Temp/FASTA20131369.txt</p> <p># Get a file_handle (IO::File object) you can write to<br />my $file_handle = $file-&gt;openw();</p> <p>my @list = (&#39;&gt;Your_first_seq&#39;, &#39;ATATATATATATATATAATATATATATATATATAATATATATATATATATAATATATATATATATATA<br />ATATATATATATATATAATATATATATATATATAATATATATATATATATAATATATATATATATATA<br />ATATATATATATATATAATATATATATATATATAATATATATATATATATAATATATATATATATATA<br />ATATATATATATATATAATATATATATATATATAATATATATATATATATAATATATATATATATATA&#39;);</p> <p>foreach my $line ( @list ) {<br />&nbsp; &nbsp; # Add the line to the file<br />&nbsp; &nbsp; $file_handle-&gt;print($line .&quot;\n&quot;);<br />}<br />&nbsp;</p>
Anonymous user