X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=samples%2Fhash2array.pl;fp=samples%2Fhash2array.pl;h=4e7ccaa032da344682be0a7ace71b58c2fdef2c8;hb=6a425386b4dab23f859f51f3cc99a6ebe3c414f0;hp=72cd2657ee2c1c689e85442bbca1f77b20d68330;hpb=92240461f2d526a94139ed4cf0fff445465b380d;p=perl%2Fmodules%2Fautovivification.git diff --git a/samples/hash2array.pl b/samples/hash2array.pl index 72cd265..4e7ccaa 100644 --- a/samples/hash2array.pl +++ b/samples/hash2array.pl @@ -37,7 +37,7 @@ while (<$hash_t>) { $in_data = 1; print $array_t $_; } elsif (!$in_data) { - s{s/\^\$/%/}{s/^\$/@/}; + s{'%'}{'\@'}; print $array_t $_; } else { s!->{([a-z])}!'->[' . num($1) . ']'!eg;