Perl read() & write() with File Handle

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Prasanna CRN
    New Member
    • Mar 2011
    • 11

    Perl read() & write() with File Handle

    Hi Friends,
    I am trying to write a script to split file with the size as an argument.

    Based on the size, i am trying to read for Input File & Dump it to output File.

    But, read() returns the number of bytes actually being read (for ex : file split size as 200 bytes), while printing, output file size is greater(213 bytes) than actual read. I could not guess the reason. Please help me with this.
  • Prasanna CRN
    New Member
    • Mar 2011
    • 11

    #2
    Hi Friends,
    I got the solution for the problem. I need to convert the file handle to binmode before processing

    Comment

    Working...