Prev: FAQ 8.35 How do I close a process's filehandle without waiting for it to complete?
Next: FAQ 5.39 How do I select a random line from a file?
From: smallpond on 19 May 2010 09:44 On May 19, 8:55 am, mike <mikaelpetter...(a)hotmail.com> wrote: > Hi, > > I connect to a remote ftp site: > > I see the following from the script: > > Directory is /mirror/eclipse/technology/epp/downloads/release/galileo/ > SR2 > > I cannot list the files in the directory $current_dir. > > The line that fails is: > > my @files=$ftp -> ls("$current_dir") or die "Could not list files. $! > \n"; > > Any idea what I am doing wrong? All help is very much appreciated. Yes. What you are doing wrong is not telling us what error got printed by the die, The whole point of the die instruction is to print out that informative little $! thingy.
From: mike on 20 May 2010 03:19
On 19 Maj, 22:06, Ohhhh maaan <nobodyh...(a)example.com> wrote: > mike wrote: > > Hi, > > > I connect to a remote ftp site: > > > I see the following from the script: > > > Directory is /mirror/eclipse/technology/epp/downloads/release/galileo/ > > SR2 > > > I cannot list the files in the directory $current_dir. > > > The line that fails is: > > > my @files=$ftp -> ls("$current_dir") or die "Could not list files. $! > > \n"; > > Works for me, try setting PASV mode or not, because it's likely a > firewall issue that's blocking the listing. Thanks for all helpful pointers. I had a typo i my code. I was supposed to be message and not $message. //mike |