in reply to Popping from method that returns a list in one line
You cannot pop the return value of ->get_files because it is not an array.
pop @{[$fp->get_files]}
That should work, but should make the uselessness of this obvious: it constructs an array from the list returned by ->get_files, removes the last value from that array, and then throws the entire array away.
If this is part of File::Collector, I do not see a way for ->get_files to do what you seem to want, although you could add a ->get_file_queue method that returns a reference to the current file queue for a category. If I understand correctly, this would be return $s->{"_iterator_$type"} (but you should probably change your instance variables to make that return $s->{iterators}{$type} instead).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Popping from method that returns a list in one line
by BillKSmith (Monsignor) on Aug 29, 2019 at 16:03 UTC | |
|
Re^2: Popping from method that returns a list in one line
by nysus (Parson) on Aug 28, 2019 at 23:58 UTC | |
by shmem (Chancellor) on Aug 29, 2019 at 00:05 UTC | |
by AnomalousMonk (Archbishop) on Aug 29, 2019 at 00:18 UTC |