Syntactic Confectionery Delight | |
PerlMonks |
Re^3: how can I get localtime without mutating any variablesby LanX (Saint) |
on Jan 06, 2021 at 20:45 UTC ( [id://11126471]=note: print w/replies, xml ) | Need Help?? |
you had the right idea, but better replace $_ with undef from perlfunc#my-VARLIST
Note that with a parenthesised list, undef can be used as a dummy placeholder, for example to skip assignment of initial values: you can always use undef on the left-hand-side to ignore assignments.
Cheers Rolf
In Section
Seekers of Perl Wisdom
|
|