[Koha-patches] [PATCH] Bugfix bug #2630

Galen Charlton galen.charlton at liblime.com
Fri Sep 26 17:52:04 CEST 2008


Hi,

On Fri, Sep 26, 2008 at 10:38 AM, Frédéric DEMIANS <f.demians at tamil.fr> wrote:
> my $t = "2-84902-162-8XXX (2 ex.)";
> ($_) = $t =~ /([\d-]*[X]*)/;
> print "$_\n";
> s/-//g;
> print "$_\n";

My problem is with assigning to $_, which could have odd side-effects
later on.  I suggest

my $t = "2-84902-162-8XXX (2 ex.)";
($norm_t) = $t =~ /([\d-]*[X]*)/;
$norm_t =~ s/-//g;

Regards,

Galen
-- 
Galen Charlton
VP, Research & Development, LibLime
galen.charlton at liblime.com
p: 1-888-564-2457 x709
skype: gmcharlt



More information about the Koha-patches mailing list