STEVEN WHALEY wrote:
First off, hello everyone.

Hello,

The program I'm trying to write requires me to grab a specific set of
multiline output from a command and store it in an array.  I have output
that looks like this:

Hosts associated with this datastore.

 ag-vmsql01-srv.agbr.com

 ag-vmsql01-srv.agbr.com

 ag-vmsql02-srv.agbr.com

Virtual machines on this datastore.

 ag-tsgate-srv

 ag-voicecon-srv

 ag-ts01-srv

 ag-testsql-srv

 ag-sql0501-srv

 ag-bartend-srv

Templates on this datastore.

 None

Datastore Folder Structure.

 Folder Path: '[Win_Prod_1]'

 Files present

  ag-bartend-srv

  ag-ts01-srv

  ag-voicecon-srv_1

  ag-tsgate-srv

  ag-sql0501-srv

  ag-testsql-srv

 Folder Path: '[Win_Prod_1] ag-bartend-srv/'

 Files present

  ag-bartend-srv-flat.vmdk

  ag-bartend-srv.nvram

  ag-bartend-srv.vmdk

  ag-bartend-srv.vmsd

  ag-bartend-srv.vmx

  ag-bartend-srv.vmxf

  vmware.log

  vmware-2.log

  vmware-3.log

  vmware-4.log

  ag-bartend-srv-c17f6d6e.vswp

  vmware-5.log

  vmware-6.log

  vmware-7.log

 Folder Path: '[Win_Prod_1] ag-ts01-srv/'

 Files present

  ag-ts01-srv.vmsd

  ag-ts01-srv.vmx

  ag-ts01-srv.vmxf

And I need to able to grab just one secition, like this:

Folder Path: '[Win_Prod_1] ag-bartend-srv/'

 Files present

  ag-bartend-srv-flat.vmdk

  ag-bartend-srv.nvram

  ag-bartend-srv.vmdk

  ag-bartend-srv.vmsd

  ag-bartend-srv.vmx

  ag-bartend-srv.vmxf

  vmware.log

  vmware-2.log

  vmware-3.log

  vmware-4.log

  ag-bartend-srv-c17f6d6e.vswp

  vmware-5.log

  vmware-6.log

  vmware-7.log

and make each line an entry in an array.

Is your data actually double spaced like that or is that an artifact of the email software you are using? If your email software is modifying the data could you please post the actual data (without the quoted-printable encoding.) TIA



John
--
Perl isn't a toolbox, but a small machine shop where you
can special-order certain sorts of tools at low cost and
in short order.                            -- Larry Wall

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to