Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Net::FTP and a DG Mainframe

by BatGnat (Scribe)
on May 24, 2001 at 11:01 UTC ( [id://82838]=perlquestion: print w/replies, xml ) Need Help??

BatGnat has asked for the wisdom of the Perl Monks concerning the following question:

I am having a problem trying to get my head around how to do what I need to do.
I am using Net::FTP and have connected to a DG Mainframe. What I want to do is list in the files and stats using a $ftp->dir(path).
The problem is that when DG's returns the data it is like this
GS_ERROR_LOG UDF 20-May-01 0:56:18 1958 FTPA.22_50_22.MDM PRV 8-May-01 22:50:22 772096
As you can see, when the 2nd filename is listed, because it is over a predefined length, it wraps the stats to the next line. I need to put the stats in a hash. I cant get my head around how to do this easily.
Please help me!

BatGnat

BALLOT: A multiple choice exam, in which all of the answers above are incorrect!

Replies are listed 'Best First'.
Re: Net::FTP and a DG Mainframe
by princepawn (Parson) on May 24, 2001 at 13:59 UTC
    It appears that you would have to use Net::FTP's quot() function to send your ls command and manually parse the results.

    regarding multiline parsing, the /s regular expression operator might prove useful for matching expressions across newlines.

      The problem with that is that ls doesn't provide sizes and file types etc. As for regex's, it is not really what I'm doing. I want to be able to say, more or less, if previous line is incomplete, add next line. I know I can do it using temp variable etc, but I was hoping for an easier way.

      BatGnat

      BALLOT: A multiple choice exam, in which all of the answers above are incorrect!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://82838]
Approved by root
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (3)
As of 2024-04-19 21:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found