/usr/share/doc/libfinance-qif-perl/examples/readwrite is in libfinance-qif-perl 3.02-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | use Finance::QIF;
if ( $#ARGV != 1 ) {
print STDERR "USAGE: readwrite <inputfile> <outputfile>\n";
exit;
}
my $in = Finance::QIF->new(
file => $ARGV[0],
autodetect => 1
);
my $out = Finance::QIF->new(
file => ">" . $ARGV[1],
record_separator => $in->record_separator
);
my $header = "";
while ( my $record = $in->next() ) {
if ( $header ne $record->{header} ) {
$out->header( $record->{header} );
$header = $record->{header};
}
$out->write($record);
}
$in->close();
$out->close();
|