in reply to Re^4: 5.26 sigil reference syntax in subfunction
in thread 5.26 sigil reference syntax in subfunction
assign_columns_to_file( \@options_lines, $files{'options'}{'columns'} );Again, I don't understand what you are trying to say here. Can you please give a short, but complete self-contained example program that demonstrates the issue.It will keep 'options' as a subkey, but will not keep 'columns' used during the function
Dave.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: 5.26 sigil reference syntax in subfunction
by chenhonkhonk (Acolyte) on Nov 02, 2017 at 11:38 UTC | |
| [reply] [d/l] |
by dave_the_m (Monsignor) on Nov 02, 2017 at 14:01 UTC | |
In the following code: I'm guessing you'd like it to autovivify all three levels of hash, so that the effect is the same as If so, that can be achieved with
Dave. | [reply] [d/l] [select] |
by chenhonkhonk (Acolyte) on Nov 02, 2017 at 18:50 UTC | |
This is literally the entire code. Not sure what more you were expecting. I have left in accessing inside and outside the sub to demonstrate the inconsistent syntax. Particularly inside the function, the new syntax is not helpful, and is more than confusing because I have to pay attention to the front and back of hashes. Additionally, in upper function, I must use \%{} if I want to pass the hash reference - and it must be bracketed because of precedence compared to the first $. | [reply] [d/l] |
by dave_the_m (Monsignor) on Nov 02, 2017 at 21:28 UTC | |