Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^2: Variable assignments flat file

by sfrisch@mt.gov (Initiate)
on Nov 04, 2015 at 14:32 UTC ( [id://1146905]=note: print w/replies, xml ) Need Help??


in reply to Re: Variable assignments flat file
in thread Variable assignments flat file

open FILE, 'c:\ldap_entries.txt'; while(<FILE>){ chomp; s/ //g; s/:/ /g; s/\(/ /g; s/\)/ /g; s/=/ /g; if(/orclNetDescString/){ $AA = $_; #print "$AA"; } if(/PORT/){ $AA1 = $_; } if(/orclSid/){ $AA2 = $_; # print "\n$AA$AA1$AA2\n"; $AA3 = "\n$AA$AA1$AA2"; push @LINE,$AA3; $server = $LINE[6]; $port1 = $LINE[8]; # Iwant to create TNSNames.txt based on a formatt # #alstrn = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = ( +PROTOCOL = TCP)(HOST = 10.194.146.184)(PORT = 1542))) (CONNECT_DATA = + (SERVICE_NAME = alstrn))) #outt put to file $SID = (DESCRIPTION = (ADDRESS_LIST = + (ADDRESS = (PROTOCOL = TCP)(HOST = $server)(PORT = $port1))) (CONN +ECT_DATA = (SERVICE_NAME = $SID))) # } }

Replies are listed 'Best First'.
Re^3: Variable assignments flat file
by stevieb (Canon) on Nov 04, 2015 at 14:48 UTC

    Please always wrap your code and data within <code></code> tags per my message. To further, since this information is directly related to your original post, it would be best if you edited your original question to include it, so that new readers don't have to scroll the entire thread to find it. See How do I change/delete my post?.

      ok thanks

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (8)
As of 2024-04-23 10:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found