Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^5: How to pass hash site variables into sql connection using perl?

by poj (Abbot)
on Mar 30, 2017 at 06:39 UTC ( #1186460=note: print w/replies, xml ) Need Help??


in reply to Re^4: How to pass hash site variables into sql connection using perl?
in thread How to pass hash site variables into sql connection using perl?

But you didn't change the hash to suit like this

#!perl use strict; my %site_map = ( site1 => { host => 'dam.sd.aog.com', db => 'a_site1_current', current => { user => 'ad', pw => '123' } }, site2 => { host => 'dam.sd.aog.com', db => 'a_site2_current', current => { user => 'ad', pw => '123' } }, site3 => { host => 'dam.sd.aog.com', db => 'a_site3_current', current => { user => 'ad', pw => '123' } }, );
  • Comment on Re^5: How to pass hash site variables into sql connection using perl?
  • Download Code

Replies are listed 'Best First'.
Re^6: How to pass hash site variables into sql connection using perl?
by finddata (Sexton) on Mar 30, 2017 at 06:56 UTC
    Here in db we had fetched the a_site3_current then why we want to use the current with user and pw?

      Consider these responses to be a good generic approach, obviously you'll alter them to best suit your situation, this is a task for you.

      why we want to use the current with user and pw?

      I have no idea since I didn't understand your answer here

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (4)
As of 2020-02-22 10:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What numbers are you going to focus on primarily in 2020?










    Results (99 votes). Check out past polls.

    Notices?