DanielM0412 has asked for the wisdom of the Perl Monks concerning the following question:
my %hash = (); my $line = "";
What do those two mean?? why do people do this?
Update
sub readfasta { my $ifn = shift; my $IFH; open($IFH, "<$ifn") or die "cannot open file $ifn\n"; my $line; my %ret; my $tot = 0; while($line = <$IFH> ){ chomp $line; if(not($line eq "")) { ##### why does $line equal "" ? my @tmp = split(//,$line); if($tmp[0] eq ">") { my $nm = substr($line,1); $nm = $nm . $tot; $tot++; $line = <$IFH>; chomp $line; $ret{$nm} = $line; } } } close($IFH); return(\%ret); }
what does $line = ""; mean?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: need a clearer understanding
by Your Mother (Archbishop) on Aug 09, 2011 at 19:02 UTC | |
by DanielM0412 (Acolyte) on Aug 09, 2011 at 19:06 UTC | |
by Your Mother (Archbishop) on Aug 10, 2011 at 02:28 UTC | |
|
Re: need a clearer understanding
by duyet (Friar) on Aug 09, 2011 at 19:49 UTC | |
by Anonymous Monk on Aug 09, 2011 at 20:27 UTC | |
|
Re: need a clearer understanding
by parv (Parson) on Aug 09, 2011 at 19:20 UTC | |
by duyet (Friar) on Aug 09, 2011 at 19:51 UTC | |
|
Re: need a clearer understanding
by Utilitarian (Vicar) on Aug 10, 2011 at 09:16 UTC | |
|
Re: need a clearer understanding
by locked_user sundialsvc4 (Abbot) on Aug 09, 2011 at 23:29 UTC |