in reply to Re^2: How to retrieve files from ftp server
in thread How to retrieve files from ftp server

It looks from this code fragment that you have not used strict. If you had, then your script would fail to compile because of the undeclared variables used in each regex. Those leading spaces don't look good either.

Addendum: and you have mis-spelled "filelist" in its declaration.

  • Comment on Re^3: How to retrieve files from ftp server