Skip to main content
Post Undeleted by Dom Hastings
I think this covers all eventualities now, but only if a file is presented in binary format.
Source Link
Dom Hastings
  • 24.7k
  • 4
  • 59
  • 94

Perl 5 + -p0, 136 bytes

Definitely think it's impossible with Perl, would loveSimilar to be proven wrong though!other answers, this removes all even bytes and leaves any odd bytes (which is truthy).

tr<�
 "$&(*,.02468:<>@BDFHJLNPRTVXZ\\^`bdfhjlnprtvxz|~€‚„†ˆŠŒŽ’”–˜šœž ¢¤¦¨ª¬®°²´¶¸º¼¾ÀÂÄÆÈÊÌÎÐÒÔÖØÚÜÞàâäæèêìîðòôöøúüþ><>d

Try it online!

Definitely think it's impossible with Perl, would love to be proven wrong though!

Perl 5 + -p0, 136 bytes

Similar to other answers, this removes all even bytes and leaves any odd bytes (which is truthy).

tr<�
 "$&(*,.02468:<>@BDFHJLNPRTVXZ\\^`bdfhjlnprtvxz|~€‚„†ˆŠŒŽ’”–˜šœž ¢¤¦¨ª¬®°²´¶¸º¼¾ÀÂÄÆÈÊÌÎÐÒÔÖØÚÜÞàâäæèêìîðòôöøúüþ><>d

Try it online!

Post Deleted by Dom Hastings
deleted 417 characters in body
Source Link
Dom Hastings
  • 24.7k
  • 4
  • 59
  • 94

Perl 5, 59 bytes

58 bytes code + 1 for -p0.

Returns empty string (falsy) if the contents are all even bytes and all odd bytes if not (truthy).

tr$ "\$&(*,.02468:<>\@BDFHJLNPRTVXZ\\^`bdfhjlnprtvxz|~$$d

Try it online! Definitely think it's impossible with Perl, would love to be proven wrong though!

Perl 5, 59 bytes

58 bytes code + 1 for -p0.

Returns empty string (falsy) if the contents are all even bytes and all odd bytes if not (truthy).

tr$ "\$&(*,.02468:<>\@BDFHJLNPRTVXZ\\^`bdfhjlnprtvxz|~$$d

Try it online!

Definitely think it's impossible with Perl, would love to be proven wrong though!

added 4 characters in body
Source Link
Dom Hastings
  • 24.7k
  • 4
  • 59
  • 94

Perl 5, 5759 bytes

5658 bytes code + 1 for -pp0.

Returns empty string (falsy) if the contents are all even bytes and all odd bytes if not (truthy).

tr$"\$&tr$ "\$&(*,.02468:<>\@BDFHJLNPRTVXZ\\^`bdfhjlnprtvxz|~$$d

Try it online!Try it online!

Perl 5, 57 bytes

56 bytes code + 1 for -p.

Returns empty string (falsy) if the contents are all even bytes and all odd bytes if not (truthy).

tr$"\$&(*,.02468:<>\@BDFHJLNPRTVXZ\\^`bdfhjlnprtvxz|~$$d

Try it online!

Perl 5, 59 bytes

58 bytes code + 1 for -p0.

Returns empty string (falsy) if the contents are all even bytes and all odd bytes if not (truthy).

tr$ "\$&(*,.02468:<>\@BDFHJLNPRTVXZ\\^`bdfhjlnprtvxz|~$$d

Try it online!

Post Undeleted by Dom Hastings
Actually do the challenge.
Source Link
Dom Hastings
  • 24.7k
  • 4
  • 59
  • 94
Loading
Post Deleted by Dom Hastings
Source Link
Dom Hastings
  • 24.7k
  • 4
  • 59
  • 94
Loading