Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

escape dot in db password

by drazen (Initiate)
on Jun 06, 2016 at 14:20 UTC ( [id://1164981]=perlquestion: print w/replies, xml ) Need Help??

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

We switched our flatform from unix to linex (red hat). Am using perl to login to oracle db and the password has a dot (.), this was not a problem in unix but perl that runs in linex does not like the dot. How does one escape the dot. I tried "\" and single and double quote. Any help would be much appreciated.

Replies are listed 'Best First'.
Re: escape dot in db password
by choroba (Cardinal) on Jun 06, 2016 at 14:26 UTC
    Hi drazen, welcome to the Monastery!

    I run Perl in Linux (not linex). I've never encountered a problem with using dots. Why do you think Perl doesn't like them? To help us helping you, please provide more information - e.g. what error do you get, what modules do you use to access the database, etc.

    ($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,
Re: escape dot in db password
by NetWallah (Canon) on Jun 06, 2016 at 15:45 UTC
    To answer your question - the dot does NOT need to be esaped, within a single or double quoted string. The only case it needs to be escaped is if it is inside a regular expression.

    If you can post the relevant line(s) of code, we can better help you identify the issue.

            This is not an optical illusion, it just looks like one.

Re: escape dot in db password
by marto (Cardinal) on Jun 07, 2016 at 09:16 UTC

    Welcome, your post lacks sufficient details to help us help you. Are you trying to automate sqlplus rather than use DBI/DBD::Oracle? It sounds as though your code is using . which is for string concatenation:

    my $foo = 'ba'; my $bar = 'z'; print $foo . $bar;

    As others have said it would be better to post the code you are using which shows us the problem, or at least a minimal example which can be used to replicate the problem. How do I post a question effectively? is worth reading if you have not already done so.

Re: escape dot in db password
by karlgoethebier (Abbot) on Jun 08, 2016 at 16:56 UTC

    I guess you made a little typo. IMHO no need to down vote your node as obviously some did. Correct it like this:

    <strike>linex</strike> Linux

    This will result in linex Linux and satisfy all pedantic brothers and sisters in the monastery.

    Update: And you meant platform i guess. Not flatform which has something do with shoes or flat form which describes something geological.

    Best regards, Karl

    «The Crux of the Biscuit is the Apostrophe»

Log In?
Username:
Password:

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

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

    No recent polls found