Dear monks,
Thanks for the *very* helpful suggestions. I have decided to follow RMGir and Abigail's (duplicate node) suggestion, and grep through an ls to find the file that way. Sometimes I can't see these things and need a nudge in the right direction :) See code snippet below:
if (@dirlist = ($ftp->ls))
{
foreach $_ (@dirlist)
{
if (s/(\w+shar\d\d\d\d\d\d\.\d\d\d\d)/$1/)
{
$file = $1
if ($ftp->get($file))
{
}
else
{
print "$host: Got directory listing, but couldn't get file.\n"
+;
}
}
}
}
It could probably be written a lot simpler than that, but I like to keep things in a format I can easily understand.
Thanks again.