sfrisch@mt.gov has asked for the wisdom of the Perl Monks concerning the following question:
I have a flat file I want to pull certain fields from the text and assign them to a variable I would like to know a strait forward method. I had thought to use split and substr? or load the line into an array the file is space delimited. So the field after HOST field6 I need to assign field seven as a variable and so on as I go across the line "$_" example
orclNetDescString DESCRIPTION ADDRESS PROTOCOL TCP HOST doa.sdasd.sdf.sdf. PORT 1521 CONNECT_DATA SID devdb GLOBAL_NAME devdb.discoveringmorclSid devdb
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Variable assignments flat file
by NetWallah (Canon) on Nov 04, 2015 at 03:21 UTC | |
|
Re: Variable assignments flat file
by GrandFather (Saint) on Nov 04, 2015 at 00:28 UTC | |
by sfrisch@mt.gov (Initiate) on Nov 04, 2015 at 14:32 UTC | |
by stevieb (Canon) on Nov 04, 2015 at 14:48 UTC | |
by sfrisch@mt.gov (Initiate) on Nov 04, 2015 at 17:23 UTC | |
|
Re: Variable assignments flat file
by Anonymous Monk on Nov 04, 2015 at 00:21 UTC |