[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: perl module documentation patches, segfault

From: John Darrington
Subject: Re: perl module documentation patches, segfault
Date: Mon, 2 Feb 2009 11:53:26 +0900
User-agent: Mutt/1.5.13 (2006-08-11)

On Sun, Feb 01, 2009 at 02:50:01PM -0800, Ben Pfaff wrote:
     Finally, I was working on a script to dump out a system file as
     text.  Here's what I have so far.  It works, in that it dumps the
     cases, but it segfaults after it reads the last one:
         #! /usr/bin/perl
         use PSPP;
         use strict;
         use warnings;
         my $reader = PSPP::Reader->open ($ARGV[0]);
         while (my @case = @{$reader->get_next_case ()}) {
             print join (',', @case), "\n";

Writing the loop slightly differently, works around this problem:

while (my $case = $reader->get_next_case ())
    print join (',', @$case), "\n";

PGP Public key ID: 1024D/2DE827B3 
fingerprint = 8797 A26D 0854 2EAB 0285  A290 8A67 719C 2DE8 27B3
See or any PGP keyserver for public key.

Attachment: signature.asc
Description: Digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]