in reply to Please, help understanding y/// transliteration in this example (DON'T TRY executing oneliner)

I think this is a pretty dangerous one liner!

You should edit your post and strip at least the dangerous part from it, before someone tries to execute it.

Regarding your question, B::Deparse shows the transliteration as (indentation and linebreaks added for clarity)

tr ( -/:-@[-`{-}) [`-{/" \-] ;

tr allows to define ranges with - , even outside alphabetic characters, such that you can translate

like `-{ in the "to" part becoming the alphabet

DB<11> print chr($_),"" for ord('`')..ord('{') `abcdefghijklmnopqrstuvwxyz{

update

flattening the "from" part

DB<16> print chr($_) for map {ord($_->[0])..ord($_->[1])} [' ','/'], + [qw(: @)],[qw([ `)],[qw({ })] !"#$%&'()*+,-./:;<=>?@[\]^_`{|}

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

Replies are listed 'Best First'.
Re^2: Please, help understanding y/// transliteration in this example (DON'T TRY)
by igoryonya (Pilgrim) on Feb 05, 2020 at 02:12 UTC
    so,
    ' -/' ':-@' '[-`'
    and
    '{-}'
    are ranges?
    and in the replacement string:
    '`-{'
    is a range?
    I didn't know, you could use ranges in y///, I thought, y/// can have only 1 to 1 mappings, but it's pretty cool, that you can.
      yes!

      see my updates, it demonstrates how = becomes an s and ] becomes y ... etc

      just compare vertically.

      PS: Thanks for updating. :)

      Cheers Rolf
      (addicted to the Perl Programming Language :)
      Wikisyntax for the Monastery FootballPerl is like chess, only without the dice