in reply to Random Text: There's got to be an easier way
As for using strict, you just have to quote the letters in the range. Here's your same code a little shorter:
HTHmy @seed = ('a'..'z', 2..9); my $rand = ''; $rand .= $seed[rand(@seed)] foreach 1..7;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Random Text: There's got to be an easier way
by Hero Zzyzzx (Curate) on Jun 03, 2001 at 21:47 UTC | |
by Beatnik (Parson) on Jun 03, 2001 at 23:17 UTC |