Skip to content

Commit

Permalink
got rid of a loop
Browse files Browse the repository at this point in the history
  • Loading branch information
djanatyn committed Jul 20, 2011
1 parent 62de4f1 commit b71f222
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions bb.pl
Expand Up @@ -7,16 +7,14 @@
INCLUDE_PATH => './templates',
});

# sub returnHash
# when given a filename, this subroutine creates a hash for that file and fills
sub returnHash {
my ($self) = @_; my %self;

open(TEXT, "$self") or die "can't open $self";
($self{title}, $self{date}, my @rest) = <TEXT>;
close TEXT;

for $_ (@rest) { $self{text} .= $_; }
$self{text} = join('', @rest);

return %self;
}
Expand Down

0 comments on commit b71f222

Please sign in to comment.