<?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 module problem in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-module-problem/m-p/2923344#M110010</link>
    <description>You're new here, so may I remind you of the screen you got when posting the question? If you forgot, please read &lt;A href="http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x022718276953d61190040090279cd0f9,00.html" target="_blank"&gt;http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x022718276953d61190040090279cd0f9,00.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Enjoy, have FUN! H.Merijn</description>
    <pubDate>Mon, 10 Mar 2003 17:50:26 GMT</pubDate>
    <dc:creator>H.Merijn Brand (procura</dc:creator>
    <dc:date>2003-03-10T17:50:26Z</dc:date>
    <item>
      <title>perl module problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-module-problem/m-p/2923341#M110007</link>
      <description>I am new to perl and I am struggling with the following in a perl module that I created.&lt;BR /&gt;&lt;BR /&gt; $sql = &amp;lt;&amp;lt;'EOT';&lt;BR /&gt; select *&lt;BR /&gt; from tblCodeEventType&lt;BR /&gt; order by description&lt;BR /&gt; EOT&lt;BR /&gt;&lt;BR /&gt;I am importing it into a perl script called test.pl using the following:&lt;BR /&gt; use storedProcs;&lt;BR /&gt;&lt;BR /&gt;The entire script bombs when I import the module.</description>
      <pubDate>Mon, 10 Mar 2003 16:27:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-module-problem/m-p/2923341#M110007</guid>
      <dc:creator>Brian Bierman</dc:creator>
      <dc:date>2003-03-10T16:27:38Z</dc:date>
    </item>
    <item>
      <title>Re: perl module problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-module-problem/m-p/2923342#M110008</link>
      <description>Good that you also attached it, because whitespace is the issue here. here-documents (the name of the &amp;lt;&amp;lt; structure) expect the ending pattern on the start of the line. In your case it is not. Why not use q{} or qq{} instead?&lt;BR /&gt;&lt;BR /&gt;package storedProcs;&lt;BR /&gt;BEGIN&lt;BR /&gt;{&lt;BR /&gt;use Exporter();&lt;BR /&gt;@ISA = qw(Exporter);&lt;BR /&gt;@EXPORT_OK = qw(&amp;amp;sp_EventType &amp;amp;sp_Test);&lt;BR /&gt;}&lt;BR /&gt;sub sp_EventType&lt;BR /&gt;{&lt;BR /&gt;#$sql = "Blah, blah, blah";&lt;BR /&gt;$sql = q{&lt;BR /&gt;select *&lt;BR /&gt;from tblCodeEventType&lt;BR /&gt;order by description&lt;BR /&gt;};&lt;BR /&gt;return $sql;&lt;BR /&gt;}&lt;BR /&gt;sub sp_Test&lt;BR /&gt;{&lt;BR /&gt;print "&lt;P&gt;It's aliiiiive!&lt;/P&gt;";&lt;BR /&gt;}&lt;BR /&gt;END{}&lt;BR /&gt;1;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;indent to your liking&lt;BR /&gt;&lt;BR /&gt;Enjoy, have FUN! H.Merijn</description>
      <pubDate>Mon, 10 Mar 2003 16:31:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-module-problem/m-p/2923342#M110008</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2003-03-10T16:31:35Z</dc:date>
    </item>
    <item>
      <title>Re: perl module problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-module-problem/m-p/2923343#M110009</link>
      <description>That did it!  Thanks for your help.</description>
      <pubDate>Mon, 10 Mar 2003 16:38:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-module-problem/m-p/2923343#M110009</guid>
      <dc:creator>Brian Bierman</dc:creator>
      <dc:date>2003-03-10T16:38:48Z</dc:date>
    </item>
    <item>
      <title>Re: perl module problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-module-problem/m-p/2923344#M110010</link>
      <description>You're new here, so may I remind you of the screen you got when posting the question? If you forgot, please read &lt;A href="http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x022718276953d61190040090279cd0f9,00.html" target="_blank"&gt;http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x022718276953d61190040090279cd0f9,00.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Enjoy, have FUN! H.Merijn</description>
      <pubDate>Mon, 10 Mar 2003 17:50:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-module-problem/m-p/2923344#M110010</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2003-03-10T17:50:26Z</dc:date>
    </item>
    <item>
      <title>Re: perl module problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-module-problem/m-p/2923345#M110011</link>
      <description>procura,&lt;BR /&gt;&lt;BR /&gt;I have one more question.  Can I include arguments passed to my sub within the q{} or qq{} contructs?&lt;BR /&gt;&lt;BR /&gt;ie. &lt;BR /&gt;&lt;BR /&gt;sub sp_EventType(arg1)&lt;BR /&gt;{&lt;BR /&gt;$sql = q&lt;BR /&gt;{&lt;BR /&gt;select * from tblCodeEventType where EventType = arg1&lt;BR /&gt;};&lt;BR /&gt;&lt;BR /&gt;return $sql;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;Once again, I am brand new to perl so please forgive my skewed syntax.</description>
      <pubDate>Mon, 10 Mar 2003 19:41:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-module-problem/m-p/2923345#M110011</guid>
      <dc:creator>Brian Bierman</dc:creator>
      <dc:date>2003-03-10T19:41:59Z</dc:date>
    </item>
    <item>
      <title>Re: perl module problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-module-problem/m-p/2923346#M110012</link>
      <description>Sure you can :) q{} is like single quotes (hence the single q, and qq - you guessed - is the alternative way of using double quotes. The advantage of the q and qq structs is that you can use almost any delimiter to it, and thus can use the /real/ quotes inside q and qq.&lt;BR /&gt;&lt;BR /&gt;so here's my favourite, using the semicolon :)&lt;BR /&gt;&lt;BR /&gt;sub foo ($) # in perl5 you do not (yet) have named arguments&lt;BR /&gt;{ # if you want them, pass arguments in a hash&lt;BR /&gt;my $tbl = shift; # default arg to shift is @_ in&lt;BR /&gt;# sub's which represents the passed arguments&lt;BR /&gt;my $sql = qq;&lt;BR /&gt;select *&lt;BR /&gt;from $tbl&lt;BR /&gt;where field = 'blah';&lt;BR /&gt;return $sql; &lt;BR /&gt;} # foo&lt;BR /&gt;&lt;BR /&gt;# in this case you don't need the $sql variable&lt;BR /&gt;&lt;BR /&gt;and later&lt;BR /&gt;&lt;BR /&gt;my $sql = foo ("clients");&lt;BR /&gt;&lt;BR /&gt;If you're into database access, *please* take a look at the DBI module and the DBD::YourDatabase that fits it. It will make your life soooo much easier.&lt;BR /&gt;&lt;BR /&gt;BTW I forgive your screwed syntax :) the ITRC molests neat indents and lined out spaces anyway, so posting self documenting code is nearly impossible :P&lt;BR /&gt;&lt;BR /&gt;Enjoy, have FUN! H.Merijn</description>
      <pubDate>Tue, 11 Mar 2003 00:15:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-module-problem/m-p/2923346#M110012</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2003-03-11T00:15:09Z</dc:date>
    </item>
    <item>
      <title>Re: perl module problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-module-problem/m-p/2923347#M110013</link>
      <description>Thanks again.  I am using the DBI module with MySql.  I am used to SQL Server and am trying to compensate for MySql's lack of stored procedure and trigger capability.  Not to mention the elimination of redundant code.  Hence a module for sql statements and DB connects.  &lt;BR /&gt;&lt;BR /&gt;As you can imagine, this module can become quite large.  I read that I can import just the subroutines that I need for a particular perl script and cut the overhead of loading the entire module.  Is this correct?  &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 11 Mar 2003 14:23:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-module-problem/m-p/2923347#M110013</guid>
      <dc:creator>Brian Bierman</dc:creator>
      <dc:date>2003-03-11T14:23:33Z</dc:date>
    </item>
    <item>
      <title>Re: perl module problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-module-problem/m-p/2923348#M110014</link>
      <description>Yes, correct.&lt;BR /&gt;&lt;BR /&gt;Please do&lt;BR /&gt;&lt;BR /&gt;# man perlmod&lt;BR /&gt;&lt;BR /&gt;for the specifics. I'm not a module expert :)&lt;BR /&gt;&lt;BR /&gt;Enjoy, have FUN! H.Merijn</description>
      <pubDate>Tue, 11 Mar 2003 14:35:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-module-problem/m-p/2923348#M110014</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2003-03-11T14:35:04Z</dc:date>
    </item>
  </channel>
</rss>

