in reply to Re: Problems with pack-ing data.
in thread Problems with pack-ing data.

Thanks for your help.

I added the round function to my pack line:

pack "w*",map { round $_*100 } @data[$start..$end];

and the program works as expected now.

Replies are listed 'Best First'.
Re^3: Problems with pack-ing data.
by BillKSmith (Monsignor) on Apr 27, 2021 at 13:31 UTC
    I am quite sure that you will open the article that choroba linked to, declare it 'More than I care to know', and close it immediately. Please do not do that. I recently decided that I had procrastinated long enough and read most of it carefully. I was rewarded with an elegant solution to a problem I first encountered over forty years ago. I wish that I had believed the title when I first encountered this article.
    Bill