Skip to main content
deleted 31 characters in body
Source Link
Sundar R
  • 6.6k
  • 19
  • 33

Perl 5 -pnl -M5.010, 5858 54 bytes

BEGIN{say'{'}s'"'\"'g;ss'"'\"'g;/(.*)=(.*)/"$1"&&say qq|"$`": "$2""$'",/;END|}{say'}'}

Try it online!Try it online!

 

Alternately, for the same bytecount (with -nl -M5.010)58 byte version:

BEGIN{say'{'}s'"'\"'g;s'"'\"'g;s/(.*)=(.*)/&&say qq|"$`""$1": "$'""$2",|;END/;END{say'}'}

Try it online!Try it online!

Perl 5 -p -M5.010, 58 bytes

BEGIN{say'{'}s'"'\"'g;s/(.*)=(.*)/"$1": "$2",/;END{say'}'}

Try it online!

Alternately, for the same bytecount (with -nl -M5.010):

BEGIN{say'{'}s'"'\"'g;/=/&&say qq|"$`": "$'",|;END{say'}'}

Try it online!

Perl 5 -nl -M5.010, 58 54 bytes

BEGIN{say'{'}s'"'\"'g;/=/&&say qq|"$`": "$'",|}{say'}'

Try it online!

 

58 byte version:

BEGIN{say'{'}s'"'\"'g;s/(.*)=(.*)/"$1": "$2",/;END{say'}'}

Try it online!

added 544 characters in body
Source Link
Sundar R
  • 6.6k
  • 19
  • 33

Perl 5 -p -M5.010, 58 bytes

BEGIN{say'{'}s'"'\"'g;s/(.*)=(.*)/"$1": "$2",/;END{say'}'}

Try it online!

Alternately, for the same bytecount (with -nl -M5.010):

BEGIN{say'{'}s'"'\"'g;/=/&&say qq|"$`": "$'",|;END{say'}'}

Try it online!

Perl 5 -p, 58 bytes

BEGIN{say'{'}s'"'\"'g;s/(.*)=(.*)/"$1": "$2",/;END{say'}'}

Try it online!

Perl 5 -p -M5.010, 58 bytes

BEGIN{say'{'}s'"'\"'g;s/(.*)=(.*)/"$1": "$2",/;END{say'}'}

Try it online!

Alternately, for the same bytecount (with -nl -M5.010):

BEGIN{say'{'}s'"'\"'g;/=/&&say qq|"$`": "$'",|;END{say'}'}

Try it online!

Source Link
Sundar R
  • 6.6k
  • 19
  • 33

Perl 5 -p, 58 bytes

BEGIN{say'{'}s'"'\"'g;s/(.*)=(.*)/"$1": "$2",/;END{say'}'}

Try it online!