Hi Monks,
I am bit stuck with a process, actually I have a tab separated file wi
+th 3 columns(shown below), what I am trying to do is read this file a
+nd the sending column 3 values to a database on the internet and when
+ the files are recieved it should write in a file in the directory wi
+th the name of the directory as column1_column2(Ex: reme_9625) and th
+is process should be done for whole file.
open(FH,"upload") or die "Check The File";
while(<FH>)
{
chomp $_;
my @temp = split(/\t/,$_);
my $gene=$temp[0];
my $geneid=$temp[1];
my $string=$temp[2];
mkdir "$gene-$geneid" or die "Could not make the directory";
print "$gene-$geneid\n";
}
File looks like<br>
REME 9625 17[CHR] AND 76705160:76721740[CHRPOS]
ABNM 369 X[CHR] AND 47305522:47316264[CHRPOS]
BCKD 1029 16[CHR] AND 31027249:31031422[CHRPOS]
Actually I am a new to perl and past 3 days I am trying to work it out
+.
Any help will greatly be appreciated...
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.