tags:

views:

117

answers:

1

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

+5  A: 

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

  my $out = $package->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;
seth
Need a comma after "8/26/09"..Besides that it works great!!
NoahD
Whoops. Updated my answer. Thanks.
seth