Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Net ftp wrapper return array within array 2

Status
Not open for further replies.

cdlvj

MIS
Nov 18, 2003
678
US
Developing a class around net::ftp for doing alternate servers, retries etc.

What is the easiest way to resolve a return on $ftp->dir which returns a array within an array?

Code:
## return looks like this
my @list=$ftp->dir;

@list = (
          [
            "total 104",
            "drwxr-xr-x   3 root     root        512 Feb 20 12:09 .",
            "drwxrwxrwx   7 root     root        1024 Nov 22 10:13 ..",
            "-rw-r-----   1 root     root      22536 Nov 22 10:59 Holdings.txt",
            "-rw-r-----   1 root     root      22536 Nov 22 10:59 new.txt",

          ]
        );

I simply want to return an array with the two elements Holdings.txt and new.txt.


 
what do you mean by resolve?

------------------------------------------
- Kevin, perl coder unexceptional! [wiggle]
 
The question is how do you get at the stuff between the brackets.

@a = $list[0]; does not work.
 
@a = @{$list[0]};



------------------------------------------
- Kevin, perl coder unexceptional! [wiggle]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top