Ombongi.Moraa has asked for the wisdom of the Perl Monks concerning the following question:
Funny enough, when i append the result of $chars[int rand @chars]; to $alphanumber, the space disappears; What exactly is the meaning of assigning '' to a variable?my $alphanumber = ''; for (1..$length) { my $alphanumber .= $chars[int rand @chars]; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Assigning Null to a variable
by Corion (Patriarch) on Jul 02, 2012 at 13:16 UTC | |
|
Re: Assigning Null to a variable
by Eliya (Vicar) on Jul 02, 2012 at 13:31 UTC | |
|
Re: Assigning Null to a variable
by frozenwithjoy (Priest) on Jul 02, 2012 at 14:31 UTC | |
|
Re: Assigning Null to a variable
by Anonymous Monk on Jul 03, 2012 at 02:23 UTC | |
|
Re: Assigning Null to a variable
by Anonymous Monk on Jul 02, 2012 at 15:02 UTC | |
by AnomalousMonk (Archbishop) on Jul 02, 2012 at 15:34 UTC | |
by afoken (Chancellor) on Jul 02, 2012 at 19:13 UTC | |
by cavac (Prior) on Jul 02, 2012 at 15:10 UTC |