[Koha-patches] [PATCH] Quick Spine Label Printer

Joe Atzberger joe.atzberger at liblime.com
Fri Jul 10 16:04:14 CEST 2009


> +while ( my ($key, $value ) = each(%$data) ) {
> +  my $replacefield = "<$key>";
> +  my $replacedby = $value;
> +  $scheme =~ s/$replacefield/$replacedby/g;
> +}


Why not just name the variable (like $value) what you want it to be
($replacedby) when you declare it the first time?  Why bother reassigning it
to a 2nd variable and doing nothing with the first?

Or just do:
$scheme =~ s/<$key>/$value/g;

-- 
Joe Atzberger
LibLime - Open Source Library Solutions
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/koha-patches/attachments/20090710/6e66f605/attachment-0002.htm>


More information about the Koha-patches mailing list