Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6601963
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T18:49:14+00:00 2026-05-25T18:49:14+00:00

I have some perl files which have been bleached (don’t know if it was

  • 0

I have some perl files which have been “bleached” (don’t know if it was from ACME::Bleach, or something similar). Not being very fluent in perl, I’d like to understand what the one-liner that starts the file does to decode the whitespace that follows:

$_=<<'';y;\r\n;;d;$_=pack'b*',$_;$_=eval;$@&&die$@;$_

The rest of the file is whitespace characters, and the file is executable by itself (it’s placed in a /bin directory).

[Solution], thanks to @JB.

The pack portion of this seems the most complex, and it took me a while to notice what was going on. Pack is taking the LSB only of every 8 characters, and unpacking that as a big-endian character in binary. Tabs hence become ‘0’s, and spaces become ‘1’s.

    '\t\t   \t  ' => '#'
in binary:
    00001001 00001001 00100000 00100000 00100000 00001001 00100000 0100000
every LSB:
    1 1 0 0 0 1 0 0
convert from from big-endian format:
    0b00100011 == 35 == ord('#')
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T18:49:14+00:00Added an answer on May 25, 2026 at 6:49 pm
    • $_ = << ''; reads the rest of the file into the accumulator.
    • y;\r\n;;d; strips carriage returns and line feeds.
    • $_ = pack 'b*', $_; converts characters to bits in $_, LSB first.
    • $_ = eval; executes $_ as Perl code.
    • $@ && die $@; $_ handles exceptions and the return code gracefully.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some text files which I am trying to transform with a Perl
I have a little Perl script (On Windows) that checks some files for me
I have some Perl modules which exports various functions. (We haven't used @EXPORT in
I have some source code files which came to me by an HTML output,
I have some data files from a legacy system that I would like to
I have around 230 files which are *.pl , *.txt and some are *.conf
I have a few bash and perl scripts which has been asked to be
I have some reasonable (not obfuscated) Perl source files, and I need a tokenizer,
I have a hashmap with some information(key and value) in a perl file. I
I often have a subroutine in Perl that fills an array with some information.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.