Although we spoke on IRC, I wanted to answer here as well, in case
others have a similar issue.
In Perl, you should use a foreach loop to iterate over an array:
my @pages = $bot->get_all_pages_in_category("Category:XXXX");
foreach my $page (@pages) {
print $page, "\n";
}
More concisely:
print "$_\n" for @pages; #or
say for @pages; # say means print with a newline, if you have 5.10+
Your example uses <> in scalar context, which means it is an implicit
iterator, using globbing. That makes it somewhat equivalent to:
while (my $elem = <*.c>) {
chmod 0644, $elem;
}
... which is totally not what you want. Operating on an array of
strings, you'll just end up doing glob expansion (which means splitting
on spaces).
The correct way to iterate over arrays in Perl is foreach.
I'm glad you find the library useful - let us know if you run into more
trouble. I'd be happy to help.
-Mike