Alright everyone, I have this user registration program that i'm writing, i've decided not to use conventional
password scripts\fields mainly because i'm only starting with perl and don't no how. So i've decided to use
random mnemonic passwords, encripted.I use,
my( $s ) = @_; srand( $s ^ time ); my @c = split / */, "bcdfghjklmnpqrstvwxyz"; my @v = split / */, "aeiou"; for($i = 1; $i <= 4;$i++){ print $c[int(rand(20))], $v[int(rand(5))]);
to generate a password. (This creates eazy to prenounce passwords made upof 4 sylables. e.g.votahubo,
instead of a jumble of nums and letters)

And I use this little number supplied by "ergowolf" to encrypt it:
sub encryption{ my( $type ) = @_; chomp($type); $password =~ tr/N-ZA-M/A-Z/; $password =~ tr/n-za-m/a-z/; return $type;

(Full script is available in the code section\cryptography
under Cheseey Crypt or the likes. Its the first link anyway.)

Ok the problem i'm having is probably very simple to solve, but be kind, I'm only new to this.
Instead of using print to display the password created using the for function in the first piece of code displayed above, I want to get it to save to a variable so i can encrypt it but since its in a for loop the value created just overrights the previous value rather than appending to the end of it.
Can any one help??
Thanks, appreciate it, Eoin..

In reply to ??Mnemonic Passwords?? by eoin

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.