Noverast has asked for the wisdom of the Perl Monks concerning the following question:
Please help me with the following. Here is my code:
$pax_1="180"; $pax_2="260"; $pax_3="300" $pax_4="450"; $maxadults = "3"; $plus2 = "1"; $currencycode = "ZAR"; while ($maxadults >= $plus) { $paxing = "$pax_$plus"; $sleeps = $sleeps . "$currencycode$paxing for $plus persons<br>"; $plus++; }
I keep getting ZAR1 for 1 persons, ZAR2 for 2 persons, etc.. I've tried '' but then I get R$pax_$plus for 1 persons Pleas help.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Getting Value from joining 2 variables
by ELISHEVA (Prior) on Jan 02, 2011 at 09:07 UTC | |
by moritz (Cardinal) on Jan 02, 2011 at 13:30 UTC | |
by ELISHEVA (Prior) on Jan 02, 2011 at 13:47 UTC | |
by mellon85 (Monk) on Jan 02, 2011 at 11:31 UTC | |
by CountZero (Bishop) on Jan 02, 2011 at 13:03 UTC | |
by Noverast (Initiate) on Jan 02, 2011 at 15:06 UTC | |
by Anonyrnous Monk (Hermit) on Jan 02, 2011 at 15:33 UTC | |
Re: Getting Value from joining 2 variables
by CountZero (Bishop) on Jan 02, 2011 at 13:07 UTC | |
Re: Getting Value from joining 2 variables
by fisher (Priest) on Jan 03, 2011 at 09:23 UTC |
Back to
Seekers of Perl Wisdom