<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Perl quoting Problem doing select on Oracle. in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/perl-quoting-problem-doing-select-on-oracle/m-p/3690175#M103054</link>
    <description>Try to use array variable instead of scalar.&lt;BR /&gt;&lt;BR /&gt;@arr=qx [ command1; command2; command3; etc.. ]&lt;BR /&gt;&lt;BR /&gt;print @arr;&lt;BR /&gt;&lt;BR /&gt;gives that.&lt;BR /&gt;&lt;BR /&gt;-Muthu</description>
    <pubDate>Tue, 13 Dec 2005 03:51:15 GMT</pubDate>
    <dc:creator>Muthukumar_5</dc:creator>
    <dc:date>2005-12-13T03:51:15Z</dc:date>
    <item>
      <title>Perl quoting Problem doing select on Oracle.</title>
      <link>https://community.hpe.com/t5/operating-system-linux/perl-quoting-problem-doing-select-on-oracle/m-p/3690171#M103050</link>
      <description>Hallo!&lt;BR /&gt;&lt;BR /&gt;I have a stupid problem hier. I have following piece of code:&lt;BR /&gt;&lt;BR /&gt;$s=qx{/opt/oracle/ora92s/bin/sqlplus -SL  /nolog &amp;lt;&lt;END&gt;&lt;/END&gt;set echo off termout off heading off feedback off trimspool on trimout on verify&lt;BR /&gt; off linesize 300  pagesize 0 pause off&lt;BR /&gt;connect / as sysdba&lt;BR /&gt;whenever sqlerror exit failure&lt;BR /&gt;select value from v$parameter where name = 'background_dump_dest';&lt;BR /&gt;exit&lt;BR /&gt;END};&lt;BR /&gt;&lt;BR /&gt;I don't know how to quote v$parameter, so that it is read as v$parameter, not as v or something like that.&lt;BR /&gt;&lt;BR /&gt;Thank you!&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 13 Dec 2005 02:49:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/perl-quoting-problem-doing-select-on-oracle/m-p/3690171#M103050</guid>
      <dc:creator>Kalin Evtimov</dc:creator>
      <dc:date>2005-12-13T02:49:43Z</dc:date>
    </item>
    <item>
      <title>Re: Perl quoting Problem doing select on Oracle.</title>
      <link>https://community.hpe.com/t5/operating-system-linux/perl-quoting-problem-doing-select-on-oracle/m-p/3690172#M103051</link>
      <description>hi&lt;BR /&gt;&lt;BR /&gt;try to escape the '$' --&amp;gt;  v\$parameter&lt;BR /&gt;&lt;BR /&gt;Regards</description>
      <pubDate>Tue, 13 Dec 2005 03:39:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/perl-quoting-problem-doing-select-on-oracle/m-p/3690172#M103051</guid>
      <dc:creator>Oviwan</dc:creator>
      <dc:date>2005-12-13T03:39:23Z</dc:date>
    </item>
    <item>
      <title>Re: Perl quoting Problem doing select on Oracle.</title>
      <link>https://community.hpe.com/t5/operating-system-linux/perl-quoting-problem-doing-select-on-oracle/m-p/3690173#M103052</link>
      <description>Kalin,&lt;BR /&gt;have you looked at perldoc -q quote ?&lt;BR /&gt;</description>
      <pubDate>Tue, 13 Dec 2005 03:45:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/perl-quoting-problem-doing-select-on-oracle/m-p/3690173#M103052</guid>
      <dc:creator>Peter Godron</dc:creator>
      <dc:date>2005-12-13T03:45:30Z</dc:date>
    </item>
    <item>
      <title>Re: Perl quoting Problem doing select on Oracle.</title>
      <link>https://community.hpe.com/t5/operating-system-linux/perl-quoting-problem-doing-select-on-oracle/m-p/3690174#M103053</link>
      <description>Tried all possible slashes and bachslashes but didn't work. Anyway, I changed it in:&lt;BR /&gt;&lt;BR /&gt;open ORA, "|/opt/oracle/ora92s/bin/sqlplus -SL  /nolog\n";&lt;BR /&gt;print ORA "set echo off termout off heading off feedback off trimspool on trimout on verify off linesize 300  pagesize 0 pause off\n";&lt;BR /&gt;print ORA "connect / as sysdba\n";&lt;BR /&gt;print ORA "whenever sqlerror exit failure\n";&lt;BR /&gt;print ORA "select value from v\$parameter where name = 'background_dump_dest';\n";&lt;BR /&gt;print ORA "exit\n";&lt;BR /&gt;close ORA;&lt;BR /&gt;&lt;BR /&gt;It worked.&lt;BR /&gt;But now I don't know how to put the output of this in a variable, instead to STDOUT.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 13 Dec 2005 03:46:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/perl-quoting-problem-doing-select-on-oracle/m-p/3690174#M103053</guid>
      <dc:creator>Kalin Evtimov</dc:creator>
      <dc:date>2005-12-13T03:46:00Z</dc:date>
    </item>
    <item>
      <title>Re: Perl quoting Problem doing select on Oracle.</title>
      <link>https://community.hpe.com/t5/operating-system-linux/perl-quoting-problem-doing-select-on-oracle/m-p/3690175#M103054</link>
      <description>Try to use array variable instead of scalar.&lt;BR /&gt;&lt;BR /&gt;@arr=qx [ command1; command2; command3; etc.. ]&lt;BR /&gt;&lt;BR /&gt;print @arr;&lt;BR /&gt;&lt;BR /&gt;gives that.&lt;BR /&gt;&lt;BR /&gt;-Muthu</description>
      <pubDate>Tue, 13 Dec 2005 03:51:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/perl-quoting-problem-doing-select-on-oracle/m-p/3690175#M103054</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2005-12-13T03:51:15Z</dc:date>
    </item>
    <item>
      <title>Re: Perl quoting Problem doing select on Oracle.</title>
      <link>https://community.hpe.com/t5/operating-system-linux/perl-quoting-problem-doing-select-on-oracle/m-p/3690176#M103055</link>
      <description>But the escaping problem stays, using qx{}..</description>
      <pubDate>Tue, 13 Dec 2005 03:59:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/perl-quoting-problem-doing-select-on-oracle/m-p/3690176#M103055</guid>
      <dc:creator>Kalin Evtimov</dc:creator>
      <dc:date>2005-12-13T03:59:09Z</dc:date>
    </item>
    <item>
      <title>Re: Perl quoting Problem doing select on Oracle.</title>
      <link>https://community.hpe.com/t5/operating-system-linux/perl-quoting-problem-doing-select-on-oracle/m-p/3690177#M103056</link>
      <description>try as,&lt;BR /&gt;&lt;BR /&gt;$param1="v$parameter";&lt;BR /&gt;@arr=qx [ command1;select value from $param1 where name= ... ]&lt;BR /&gt;&lt;BR /&gt;You can also try with ` ` instead of qx [ ] to accomplish this.&lt;BR /&gt;&lt;BR /&gt;-Muthu</description>
      <pubDate>Tue, 13 Dec 2005 04:04:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/perl-quoting-problem-doing-select-on-oracle/m-p/3690177#M103056</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2005-12-13T04:04:04Z</dc:date>
    </item>
    <item>
      <title>Re: Perl quoting Problem doing select on Oracle.</title>
      <link>https://community.hpe.com/t5/operating-system-linux/perl-quoting-problem-doing-select-on-oracle/m-p/3690178#M103057</link>
      <description>Thanks.&lt;BR /&gt;Unfortunately nothing works. I dont't know anymore and I am leaving it.</description>
      <pubDate>Tue, 13 Dec 2005 04:18:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/perl-quoting-problem-doing-select-on-oracle/m-p/3690178#M103057</guid>
      <dc:creator>Kalin Evtimov</dc:creator>
      <dc:date>2005-12-13T04:18:40Z</dc:date>
    </item>
    <item>
      <title>Re: Perl quoting Problem doing select on Oracle.</title>
      <link>https://community.hpe.com/t5/operating-system-linux/perl-quoting-problem-doing-select-on-oracle/m-p/3690179#M103058</link>
      <description>you can create a synonyme on the oracle database for v$parameter without a '$' in the synonyme name, then it should work.&lt;BR /&gt;&lt;BR /&gt;Regards</description>
      <pubDate>Tue, 13 Dec 2005 04:45:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/perl-quoting-problem-doing-select-on-oracle/m-p/3690179#M103058</guid>
      <dc:creator>Oviwan</dc:creator>
      <dc:date>2005-12-13T04:45:55Z</dc:date>
    </item>
    <item>
      <title>Re: Perl quoting Problem doing select on Oracle.</title>
      <link>https://community.hpe.com/t5/operating-system-linux/perl-quoting-problem-doing-select-on-oracle/m-p/3690180#M103059</link>
      <description>Nice, but I am not allowed to do anything on the DB.&lt;BR /&gt;Perhaps I will use the "print HANDLE" approach and a file as a buffer, where the output is written, because two way communication in Perl is a bit complex for me.</description>
      <pubDate>Tue, 13 Dec 2005 05:05:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/perl-quoting-problem-doing-select-on-oracle/m-p/3690180#M103059</guid>
      <dc:creator>Kalin Evtimov</dc:creator>
      <dc:date>2005-12-13T05:05:12Z</dc:date>
    </item>
    <item>
      <title>Re: Perl quoting Problem doing select on Oracle.</title>
      <link>https://community.hpe.com/t5/operating-system-linux/perl-quoting-problem-doing-select-on-oracle/m-p/3690181#M103060</link>
      <description>IT Works!&lt;BR /&gt;&lt;BR /&gt;I don't know why, but it looks like this:&lt;BR /&gt;&lt;BR /&gt;select value from v\\\$\parameter where name = 'background_dump_dest';&lt;BR /&gt;&lt;BR /&gt;after half a day testing I found it.</description>
      <pubDate>Tue, 13 Dec 2005 05:36:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/perl-quoting-problem-doing-select-on-oracle/m-p/3690181#M103060</guid>
      <dc:creator>Kalin Evtimov</dc:creator>
      <dc:date>2005-12-13T05:36:16Z</dc:date>
    </item>
    <item>
      <title>Re: Perl quoting Problem doing select on Oracle.</title>
      <link>https://community.hpe.com/t5/operating-system-linux/perl-quoting-problem-doing-select-on-oracle/m-p/3690182#M103061</link>
      <description>nice :)&lt;BR /&gt;&lt;BR /&gt;other solution. if you have installed the dbi module you could use this code:&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/perl -w&lt;BR /&gt;&lt;BR /&gt;use DBI;&lt;BR /&gt;$connection = DBI-&amp;gt;connect("DBI:Oracle:DBNAME","USERNAME", "PASSWORD");&lt;BR /&gt;$query = $connection-&amp;gt;prepare("select value from v\$parameter where name = 'background_dump_dest'");&lt;BR /&gt;$query-&amp;gt;execute();&lt;BR /&gt;while (@result=$query-&amp;gt;fetchrow_array) {&lt;BR /&gt;        print "$result[0]\n";&lt;BR /&gt;}&lt;BR /&gt;$connection-&amp;gt;disconnect();&lt;BR /&gt;</description>
      <pubDate>Tue, 13 Dec 2005 05:46:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/perl-quoting-problem-doing-select-on-oracle/m-p/3690182#M103061</guid>
      <dc:creator>Oviwan</dc:creator>
      <dc:date>2005-12-13T05:46:57Z</dc:date>
    </item>
    <item>
      <title>Re: Perl quoting Problem doing select on Oracle.</title>
      <link>https://community.hpe.com/t5/operating-system-linux/perl-quoting-problem-doing-select-on-oracle/m-p/3690183#M103062</link>
      <description>Yeah, but I don't know whether DBI-Module is on all systems. Except this I am logging in without having to type password etc..</description>
      <pubDate>Tue, 13 Dec 2005 08:56:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/perl-quoting-problem-doing-select-on-oracle/m-p/3690183#M103062</guid>
      <dc:creator>Kalin Evtimov</dc:creator>
      <dc:date>2005-12-13T08:56:35Z</dc:date>
    </item>
  </channel>
</rss>

