Miss P > Some people say that I have to pay for writing the script. 

Me > ???????????????what are such ppl doing here anyway??????????????? we're
all here to help each other out aren't we ?
     these ppl are requested to put their hoardings elsewhere...
     pay and that too for a beginner exercise...hilarious :D
     
   
Miss P > I couldn't make heads and tails out of this. If you had given only
John's solution and a mail in Hebrew, 
I would have not able to make out the difference ;-)

Me > hmmmmmmmmmmmmmmm. I personally believe John's solution was as elegant
as they come.
     Probably your predicament is you don't know how to use it.

Just copy-paste the following in a file and save it with the extension .pl

#---------------------------------------------------------------------------
------------------------------------------------
open PASWDFILE , ">pswdfile" # you may want to replace what's in the quotes 
                             #with the exact path of the pswd file you want
to generate

# character set to choose from as per your example
my @chars = ( 'a' .. 'z', 'A' .. 'Z', 0 .. 9 );

# pick eight random characters from the array
my $string = join '', map $chars[ rand @chars ], 1 .. 8;#don't bother with
the howz and whyz of this line...just use it ;)

print $string;             #just so that you know what is being written into
the file...comment it out later.
print PASWDFILE , $string; #write the random string of length 8 in the file
#---------------------------------------------------------------------------
------------------------------------------------

Your application could then read this generated file and use the
randomstring as you desire.
Once it's contents have been read , do unlink(delete) this file using your
bash program.


Miss P > and when I didn't receive any concrete answers I was led to believe
that
         it cannot be accomplished in perl easily even by advanced users.

Me > hope your belief has been belied :)


Miss P >I wish I can write coooool perl programs. I will be instant hit
        here, especially with guys ;-)

Me > ... only if you write real *beautiful* code and have read the perl
*Cook*book  :D  


-aman
-------------------
Nishkaam Sevabhaav
-------------------


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to