in reply to Re^3: Change variable multiple times within a single string?
in thread Change variable multiple times within a single string?
~ Printing the variable in each line is only showing the current value..
That is excatly my point. Since, what to print when '1' is seen is not known, I think is better to leave it out.
Your output:
Output with a little modification:A (yes) 1 (yes) #? 1 (yes) #? 1 (yes) #? B (no) 1 (no) #? 1 (no) #? 1 (no) #? A (yes) 1 (yes) #? 1 (yes) #? 1 (yes) #? B (no) 1 (no) #? 1 (no) #? 1 (no) #?
OR one can provide for '1' in hash like so:A (yes) B (no) A (yes) B (no)
Then the output shows:my %decision = ( A => 'yes', B=> 'no', '1'=>'', );
Just saying.....A (yes) 1 () 1 () 1 () B (no) 1 () 1 () 1 () A (yes) 1 () 1 () 1 () B (no) 1 () 1 () 1 ()
If you tell me, I'll forget.
If you show me, I'll remember.
if you involve me, I'll understand.
--- Author unknown to me
If you show me, I'll remember.
if you involve me, I'll understand.
--- Author unknown to me
In Section
Seekers of Perl Wisdom