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

I know that this functionality exists...japhy told me a while back on perlguru and I lost it in the code that I was working on. Now that perlguru is down I can't look it back up.

This is what I am trying to do:

# connect to the specified driver via DBI $dbh = DBI->connect("dbi:$input->param('driver')(RaiseError=>1):");

...but the '$input->param('driver')' can't be called like this; I get: Can't connect(dbi:CGI=HASH(0x16ec2e8)->param('driver')(RaiseError=>1):), no database driver specified...

Anyone know what that code is to do a look ahead?

TIA

Sean Shrum
sean@shrum.net

PS: A perlmonks user setting question: Is there a 'email notify' option available for getting a message when a response is given? I can't find the setting anywhere.

Replies are listed 'Best First'.
Re: Look ahead
by rdfield (Priest) on Feb 06, 2002 at 09:56 UTC
    replace
    $input->param('driver')
    with
    @{[$input->param('driver')]}

    rdfield

Re: Look ahead
by Biker (Priest) on Feb 06, 2002 at 09:11 UTC

    Try executing your statement in an eval() block.

    Tip: You may want to avoid putting your email address in a node. Sooner or later it will be harvested and increase your amount of spam.

    "Livet är hårt" sa bonden.
    "Grymt" sa grisen...

    P.S. Look for "/msg me when there's a reply to one of my posts" in your user settings. No email, but you are a frequent visitor to the Monastery, right?

How To Get Notified When Someone Posts To Your Thread
by metadoktor (Hermit) on Feb 06, 2002 at 09:14 UTC
    To get notification on your posts go to your user settings under Miscellaneous and check the box for:

    /msg me when there's a reply to one of my posts
    

    metadoktor

    "The doktor is in."