Question

I am trying to create a transaction in a QIF file in Perl. I thought that using Finance::QIF would let me create a simple transaction (example: spending $20 at Best Buy), but I'm not seeing a way to do this.

Does someone have an example or is there a difference module that I should be using to create a transaction?

Thanks!

--Noah

Was it helpful?

Solution

While the documentation doesn't have any examples of writing a record, the tests do. I modified this from the test file:

  my $out = Finance::QIF->new( file => ">" . $somefile, );
  my $record = {
      header      => "Type:Bank",
      date        => "8/26/09",
      payee       => "Best Buy",
      memo        => "",
      transaction => "-20.00",
      address     => "",
      category    => "Entertainment",
  };
  $out->header( $record->{header} );
  $out->write($record);
  $out->close;
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top