From e3ad508306fc86f8b27f37341fbff2ee83c0a231 Mon Sep 17 00:00:00 2001 From: Dirk Koopman Date: Wed, 20 May 2020 15:20:25 +0100 Subject: [PATCH] correct convert-users-v3-to-v4.pl --- perl/convert-users-v3-to-v4.pl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/perl/convert-users-v3-to-v4.pl b/perl/convert-users-v3-to-v4.pl index f8ac9bf4..48ef0c00 100755 --- a/perl/convert-users-v3-to-v4.pl +++ b/perl/convert-users-v3-to-v4.pl @@ -28,6 +28,7 @@ use JSON; use Data::Structure::Util qw(unbless); use Time::HiRes qw(gettimeofday tv_interval); use IO::File; +use File::Copy; use Carp; use DB_File; @@ -64,7 +65,8 @@ if (-e $ofn || -e "$ofn.n") { say "You appear to have (or are using) $ofn, creating $nfn instead"; $ofn = $nfn; } else { - say "using $ofn for output"; + $ofn = "$ofn.n"; + say "using $ofn.n for output"; } @@ -89,7 +91,7 @@ if ($convert) { unless ($@) { if ($ref) { unbless $ref; - $ofh->print($json->encode($ref) . "\n"); + $ofh->print("$ref->{call}\t" . $json->encode($ref) . "\n"); $count++; } else { -- 2.43.0