The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Crypt::Rot13 - a rotational deviator

SYNOPSIS

#!/usr/bin/env perl
$^W = 1;
use strict;
use Crypt::Rot13;

my $cryptochango = new Crypt::Rot13;
$cryptochango->charge("Someone help us, please!");
print $cryptochango->rot13(5), "\n";

DESCRIPTION

Rot13 provides an object into which arrays may be placed, and then returned to you in altered - specifically: rotated - form. The above code would print, "Xtrjtsj mjqu zx, uqjfxj!". If instead of rot13(5), rot13(11) had been used the result would have been "Dzxpzyp spwa fd, awpldp!", and of course just rot13() would have resulted in the expected, "Fbzrbar uryc hf, cyrnfr!". Valid rot13() arguments are 0-26, though 0 and 26 do not alter the array.

Crypt::Rot13 has the following methods.

new

standard constructor, this creates an array object, which is most convienent for mass text deviation. (For clarification, the object *is* an array; not a hash as most are. This is better suited to mass rotations.)

charge

defines the array object.

peek

returns unaltered value of array object NOTE: rot13 as described above does not alter the object!

rot13 degree

rotates alphabetical characters of array object degree times toward the Unreachable Wrapping Z, or 13 times if degree is omitted.

LICENSE

Copyright (C) 1999 julian fondren

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

AUTHOR

Julian Fondren is julian@imaji.net, and can usually be found on #Perl, EFnet IRC.

SEE ALSO

perl(1)