in reply to Problem enumerating a foreach loop using Win32::OLE->GetObject
I have not used module Win32::OLE myself, but from reading the documentation in seems to be a function from the module, that delivers a list of from a given collection object.
From the module documentation:
in(COLLECTION)So, there is no new foreach loop syntax, just an imported function in. Hope this helps a bit, hexcoderIf COLLECTION is an OLE collection object then in $COLLECTION returns a list of all members of the collection. This is a shortcut for Win32::OLE::Enum->All($COLLECTION). It is most commonly used in a foreach loop:
foreach my $value (in $collection) { # do something with $value here }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Problem enumerating a foreach loop using Win32::OLE->GetObject
by t_rex_joe (Sexton) on Apr 12, 2018 at 18:52 UTC | |
by Discipulus (Canon) on Apr 12, 2018 at 19:42 UTC | |
by t_rex_joe (Sexton) on Apr 13, 2018 at 18:23 UTC |