in reply to Re^2: Problem when - use strict and -w
in thread Problem when - use strict and -w

What part of that do you think you can't do with $csv->print (but can somehow do with STDOUT->print)

Replies are listed 'Best First'.
Re^4: Problem when - use strict and -w
by GertMT (Hermit) on Jul 15, 2009 at 10:15 UTC
    ah well, I'm kind of puzzled in the setup $csv->print where to put the part of the code that's going to work on the columns. In my (new) setup I have:
    while ( my $row = $csv_in->getline($fh_in) ) { # doing stuff with the columns print "Olah:","\t", $number++, $row->[2]... }
    How should I structure this using $csv->print. Probably just a small hint/example will open my eyes (again).
    Gert
      Nothing changes.
      while ( my $row = $csv_in->getline($fh_in) ) { # doing stuff with the columns #print(...); $csv->print( ... ); }
        Worked it out..
        while ( my $row = $csv_in->getline($fh_in) ) { # $row->[2]=100; # just fooling around $fh_out->print( "Olah:", $number++, "\t", $row->[2], "\t", $row->[3], "\t", " 2 x 3 = +", $row->[2] * $row->[3], "\n" # @$row[2,5,3,0,4], # all unchanged columns unchanged ); }
        Getting there slowly