Re: interpoliation within regexp

2006-09-30 Thread Dr.Ruud
Rob Dixon schreef: > [6 random characters from 0-9A-Za-z] > it's meant for password > generation and not for creating data that's 'random' in the > mathematical sense I think it's plenty good enough. Even if you take > truly random samples of six characters out of a 62-character set, > about three

Re: interpoliation within regexp

2006-09-30 Thread Rob Dixon
Derek B. Smith wrote: > > --- Rob Dixon <[EMAIL PROTECTED]> wrote: >> >> Rob Dixon wrote: >>> >>> This will do what you want. It shuffles all of the possible characters >>> and joins them into a string, and then finds the first substring of six >>> characters that starts with a non-numeric charact

Re: interpoliation within regexp

2006-09-30 Thread Rob Dixon
Mumia W. wrote: On 09/29/2006 01:44 PM, Rob Dixon wrote: Derek B. Smith wrote: --- "Mumia W." <[EMAIL PROTECTED]> wrote: What is the purpose of this program? To generate a random 6 character string. If the first character starts with a # then I just ignore the new string and tell it

Re: interpoliation within regexp

2006-09-29 Thread Mumia W.
On 09/29/2006 01:44 PM, Rob Dixon wrote: Derek B. Smith wrote: --- "Mumia W." <[EMAIL PROTECTED]> wrote: What is the purpose of this program? To generate a random 6 character string. If the first character starts with a # then I just ignore the new string and tell it to goto LABLE, b/c fo

Re: interpoliation within regexp

2006-09-29 Thread Derek B. Smith
-- "Mumia W." <[EMAIL PROTECTED]> wrote: > On 09/29/2006 12:15 PM, Derek B. Smith wrote: > > --- "D. Bolliger" <[EMAIL PROTECTED]> wrote: > > > >> Derek B. Smith am Donnerstag, 28. September 2006 > >> 22:28: > Why not just specify a non-digit for the first > character: > > my

Re: interpoliation within regexp

2006-09-29 Thread Rob Dixon
Rob Dixon wrote: This will do what you want. It shuffles all of the possible characters and joins them into a string, and then finds the first substring of six characters that starts with a non-numeric character. The only proviso is that a password can never have the same character twice, which

Re: interpoliation within regexp

2006-09-29 Thread Rob Dixon
Derek B. Smith wrote: --- "Mumia W." <[EMAIL PROTECTED]> wrote: What is the purpose of this program? To generate a random 6 character string. If the first character starts with a # then I just ignore the new string and tell it to goto LABLE, b/c for 0-32 on the ASCII table cannot be used a

Re: interpoliation within regexp

2006-09-29 Thread Mumia W.
On 09/29/2006 12:15 PM, Derek B. Smith wrote: --- "D. Bolliger" <[EMAIL PROTECTED]> wrote: Derek B. Smith am Donnerstag, 28. September 2006 22:28: Why not just specify a non-digit for the first character: my @a = ( 0 .. 9, 'a' .. 'z', 'A' .. 'Z'); my $password = join '', $a[ 10 + rand( @a -

Re: interpoliation within regexp

2006-09-29 Thread Derek B. Smith
I reread the docs and I am still unclear with the code: $a[ 10 + rand( @a - 10 ) I do understand everything but $a[ 10 + rand( @a - 10 ) b/c you say subtract 10 from each element occurrance => @a - 10 then add 10 to the result of rand (@a - 10) To me this is offsets itself which is why I am confus

Re: interpoliation within regexp

2006-09-28 Thread John W. Krahn
Derek B. Smith wrote: > >>Why not just specify a non-digit for the first >>character: >> >>my @a = ( 0 .. 9, 'a' .. 'z', 'A' .. 'Z'); >> >>my $password = join '', $a[ 10 + rand( @a - 10 ) ], >>map $a[ rand @a ], 1 .. 5; > > Ok great, but I do not fully understand this. Will you > explain in Engl

Re: interpoliation within regexp

2006-09-28 Thread D. Bolliger
Derek B. Smith am Donnerstag, 28. September 2006 22:28: > > Why not just specify a non-digit for the first > > character: > > > > my @a = ( 0 .. 9, 'a' .. 'z', 'A' .. 'Z'); > > > > my $password = join '', $a[ 10 + rand( @a - 10 ) ], > > map $a[ rand @a ], 1 .. 5; > > > > > > > > John > > Ok great,

Re: interpoliation within regexp

2006-09-28 Thread Derek B. Smith
> Why not just specify a non-digit for the first > character: > > my @a = ( 0 .. 9, 'a' .. 'z', 'A' .. 'Z'); > > my $password = join '', $a[ 10 + rand( @a - 10 ) ], > map $a[ rand @a ], 1 .. 5; > > > > John Ok great, but I do not fully understand this. Will you explain in English? thx _

Re: interpoliation within regexp

2006-09-28 Thread John W. Krahn
Derek B. Smith wrote: > --- "Mumia W." <[EMAIL PROTECTED]> > wrote: >> >>What is the purpose of this program? > > To generate a random 6 character string. > > If the first character starts with a # then I just > ignore the new string and tell it to goto LABLE, b/c > for 0-32 on the ASCII table c

Re: interpoliation within regexp

2006-09-28 Thread Derek B. Smith
--- "Mumia W." <[EMAIL PROTECTED]> wrote: > On 09/28/2006 12:04 PM, Derek B. Smith wrote: > > ** > > The input data is a 6 character randomized string > that > > could start with a # such as 6FhJ9Z. If it does > start > > with a number then I need to conver

Re: interpoliation within regexp

2006-09-28 Thread Mumia W.
On 09/28/2006 12:04 PM, Derek B. Smith wrote: ** The input data is a 6 character randomized string that could start with a # such as 6FhJ9Z. If it does start with a number then I need to convert this character into its cooresponding alpha char, [a-z,A-Z].

Re: interpoliation within regexp

2006-09-28 Thread Derek B. Smith
--- "Mumia W." <[EMAIL PROTECTED]> wrote: > On 09/28/2006 08:16 AM, Derek B. Smith wrote: > > --- "Derek B. Smith" <[EMAIL PROTECTED]> > > wrote: > > > >> I need to substitute a conversion using chr, but > >> have > >> failed on multiple attempts. Basically if the > first > >> element contains a

Re: interpoliation within regexp

2006-09-28 Thread Derek B. Smith
-- "Derek B. Smith" <[EMAIL PROTECTED]> wrote: > --- "Derek B. Smith" <[EMAIL PROTECTED]> > wrote: > > > I need to substitute a conversion using chr, but > > have > > failed on multiple attempts. Basically if the > first > > element contains a # then convert it. Will anyone > > advise? > > > >

Re: interpoliation within regexp

2006-09-28 Thread Mumia W.
On 09/28/2006 08:16 AM, Derek B. Smith wrote: --- "Derek B. Smith" <[EMAIL PROTECTED]> wrote: I need to substitute a conversion using chr, but have failed on multiple attempts. Basically if the first element contains a # then convert it. Will anyone advise? thank you derek #if first char is

Re: interpoliation within regexp

2006-09-28 Thread Derek B. Smith
--- "Derek B. Smith" <[EMAIL PROTECTED]> wrote: > I need to substitute a conversion using chr, but > have > failed on multiple attempts. Basically if the first > element contains a # then convert it. Will anyone > advise? > > thank you > derek > > #if first char is a-z then print it else warn >