Ok so after changing my callback sub to this
sub callback { my ( $sftp, $data, $offset, $size ) = @_; use Math::Pari qw( :DEFAULT PARI pari2num ); print 'offset is a: '; print ref $offset; print "\n"; $offset = pari2num($offset); print 'now offset is a: '; print ref $offset; print "\n"; print 'size is a: '; print ref $size; print "\n"; $size = pari2num($size); print 'now size is a: '; print ref $size; print "\n"; my $percent = ($offset/$size) * 100; print "percent=$percent\n"; return; }
offset is a: now offset is a: offset=0 size is a: Math::Pari size is a: size=666974 percent=0 offset is a: now offset is a: offset=8192 size is a: Math::Pari size is a: size=666974 percent=1.22823378422547 offset is a: now offset is a: offset=16384 size is a: Math::Pari size is a: size=666974 percent=2.45646756845094
In reply to Re^3: Strange math issue with Net::SFTP (Pari)
by vendion
in thread Strange math issue with Net::SFTP
by vendion
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |