in reply to Re: Trying to write a subroutine to return if file is Text or Binary
in thread Trying to write a subroutine to return if file is Text or Binary

Thank you all for the quick replies. After posting this I realized how I was completely overlooking the fact that it is still considered text even putting zeroes and ones in the file. Essentially all I wanted was it to return text file if sending something like a .txt doc or something similar and return binary file IF a binary file was sent to it and it works like a charm. Again, thanks all
  • Comment on Re^2: Trying to write a subroutine to return if file is Text or Binary

Replies are listed 'Best First'.
Re^3: Trying to write a subroutine to return if file is Text or Binary
by DrHyde (Prior) on Jul 02, 2014 at 10:14 UTC
    After posting I went to p5p and asked "WTF?". Apparently there is work going on (whether it'll be accepted and whether it'll be in 5.22 or not remains to be seen) to improve -T and -B. See here and here.