Hi,

On Fri, Sep 26, 2008 at 10:38 AM, Frédéric DEMIANS <[EMAIL PROTECTED]> 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
[EMAIL PROTECTED]
p: 1-888-564-2457 x709
skype: gmcharlt
_______________________________________________
Koha-patches mailing list
[email protected]
http://lists.koha.org/mailman/listinfo/koha-patches

Reply via email to