[10020] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 3613 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Sep 2 01:05:25 1998

Date: Tue, 1 Sep 98 22:00:16 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Tue, 1 Sep 1998     Volume: 8 Number: 3613

Today's topics:
        Advertisment program in Perl <lesel@telegate.se>
        beginner needs help(perl and Access) <j9feng@hotmail.com>
        Cookies? <felix@tarnconsulting.com>
    Re: Forking and Use. <zenin@bawdycaste.org>
        Get disk space on Win NT <alext@NOSPAM.pobox.com>
    Re: Help to extract variables (Damian Conway)
    Re: History of Perl <uri@sysarch.com>
    Re: How do I get server-side includes to work with IIS? (Tad McClellan)
        how to generate random password <dan@bns.com>
        In search of Intellegint Life... HELP!! (Ripcord104)
    Re: In search of Intellegint Life... HELP!! <rootbeer@teleport.com>
    Re: In search of Intellegint Life... HELP!! <rra@stanford.edu>
    Re: In search of Intellegint Life... HELP!! (Craig Berry)
    Re: In search of Intellegint Life... HELP!! <BobnNOSPAM@NOSPAMinteraccess.com>
        Interpolating from a Template <75762.2332@CompuServe.COM>
    Re: Misinterpreted => why no true/false keywords? <zenin@bawdycaste.org>
    Re: Misinterpreted => why no true/false keywords? <zenin@bawdycaste.org>
    Re: perl scripts as NT services? <alext@NOSPAM.pobox.com>
    Re: Perl scripts running like NT Service <alext@NOSPAM.pobox.com>
    Re: Reading regular expression from file (Tad McClellan)
        Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Wed, 02 Sep 1998 06:36:17 +0200
From: Lennarth Selander <lesel@telegate.se>
Subject: Advertisment program in Perl
Message-Id: <35ECCB41.58F1F65B@telegate.se>

What i'm looking for is something like:

1. Ad is written to a database.
2. Check ad for "naghty" words.
3. Advertiser is given a password which is sent by mail.
4. Advertiser must enable ad with the password.
5. Advertiser can edit / dissable ad.
6. E-mail addresses dosn't shown in ad.

Have someone seen something i can use?


/Lennarth


------------------------------

Date: Tue, 01 Sep 1998 21:09:22 +0000
From: feng <j9feng@hotmail.com>
Subject: beginner needs help(perl and Access)
Message-Id: <35EC6281.6946A883@hotmail.com>

I am learning perl and hope to get some help from you perl experts.

I know basics of perl and can understand the sample codes I find on
tutorials. Now I have a problem.
I want to write a simple perl program to search a database(Access). If
matches are found
, just print the matching records.

I look through several perl books, but find  they just show how to
search a database in flat file, not in Access or Oracle.
Anybody knows a book or online resourses containing such a sample
program? Or could you post a simple sample code here if it is not too
long?

Thanks in advance!
Feng



------------------------------

Date: Tue, 1 Sep 1998 21:53:35 -0700
From: "Felix Tarnarider" <felix@tarnconsulting.com>
Subject: Cookies?
Message-Id: <6siip4$feo@sjx-ixn5.ix.netcom.com>

How do you set a cookie in Perl(Win32)? I tried to set an environment
variable but the next .pl file could not get the value from the variable. Is
there any way to pass a variable without a post or get with the value in the
url?

felix




------------------------------

Date: 2 Sep 1998 04:49:49 GMT
From: Zenin <zenin@bawdycaste.org>
Subject: Re: Forking and Use.
Message-Id: <904711741.906096@thrush.omix.com>

Mark-Jason Dominus <mjd@op.net> wrote:
: All except the one point that was actually at issue in the original
: question.

        <sigh...>

        Threads often (if not always) change direction and topic many times.  

: The original querent wanted to know if `use' would fork a subprocess
: to run `cat', the way `cat $file` does.

        Quite true, but was my followup in response to the original post?
        No, it wasn't.  It was in reference to issues raised later in
        the thread.

        What, did I forget to include a References header?  If I did please
        let me know so I can fix my news reader if this is the case, thanks!

-- 
-Zenin (zenin@archive.rhps.org)           From The Blue Camel we learn:
BSD:  A psychoactive drug, popular in the 80s, probably developed at UC
Berkeley or thereabouts.  Similar in many ways to the prescription-only
medication called "System V", but infinitely more useful. (Or, at least,
more fun.)  The full chemical name is "Berkeley Standard Distribution".


------------------------------

Date: Tue, 01 Sep 1998 21:02:54 -0600
From: Alex Tatistcheff <alext@NOSPAM.pobox.com>
Subject: Get disk space on Win NT
Message-Id: <35ECB55D.FBDF332F@NOSPAM.pobox.com>

I'm trying to create a script that will tell me the percentage of disk
space used on an NT server.  I can get the amount of free space by just
grabbing the end of the DIR command but don't know of a way to get the
total capacity of a drive.  Anyone have any ideas?

----------------------
Please remove NOSPAM from email address when replying

Alex Tatistcheff
alext @ pobox . com




------------------------------

Date: 2 Sep 1998 03:19:59 GMT
From: damian@cs.monash.edu.au (Damian Conway)
Subject: Re: Help to extract variables
Message-Id: <6sidgv$ogj$1@towncrier.cc.monash.edu.au>

Mark Fergusson <mferg@hal.ddntl.didata.co.za> writes:

>Hi.

>I'm runing a perl program with a number of arguments. I need to set
>variables based on these arguments. It looks something like this:

>program value1=Value1 value2=hello this is a test value3=next test
>value4=Value4

>What I need out of this is:
>$value1="Value1";
>$value2="hello this is a test";
>$value3="next test";
>$value4="Value4";

You could solve this quite easily using the Getopt::Declare module.

If you meant that you need the variables $main::value1 to $main::value4
to be set *inside* the program in response to the command-line, use this:

	use Getopt::Declare;

	new Getopt::Declare q
	{
		[pvtype: id     /[a-z_]\w*/             ]
		[pvtype: notid  /((?![a-z_]\w*\s*=).)+/ ]

		<var:id> = <val:notid>	Set $var to val [repeatable]
					{ ${$main::{$var}} = $val }
	};

	# AT THIS POINT EACH $main::<var> SPECIFIED ON THE COMMAND LINE WILL
	# HAVE THE CORRESPONDING SPECIFIED VALUE


On the other hand, if you need to generate the literal output you
specified, use this:

	use Getopt::Declare;

	new Getopt::Declare q
	{
		[pvtype: id     /[a-z_]\w*/             ]
		[pvtype: notid  /((?![a-z_]\w*\s*=).)+/ ]

		<var:id> = <val:notid>	Set $var to val [repeatable]
					{ print qq{\$$var="$val"\n} }
	};


ObDisclaimer: I wrote Getopt::Declare. You can probably do the same thing
	      with other Getopt:: modules from the CPAN.

Damian

PS: If you *are* trying to set internal variables, take Mark-Jason's advice
    and load up a hash instead. It's much more robust. And you can do it
    just as easily in Getopt::Declare:

		use Getopt::Declare;

		new Getopt::Declare q
		{
			[pvtype: id     /[a-z_]\w*/             ]
			[pvtype: notid  /((?![a-z_]\w*\s*=).)+/ ]

			<var:id> = <val:notid>	Set $var to val [repeatable]
						{ $::value{$var} = $val }
		};

		# AT THIS POINT THE HASH %::value STORES THE var:val PAIRS


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 name: Damian Conway                           addr: School of Computer Science
email: damian@csse.monash.edu.au                        and Software Engineering
  web: http://www.cs.monash.edu.au/~damian           Monash University
  fax: +61-3-9905-5146                               Clayton 3168, AUSTRALIA


------------------------------

Date: 01 Sep 1998 23:24:46 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: History of Perl
Message-Id: <x7zpcj19j5.fsf@sysarch.com>

>>>>> "E-A" == Elaine -HappyFunBall- Ashton <eashton@bbnplanet.com> writes:

  >> Im looking for a site with a good history on Larry Wall and how Perl was
  >> first started to add to some of the other information I have for a book
  >> I am writting.  If you know of a good URL I woudl appreciate it if you
  >> could pass it along.

  E-A> there was a thread mentioning this very thing on p5p today/yesterday.
  E-A> someone may choose to take the challenge and get published in tpj. if
  E-A> youre writing a book im sure that someone has a little press kit or
  E-A> somesuch for this very purpose. maybe mail oreilly or larry and ask. the
  E-A> source is a good place to start. good luck.

i have read a shorter history (by larry IIR), which describes its
beginnings as a tool to keep two remote databases ssynchronized. it was
on some perl site like perl.com or perl.org but i tried to find it now
but i couldn't locate it. 

maybe someone else remembers this doc and can locate it.

uri

-- 
Uri Guttman  -----------------  SYStems ARCHitecture and Software Engineering
Perl Hacker for Hire  ----------------------  Perl, Internet, UNIX Consulting
uri@sysarch.com  ------------------------------------  http://www.sysarch.com
The Best Search Engine on the Net -------------  http://www.northernlight.com


------------------------------

Date: Tue, 1 Sep 1998 21:49:43 -0500
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: How do I get server-side includes to work with IIS?
Message-Id: <7obis6.3ff.ln@metronet.com>

Wayne Cochrane (wcochrane@pobox.com) wrote:
: How do I get server-side includes to work with IIS? Is this in the default
: install or do I need something else?


   This is the Perl newsgroup.

   We discuss Perl here.

   Please do not post off topic articles here.



   There are other newsgroups for discussing HTTP servers:

      comp.infosystems.www.servers.mac
      comp.infosystems.www.servers.misc
      comp.infosystems.www.servers.ms-windows
      comp.infosystems.www.servers.unix


--
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


------------------------------

Date: Tue, 1 Sep 1998 20:33:10 -0700
From: "Dan Bassett" <dan@bns.com>
Subject: how to generate random password
Message-Id: <35ecbd2a.0@news1.starnetinc.com>

I want to implement a script which generates random passwords.
I understand their is a perl function called rand which could do this
for me. However, I'm not sure what variables or expressions to use.

Here is the format I was looking for:

A random password which can contain a combination of uppercase
letters, lowercase letters and numbers with a length of between
8 and 10 digits...

Any help would be appreciated..

Dan
dan@bns.com







------------------------------

Date: 2 Sep 1998 04:02:45 GMT
From: ripcord104@aol.com (Ripcord104)
Subject: In search of Intellegint Life... HELP!!
Message-Id: <1998090204024500.AAA16894@ladder03.news.aol.com>

Ok here's my problem, I'm trying to learn this stuff so I got a book on Perl
CGI and I have a subroutine:
sub HTML_Footer
{
              print "\n", "</BODY", "\n";
              print "</HTML>", "\n";
}

 in the file HTMLEND.PL and my main file, HELLO.PL that uses: 
require "htmlend.pl"   --- and then later on calls it up with &HTML_Footer ---
my problem is that every time I try to run this, it says "htmlend.pl did not
return a true value at hello.pl line 5"   line 5 is the line that says {require
"htmlend.pl"}  I know its hard to figure this out with the info I'm giving you
but if anybody has ANY clue at all I would appreciate it, I'm trying to learn
this stuff and this is really getting in my way of going any further....  
Thanks in advance,
Cory Hopper



------------------------------

Date: Wed, 02 Sep 1998 04:23:15 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: In search of Intellegint Life... HELP!!
Message-Id: <Pine.GSO.4.02A.9809012115320.19275-100000@user2.teleport.com>

On 2 Sep 1998, Ripcord104 wrote:

> Subject: In search of Intellegint Life... HELP!!

Please check out this helpful information on choosing good subject
lines. It will be a big help to you in making it more likely that your
requests will be answered.

    http://www.perl.com/CPAN/authors/Dean_Roehrich/subjects.post

> I got a book on Perl CGI 

Uh oh. :-)

> my problem is that every time I try to run this, it says "htmlend.pl
> did not return a true value at hello.pl line 5"

If you're doing just what the book told you, throw away the book. Then
check what perldiag says about that error message.

Hope this helps!

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



------------------------------

Date: 01 Sep 1998 21:21:16 -0700
From: Russ Allbery <rra@stanford.edu>
Subject: Re: In search of Intellegint Life... HELP!!
Message-Id: <m3btozf8lf.fsf@windlord.Stanford.EDU>

Ripcord104 <ripcord104@aol.com> writes:

> Ok here's my problem, I'm trying to learn this stuff so I got a book on
> Perl CGI and I have a subroutine:

> sub HTML_Footer
> {
>               print "\n", "</BODY", "\n";
>               print "</HTML>", "\n";
> }

> in the file HTMLEND.PL and my main file, HELLO.PL that uses:  require
> "htmlend.pl" --- and then later on calls it up with &HTML_Footer --- my
> problem is that every time I try to run this, it says "htmlend.pl did
> not return a true value at hello.pl line 5"

required files need to end in a value that resolves to true, or Perl
considers the require to have failed.  The short answer is that you need
to put "1;" at the end of htmlend.pl.

-- 
#!/usr/bin/perl -- Russ Allbery, Just Another Perl Hacker
$^=q;@!>~|{>krw>yn{u<$$<[~||<Juukn{=,<S~|}<Jwx}qn{<Yn{u<Qjltn{ > 0gFzD gD,
 00Fz, 0,,( 0hF 0g)F/=, 0> "L$/GEIFewe{,$/ 0C$~> "@=,m,|,(e 0.), 01,pnn,y{
rw} >;,$0=q,$,,($_=$^)=~y,$/ C-~><@=\n\r,-~$:-u/ #y,d,s,(\$.),$1,gee,print


------------------------------

Date: 2 Sep 1998 04:27:14 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: In search of Intellegint Life... HELP!!
Message-Id: <6sihf2$3id$1@marina.cinenet.net>

Two initial comments:

1) Use a more meaningful subject line next time.
2) Misspelling 'intelligent' in a meaningless subject line just leaves you
   wide-open to abuse...or worse, being ignored.

Ripcord104 (ripcord104@aol.com) wrote:
: Ok here's my problem, I'm trying to learn this stuff so I got a book on Perl
: CGI and I have a subroutine:

Which book?  Is this code/problem *from* that book?  If so, ditch it and
get _Learning Perl_, then _Programming Perl_.

: sub HTML_Footer
: {
:               print "\n", "</BODY", "\n";
:               print "</HTML>", "\n";
: }

How that subroutine body is better than

  print "\n</BODY>\n</HTML>\n";

I don't quite see, but okay.

:  in the file HTMLEND.PL and my main file, HELLO.PL that uses: 
: require "htmlend.pl"

Careful with your capitalization, there -- you may *currently* be running
on a system that doesn't care about it, but sloppy capitalization
mismatches will make your script needlessly difficult to port to other
systems that do care.

:   --- and then later on calls it up with &HTML_Footer ---
: my problem is that every time I try to run this, it says "htmlend.pl did not
: return a true value at hello.pl line 5"   line 5 is the line that says {require
: "htmlend.pl"}

perldoc -f require, third-to-last paragraph:

 Note that the file will not be included twice under the same specified   
 name.  The file must return TRUE as the last statement to indicate       
 successful execution of any initialization code, so it's customary to    
 end such a file with "1;" unless you're sure it'll return TRUE           
 otherwise.  But it's better just to put the "1;", in case you add more
 statements.

: I know its hard to figure this out with the info I'm giving you

No, you get full credit for giving sufficient information.  Where you need
work is on solving problems locally, using the astonishingly comprehensive
and well-written documentation.  How much time have you wasted on this,
knowing your problem was with 'require' yet failing (apparently) to read
the doc (resident on your very own hard disk)  describing 'require'? 
Learning to turn to the Perl doc and experimentation first, and Usenet as
a last resort, is the beginning of Perl wisdom. 

---------------------------------------------------------------------
   |   Craig Berry - cberry@cinenet.net
 --*--    Home Page: http://www.cinenet.net/users/cberry/home.html
   |      "Ripple in still water, when there is no pebble tossed,
       nor wind to blow..."


------------------------------

Date: Tue, 01 Sep 1998 23:44:25 -0500
From: Bobn <BobnNOSPAM@NOSPAMinteraccess.com>
Subject: Re: In search of Intellegint Life... HELP!!
Message-Id: <35ECCD29.557F@NOSPAMinteraccess.com>

SOmewhere in the doc it says that files used by require must return a
true result, hence these files often are ended with

1;



Ripcord104 wrote:
> 
> Ok here's my problem, I'm trying to learn this stuff so I got a book on Perl
> CGI and I have a subroutine:
> sub HTML_Footer
> {
>               print "\n", "</BODY", "\n";
>               print "</HTML>", "\n";
> }
> 
>  in the file HTMLEND.PL and my main file, HELLO.PL that uses:
> require "htmlend.pl"   --- and then later on calls it up with &HTML_Footer ---
> my problem is that every time I try to run this, it says "htmlend.pl did not
> return a true value at hello.pl line 5"   line 5 is the line that says {require
> "htmlend.pl"}  I know its hard to figure this out with the info I'm giving you
> but if anybody has ANY clue at all I would appreciate it, I'm trying to learn
> this stuff and this is really getting in my way of going any further....
> Thanks in advance,
> Cory Hopper


------------------------------

Date: Wed, 02 Sep 1998 00:15:38 -0400
From: Ruben Safir <75762.2332@CompuServe.COM>
Subject: Interpolating from a Template
Message-Id: <udCCYhi19GA.139@nih2naab.prod2.compuserve.com>

Hello:


I'm wondering if I missunderstand something in perl as it relates to DBI or MYSQL.

I wanted to store a template HTML file in a table as a typeglob in MYSQL such as this:


<H2> Patient Personal Information</h2>
<FORM ACTION="http://llinderman.dental.nyu.edu/cgi-bin/patients.cgi" METHOD="POST">
<TABLE border=3 bgcolor="#FFFFFF">
<TR>
    <TH bgcolor="#88f8f8">Chart Number</TH>
</TR>
<TR>
  <TD>$html_txt[0] </TD>
</TR>
</TABLE>


<TABLE border = 3 bgcolor = "#FFFFFF">
<TR>
    <TH bgcolor="#88f8f8">Last Name</TH>
    <TH bgcolor="#88f8f8">First Name</TH>
    <TH bgcolor="#88f8f8">Adress</TH>
    <TH bgcolor="#88f8f8">City</TH>
    <TH bgcolor="#88f8f8">State</TH>
    <TH bgcolor="#88f8f8">Zip Code</TH>
</TR>
<TR>
    <TD>$html_txt[2] </TD>
    <TD>$html_txt[1]</TD>
    <TD>$html_txt[3]</TD>
    <TD>$html_txt[4]</TD>
    <TD>$html_txt[5]</TD>
    <TD>$html_txt[6]</TD>

</TR>
</TABLE>

<TABLE border = 3 bgcolor = "#FFFFFF">
<TR>
    <TH bgcolor="#88f8f8">Birthdate</TH>
    <TH bgcolor="#88f8f8">Social Security</TH>
   <TH bgcolor="#88f8f8">Gender</TH>
    <TH bgcolor="#88f8f8">Marital Status</TH>
    <TH bgcolor="#88f8f8">Home Phone</TH>
    <TH bgcolor="#88f8f8">Work Phone</TH>
</TR>
<TR>
    <TD> $html_txt[7] </TD>
    <TD> $html_txt[8] </TD>
    <TD> $html_txt[9] </TD>
    <TD> $html_txt[10] </TD>
    <TD> $html_txt[11] </TD>
    <TD> $html_txt[12] </TD>

</TR>
</TABLE>


     <INPUT TYPE="HIDDEN" NAME="pages" VALUE= "medhist">
     <INPUT TYPE="HIDDEN" NAME="view_0" VALUE= "chart_patients">
     <INPUT TYPE="HIDDEN" NAME="view_1" VALUE= "last_patients">
     <INPUT TYPE="HIDDEN" NAME="view_2" VALUE= "first_patients">
     <INPUT TYPE="HIDDEN" NAME="view_3" VALUE= "address_patients">
     <INPUT TYPE="HIDDEN" NAME="view_4" VALUE= "city_patients">
     <INPUT TYPE="HIDDEN" NAME="view_5" VALUE= "state_patients">
     <INPUT TYPE="HIDDEN" NAME="view_6" VALUE= "zip_patients">
     <INPUT TYPE="HIDDEN" NAME="view_7" VALUE= "birthdate_patients">
     <INPUT TYPE="HIDDEN" NAME="view_8" VALUE= "ss_patients">
     <INPUT TYPE="HIDDEN" NAME="view_9" VALUE= "sex_patients">
     <INPUT TYPE="HIDDEN" NAME="view_10" VALUE= "marital_patients">
     <INPUT TYPE="HIDDEN" NAME="view_11" VALUE= "homeph_patients">
     <INPUT TYPE="HIDDEN" NAME="view_12" VALUE= "workph_patients">
     <INPUT TYPE="HIDDEN" NAME="where_right_25" VALUE= "$html_txt[13]">
     <INPUT TYPE="HIDDEN" NAME="where_left_25" VALUE= "PatNum_patients">
     <INPUT TYPE="HIDDEN" NAME="where_ops_25" VALUE= "eql">
     <INPUT TYPE="HIDDEN" NAME="where_bool_25" VALUE= "AND">
     <INPUT TYPE="HIDDEN" NAME="join_left_23" VALUE= "PatNum_patients">
     <INPUT TYPE="HIDDEN" NAME="join_ops_23" VALUE= "eql">
     <INPUT TYPE="HIDDEN" NAME="join_right_23" VALUE= "PatNum_detail">
     <INPUT TYPE="HIDDEN" NAME="userno" VALUE= $status_array{userno}>
     <INPUT TYPE="HIDDEN" NAME="password" VALUE= $status_array{password}>

         <HR> <p> <h3>MEDICAL HISTORY</H3><CENTER>


<TABLE border = 3 bgcolor = "#FFFFFF">
<TR>
    <TH bgcolor="#88f8f8">Date of Service</TH>
    <TH bgcolor="#88f8f8">Proceedure Code</TH>
    <TH bgcolor="#88f8f8">Provider</TH>
    <TH bgcolor="#88f8f8">Tooth</TH>
    <TH bgcolor="#88f8f8">Surface</TH>
</TR>
<TR>
    <TD> $html_txt[14] </TD>
    <TD> $html_txt[16] </TD>
    <TD> $html_txt[22] </TD>
    <TD> $html_txt[17] </TD>
    <TD> $html_txt[18] </TD>

</TR>

<<R
<TR>
    <TD> $html_txt[14] </TD>
    <TD> $html_txt[16] </TD>
    <TD> $html_txt[22] </TD>
    <TD> $html_txt[17] </TD>
    <TD> $html_txt[18] </TD>

</TR>
>>R
         </TABLE></CENTER>

     <INPUT TYPE="submit" NAME="selection" VALUE="MEDICAL HISTORY">
     <INPUT TYPE="submit" NAME="selection" VALUE="FAMILY INFORMATION">
     <INPUT TYPE="submit" NAME="selection" VALUE="LAST VISIT"> </FORM>




Where the code is maked <<R and >>R I wanted to intinerate through the page, and plug in the variables from data obtained from a different querry which uses
DBI to fetch records in @html_txt such as this

print "IN FATTEN";
    my( $workspace ) = @_;
    #print "\n\n<B><p> WORKSPACE:<pre> $workspace :::</pre><p>END OF WORKSPACE\n\n</b>";
    my( @breakdown ) = split /\n/, $workspace;
    #print "\n<p> breakdown \n :<pre> @breakdown :::</pre><p>\n\n";
#    for( $i = 0; $i < @breakdown; $i++){
#      # print "\nBREAKDOWN $breakdown[$i]";
#    }
        for( $i=0; $i< @breakdown; $i++){
           $temp1 = $breakdown[$i];
           #print "\nIN WHILE LOOP temp is : $temp1 <P> \n";
           if( $temp1 =~ /^<<R$/ ){
           print "FOUND MARKER <P>";
              @html_txt =  $sth->fetchrow_array;
              $temp1 = $breakdown[++$i];
               while(1){
                  last if ( $temp1 =~ /\>\>R/ );
                  $buffer = join / /, $buffer, $temp1;
                  $temp1 = $breakdown[++$i];
           print "\nIN WHILE LOOP temp is : $temp1 <P> \n";
               }
               $outputhtml = join $outputhtml, $buffer;
               while(@html_txt =  $sth->fetchrow_array){
                  $outputhtml = join / /,$outputhtml, $buffer;
               }
            }
        }
        $outputhtml = join( $outputhtml , $buffer );
print "OUTFILE: $outputhtml<p>";
return $outputhtml;
}

The database is opened in a previous subroutine.

I'm getting output to Apache such as this:

<TD> $html_txt[3] </TD>

Does Perl interpolate strings aquired from a Table such as I'm doing?

Normally - if I do something like:

print "$myvar"; - it interpolates without trouble.



Ruben
ruben@wynn.com
ruben@llinderman.dental.nyu.edu


------------------------------

Date: 2 Sep 1998 04:25:37 GMT
From: Zenin <zenin@bawdycaste.org>
Subject: Re: Misinterpreted => why no true/false keywords?
Message-Id: <904710297.502149@thrush.omix.com>

Mark-Jason Dominus <mjd@op.net> wrote:
: `Syntactic sugar' is usually understood as a simple veneer over some
: syntactic feature to make it look more familiar.  A typical example is
        >snip<

        I've always considered the term a little more broad then that, but
        that's ok.  The Jargon File is closer to your definition anyway.

: is syntactic sugar for (quote x).  Syntactic sugar doesn't introduce
: any new or different semantics; it just makes the program easier to
: swallow by changing the syntax.

        By this definition, dbm hashes are also syntactic suger in most
        cases:

        $DBM{foo} = 'bar';

        vs

        $dbm->set ('foo', 'bar');

        vs

        set_dbm ($dbm, 'foo', 'bar');

        Changing syntax isn't just by #defines.

: Anyway, your remark is deceptive; it is a straw man.  You are implying
: that I must object to all those things you listed, because they are
: all just like `const'.  But they are not just like `const'.  

        In the effect that they all basically just put a pretty wrapper
        over code, yes they are.

: I have no objection to syntactic sugar, and I have no objection to
: modules that pull in 450 lines of code to accomplish their ends.  My
: objection is to syntactic sugar that pulls in 450 lines of code to
: accomplish nothing more than sugar.  Even then I might not object if I
: felt that the sugar was worthwhile; in this case the gain seems
: minuscule, if it exists at all.

        So if use constant was a cpp macro, you wouldn't object?

: Going over your examples one at a time, I find that base.pm is not
: syntactic sugar,

        Huh?

        BEGIN { require Foo (); @ISA = qw(Foo) }

        vs

        use base qw(Foo);

: is only 50 lines long anyway,

        That's still 25 lines per line it replaces.  Not as bad as
        constant I'll admit, but we're still talking about a huge
        percentage.

: and loads no other modules.

        So if constant dyna-loaded Carp you wouldn't object?
        Which it arguably should, but then so should *every* other
        module.

: vars.pm is syntactic sugar for a one-line glob assignment,
: but is only 40 lines long and loads no other modules;

        Now we're up to 40 to 1, but that's still ok because it is
        not 400 to 1. :-)

: subs.pm is syntactic sugar for a one-line glob assignment, but is only 10 lines
: long and loads no other modules;

        Down to 10 to 1.  Better, but still not a #define.

: and tied classes are not syntactic sugar.

        Sure they are.  Look at my example above.  Just because they
        are core and not as simple as a #define doesn't mean they aren't
        mainly to make code easier to read.

: I haven't looked into `enum', so I reserve the right to object
: to it (or not) at a later date.

        <grin>

        It's almost exactly like constant, it just auto-defines
        its values ala a C 'enum' type or a bitmask list.

: It is not fair to expect a two-line example in a tutorial article to
: be appropriate for use in every possible bizarre circumstance,

        True.

: particularly one as contrived as your example.

        My example is neither contrived or bizarre.  It is actually
        very common.

: Nevertheless, I will
: point out that simply replacing `use' with `require' here solves your
: problem completely, in all cases,

        But causes new problems, such as moving compile time dependency
        and typo checks to run time, needlessly, which is bad.  You also
        remove the module's ability to run any BEGIN code that may be
        needed to insure that it will function correctly (such as a
        "mail" module checking to make sure it can use sendmail at compile
        time).

: with the added benefit of possibly
: speeding your program's startup time and reducing its memory usage if
: `Foo' is never needed.

        And opening up the possibility for unexpected run time errors.
        I for one would be much happier if "perl -wc foo" could be relied
        on for most consistency checks.        

: >        IMHO, tutorials that show potentially dangerous or ill advised
: >        practices without any mention of such hazards does no one much
: >        good.
: Hmm.
: 	Zenin:  You should have included a disclaimer with that example.
: 	Me:     But I did include a disclaimer.
: 	Zenin:  You should have included a disclaimer with that example.
: Oh well.  So much for that conversation!

        Well, close.  I'm not talking about a "disclaimer" as such.
        Disclaimers are to keep one from getting sued or otherwise attacked,
        and do little else.

        It's just like in shop class, when the instructor is telling the
        student to make sure they hold the board tight when feeding it into
        the tablesaw because it could kick back.  Would this be in a
        "disclaimer" somewere in the back of the text book?  I think not.
        And the student, being a student, could not be expected to know
        what "kick back" is, let alone why or how they should avoid it.

        Your tutorial is identical.  The teachings may well be profound
        and useful, but if implementing them can/will cause harmful side
        effects that the reader isn't likely to know about at all, it
        is simply irresponsible of the writer not to point them out.

        Global disclaimer or not, I'd blame the writer of such material if
        such an unexplained hazard was encountered that the writer should
        have mentioned.
-- 
-Zenin (zenin@archive.rhps.org)           From The Blue Camel we learn:
BSD:  A psychoactive drug, popular in the 80s, probably developed at UC
Berkeley or thereabouts.  Similar in many ways to the prescription-only
medication called "System V", but infinitely more useful. (Or, at least,
more fun.)  The full chemical name is "Berkeley Standard Distribution".


------------------------------

Date: 2 Sep 1998 04:34:31 GMT
From: Zenin <zenin@bawdycaste.org>
Subject: Re: Misinterpreted => why no true/false keywords?
Message-Id: <904710832.414138@thrush.omix.com>

Mark-Jason Dominus <mjd@op.net> wrote:
        >snip<
: Whether you use
: `open' or `sysopen' to open the empty file prior to locking it is not
: relevant to my article.

        Yes, it is, since the code you are arguing against will only exist
        if one is limited to just what open() can do.  Avoiding needless
        kludges such as secondary lock files is a prime example of why
        sysopen() exists.

        Since sysopen() can easily open a file in read/write/create mode
        without truncate or append, unlike open(), your second file lock
        system is not needed.  This is my point.  If you understood how
        to use sysopen() you wouldn't be writing needless and problematic
        secondary lock file code. 

: Are you sure you read my article, and not someone else's?  You seem to
: be arguing with me about my position on issues I never addressed at
: all, and about which I have no position.

        My point is that you are arguing solutions to problems that only
        exist if one does not understand sysopen().

-- 
-Zenin (zenin@archive.rhps.org)           From The Blue Camel we learn:
BSD:  A psychoactive drug, popular in the 80s, probably developed at UC
Berkeley or thereabouts.  Similar in many ways to the prescription-only
medication called "System V", but infinitely more useful. (Or, at least,
more fun.)  The full chemical name is "Berkeley Standard Distribution".


------------------------------

Date: Tue, 01 Sep 1998 21:17:15 -0600
From: Alex Tatistcheff <alext@NOSPAM.pobox.com>
Subject: Re: perl scripts as NT services?
Message-Id: <35ECB8BA.B31089A1@NOSPAM.pobox.com>

Use srvany in the NT Resource Kit.

Chris Roelle wrote:

>     Hello -
>
>     does anyone know how i can run a perl script
> as an NT service?  just need to get it going at
> boot-up, as a regular user (who could be an Admin,
> i guess), without automatically logging in.  help/http/ftp
> addresses w/ instructions welcome, of course, as i
> would gladly rtfm, if  i could find one....
>
>     thanks a lot,
>
>     chris roelle
>     cr@ucsd.edu



--

----------------------
Please remove NOSPAM from email address when replying

Alex Tatistcheff
alext @ pobox . com




------------------------------

Date: Tue, 01 Sep 1998 21:16:38 -0600
From: Alex Tatistcheff <alext@NOSPAM.pobox.com>
Subject: Re: Perl scripts running like NT Service
Message-Id: <35ECB895.CF7871AE@NOSPAM.pobox.com>

You need to use the srvany utility from the NT Resource Kit.

Scott Pasnikowski wrote:

> Has anyone successfully run perl scripts on NT Server like an NT service?
>
> I have been looking all over for docs that might indicate how.
> I am interested in running some scripts with no UI needs on an as needed and
> continuous basis.
>
> This implies that they have to keep running even if the user at the console
> loggs out.
>
> I have tried the NT AT command and it will launch perl.exe but "Perl
> myscript.pl" barfs
> with a generic error.   I also suspect this method would not survive the
> admin logging out.
>
> Any suggestions would be helpful.
>
>                                                         Spaz
>
> spasnikowski@symantec.com



--

----------------------
Please remove NOSPAM from email address when replying

Alex Tatistcheff
alext @ pobox . com




------------------------------

Date: Tue, 1 Sep 1998 22:02:37 -0500
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Reading regular expression from file
Message-Id: <dgcis6.tif.ln@metronet.com>

Chris Stolpe (cstolpe@acm.org) wrote:
: I am trying to read part of a regular expression from a file for use in
: a comparison.

: $regx = <EXPR>; # <= doesn't work.This works => $regx = "Foo|Bar";
                       ^^^^^^^^^^^^

   Eh?

   The purpose of this line is to read a line from the filehandle.

   Since you say that this doesn't work I guess you are having 
   trouble reading from the filehandle?

   Can't help if that is your problem. The above looks fine to me.


: chop($regx); # just for when reading from file


   That is the *years* old way of removing the line ending.

   The modern way is to use chomp() instead.



: if (/^($regx)/) {
: .....
: }

: Does it work when I set it to a string because perl knows the value of
: the string when it compiles the script 


   Yes.


: but doesn't when I read from the
: file because it doesn't know the value? 


   No.


: How can I work around this?


   I dunno. Largely because 1) I'm wondering what "doesn't work"
   means to you, and 2) you haven't given a complete code example
   that illustrates your problem.

   Like:

---------------------
#!/usr/bin/perl -w

$_ = 'Food';

$regx = <DATA>;
chomp $regx;

if (/^($regx)/) {
   print "Yep. Matched.\n";
}

__DATA__
Foo|Bar
---------------------


   That works fine for me...

   Are you *certain* that you have either 'Foo' or 'Bar' at 
   the beginning of $_ ?


--
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


------------------------------

Date: 12 Jul 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Special: Digest Administrivia (Last modified: 12 Mar 98)
Message-Id: <null>


Administrivia:

Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.

If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu. 


The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc.  For subscription or unsubscription requests, send
the single line:

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.

The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.

The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.

For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V8 Issue 3613
**************************************

home help back first fref pref prev next nref lref last post