From: Dirk Koopman Date: Wed, 20 May 2020 14:20:25 +0000 (+0100) Subject: correct convert-users-v3-to-v4.pl X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=c2562ed066d4ffd0714ef41eb5046e19fb5090ea;p=spider.git correct convert-users-v3-to-v4.pl --- 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 {