in reply to Perl Obsfucate Or Encrypter
Let's see if I got the requirements down:
Given that the OP's requirements did not specify that the resultant output of the command line encrypter must be able to be interpreted, I present...
#!/usr/bin/perl use strict; use warnings; my ($final, $rot); $_ = shift; open (INFILE, $_) || die "Can't open $_: $!"; while (<INFILE>) { foreach (split //) { if (/[a-m]/i) { $rot = 13; } elsif (/[n-z]/i) { $rot = -13; } else { $rot = 0; } $final .= chr(ord() + $rot); } } close(INFILE); print $final;
Cē
|
|---|