Changes
From Biolecture.org
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("C:/Temp"); # C:/Temp<br />print "The previous Id i made didn't work on this page but biopediaFasta File will be generated in C:/Temp\n";<br />print "The name of file is FASTA20131369.txt.\n";<br />my $file = $dir->file("file.txt"); # C:/Temp/FASTA20131369.txt</p> <p># Get a file_handle (IO::File object) you can write to<br />my $file_handle = $file->openw();</p> <p>my @list = ('>Your_first_seq', 'ATATATATATATATATAATATATATATATATATAATATATATATATATATAATATATATATATATATA<br />ATATATATATATATATAATATATATATATATATAATATATATATATATATAATATATATATATATATA<br />ATATATATATATATATAATATATATATATATATAATATATATATATATATAATATATATATATATATA<br />ATATATATATATATATAATATATATATATATATAATATATATATATATATAATATATATATATATATA');</p> <p>foreach my $line ( @list ) {<br /> # Add the line to the file<br /> $file_handle->print($line ."\n");<br />}<br /> </p>