The easiest thing to do is symbolic references. Here's a sample implementation. I can understand wanting to just say: "push $modtime onto each of the arrays named 'vs', 'ud', 'eq' etc" but I'm not sure what the deal is with naming the array with the modtime. Oh well - it's your data. It sounds like a bad idea to me but then I'm not you. If you use this be sure to keep that "no strict 'refs'" local to that one block - normally this feature is something you only use by the time you know not to use it. It's just an even easier way to write buggy code. etc, etc. Consider yourself (vaguely) warned.
for (@filetypes) { no strict 'refs'; # See [perlref] regarding "Symbolic references". push @$_, $modtime; }
__SIG__ printf "You are here %08x\n", unpack "L!", unpack "P4", pack "L!", B::svref_2object(sub{})->OUTSIDE;
In reply to Re: dynamically named arrays
by diotalevi
in thread dynamically named arrays
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |