Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^4: Problem when - use strict and -w

by GertMT (Friar)
on Jul 15, 2009 at 10:15 UTC ( #780237=note: print w/ replies, xml ) Need Help??


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

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


Comment on Re^4: Problem when - use strict and -w
Select or Download Code
Re^5: Problem when - use strict and -w
by Anonymous Monk on Jul 15, 2009 at 10:43 UTC
      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
Re^5: Problem when - use strict and -w
by ikegami (Pope) on Jul 15, 2009 at 13:59 UTC
    Nothing changes.
    while ( my $row = $csv_in->getline($fh_in) ) { # doing stuff with the columns #print(...); $csv->print( ... ); }

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://780237]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2015-07-04 23:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (60 votes), past polls