Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: combining two csv files by using math operations

by 1nickt (Abbot)
on May 16, 2021 at 11:39 UTC ( #11132654=note: print w/replies, xml ) Need Help??


in reply to combining two csv files by using math operations

Hi,

Please provide some sample data that you are feeding to your program. See also sprintf?


The way forward always starts with a minimal test.
  • Comment on Re: combining two csv files by using math operations

Replies are listed 'Best First'.
Re^2: combining two csv files by using math operations
by ng0177 (Acolyte) on May 16, 2021 at 11:51 UTC
    Thanks. The sample data is under __dataA__ and __dataB__ I am not sure how to best avoid opening files when the data exists. The input format is floats, the output is supposed to be scientific format.

      Hi again,

      Forgive me but I don't know what "scientific format" is. Please show the expected output from the sample data.

      $ perl -Mstrict -wE 'my $avg = (1.10000E0 + 3.10000E0) / 2.; say sprin +tf("%E", $avg)' 2.100000E+00
      ?


      The way forward always starts with a minimal test.
        Sorry, my fault. See amended as above.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2021-10-28 20:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My first memorable Perl project was:







    Results (96 votes). Check out past polls.

    Notices?