John Evans' Blog

Tag: perl


by on Dec.17, 2005, under Uncategorized

This was written to be as clear and unobfuscated as possible. (Of course, it’s much easier to read with an editor like Vim that highlights the text to show you what’s code and what’s data…)

$c = "";
$a = "\$_ = \$a;
print \"\\\$c = \\\"\$c\\\";\\n\\\$a = \\\"\$_\\\";\\n\$a\";";
$_ = $a;
print "\$c = \"$c\";\n\$a = \"$_\";\n$a";
1 Comment :, , more...


by on Dec.14, 2005, under Uncategorized

Today I finally succeeded at something I have struggled with every now and then for years.

What have I done? Well, check this out…

$a = "\$b = \$a;\$b =~ s/([\"\\\$\\\\])/\\\\\$1/g;print \"\\\$a = \\\"\$b\\\";\$a\";";$b = $a;$b =~ s/(["\$\\])/\\$1/g;print "\$a = \"$b\";$a";

4 Comments :, , more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...