#!/usr/bin/perl
# Extract last comment line (starting with character #) and last line of the
# file. This is used to extract the T->0 results from "custom" file.
# Rok Zitko, rok.zitko@ijs.si, April 2008
# $id$

my $lastcommentline = "";
my $lastline = "";

while (<>) {
  if (/^#/) {
    $lastcommentline = $_;
  } else {
    $lastline = $_;
  }
}

my $dir = `pwd`;
$dir =~ s/.*\/(.*)/$1/;

chomp($lastline);

print ("$lastcommentline");
print ("$lastline   $dir");
