in reply to random negative toggle function

zentara,
I am replying after you made your update:
#!/usr/bin/perl -w use strict; print toggle(), $/ for 1 .. 10; sub toggle { int rand 2 ? 1 : -1; }
Cheers - L~R