Tie::FlipFlop - Alternate between two values.
use Tie::FlipFlop; tie my $flipflop => Tie::FlipFlop => qw /Red Green/; print $flipflop; # Prints 'Red'. print $flipflop; # Prints 'Green'. print $flipflop; # Prints 'Red'.
Tie::FlipFlop allows you to tie a scalar in such a way that refering to the scalar alternates between two values. When tying the scalar, exactly two extra arguments have to be given, the values to be alternated between.
Tie::FlipFlop
Assigning to the scalar leads to a fatal, but trappable, error.
$Log: FlipFlop.pm,v $ Revision 1.1 1999/07/19 22:07:22 abigail Initial revision
This package was written by Abigail.
This package is copyright 1999 by Abigail.
This program is free and open software. You may use, copy, modify, distribute and sell this program (and any modified variants) in any way you wish, provided you do not restrict others to do the same.
To install Tie::FlipFlop, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Tie::FlipFlop
CPAN shell
perl -MCPAN -e shell install Tie::FlipFlop
For more information on module installation, please visit the detailed CPAN module installation guide.