#!/usr/bin/env perl
# Calculate real parts of Green's functions
# Rok Zitko, zitko@theorie.physik.uni-goettingen.de, Oct 2008, June 2012

use warnings;
use strict;
use Env;

my $kkexe = "${NRGPREFIX} kk";

my @l = qw( c-imF-11 c-imG-11 c-imF-22 c-imG-22 c-imF-12 c-imG-12 c-imF-21 c-imG-21 );

foreach (@l) {
    my ($in, $out);
    $in = "$_.dat";
    ($out = $in) =~ s/im/re/;
    kk($in, $out);
}

sub kk {
    my ($in, $out) = @_;
    -e $in or die "Input file not found: $in. Stopped";
    system("$kkexe $in $out");
    -e $out or die "Output file not found:$ out. Stopped";
}
