Loading ...
Sorry, an error occurred while loading the content.

Re: [PBML] File size shown by Perl is different from actual file size..!

Expand Messages
  • Shailesh Hegde
    Oh..yeah..:-) Kishore Balla wrote: I guess you know conversion too 156223666 bytes = 156223666/(1024*1024) MB = 148.98 MB =~
    Message 1 of 5 , Oct 27, 2006
    • 0 Attachment
      Oh..yeah..:-)

      Kishore Balla <kishore.balla@...> wrote: I guess you know conversion too

      156223666 bytes = 156223666/(1024*1024) MB = 148.98 MB =~ 149 MB..

      :)

      On 10/27/06, Shailesh Hegde <shail_hegde@...> wrote:
      >
      > Well yes..the windows explorer will show in KB/MB... but the thing was
      > that those numbers were not corresponding to the bytes shown also...if it
      > showed 149 MB outside, then the bytes returned by Perl was 156223666
      > ..something of that sort..
      >
      > Then i found out that Perl is showing me the file size that can be seen in
      > the Properties table of any file... The value shown against "Size:" field in
      > the Properties is what is returned by Perl..
      >
      >
      > Kishore Balla <kishore.balla@... <kishore.balla%40gmail.com>> wrote:
      > -s in perl returns filesize in bytes and in windows explorer the file size
      > will appear in KB..
      >
      > I guess you are aware of this :)
      >
      > On 10/27/06, shailesh <shail_hegde@... <shail_hegde%40yahoo.com>>
      > wrote:
      > >
      > > Hello,
      > > I need to find the size of a file in my program, and then use this
      > > number for further operations.
      > > However i found it strange that Perl is not returning the file size as
      > > is shown to me on my PC.
      > > This is the snippet am using :
      > >
      > > sub get_file_size{
      > > local $size = -s $_[0];
      > > }
      > > $build_filesize = get_file_size( $build_file ) ;
      > > print "\n Size is : $build_filesize bytes" ;
      > >
      > > The value of Size returned is not equal to the actual size of the file
      > > as seen by me under Windows Explorer...
      > > Why is this mismatch ??
      > >
      > >
      > >
      > >
      >
      > --
      > ~ Kishore Balla
      >
      > [Non-text portions of this message have been removed]
      >
      >
      > ---------------------------------
      > Do you Yahoo!?
      > Get on board. You're invited to try the new Yahoo! Mail.
      >
      > [Non-text portions of this message have been removed]
      >
      >
      >

      --
      ~ Kishore Balla

      [Non-text portions of this message have been removed]






      ---------------------------------
      Cheap Talk? Check out Yahoo! Messenger's low PC-to-Phone call rates.

      [Non-text portions of this message have been removed]
    Your message has been successfully submitted and would be delivered to recipients shortly.