[29460] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 704 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Jul 31 16:09:48 2007

Date: Tue, 31 Jul 2007 13:09:14 -0700 (PDT)
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, 31 Jul 2007     Volume: 11 Number: 704

Today's topics:
        CGI displays contents of script  jackson_samson@HOTMAIL.COM
    Re: CGI displays contents of script <mritty@gmail.com>
    Re: CGI displays contents of script  jackson_samson@HOTMAIL.COM
    Re: CGI displays contents of script <glex_no-spam@qwest-spam-no.invalid>
    Re: CGI displays contents of script <mritty@gmail.com>
    Re: CGI displays contents of script <noreply@gunnar.cc>
    Re: getting arguments <bik.mido@tiscalinet.it>
    Re: getting arguments <tzz@lifelogs.com>
        How do you continue in a for loop? <lamthierry@gmail.com>
    Re: How do you continue in a for loop? <azazel@azazel.net>
    Re: How do you continue in a for loop? <azazel@azazel.net>
    Re: How do you continue in a for loop? <mritty@gmail.com>
        NULL value question <jim@nnnnnnnnn.com>
    Re: NULL value question <mritty@gmail.com>
    Re: NULL value question <yankeeinexile@gmail.com>
    Re: NULL value question <klaus03@gmail.com>
    Re: Perl with DBI <blb8@po.cwru.edu>
    Re: threads and logfile rotation <ThomasKratz@REMOVEwebCAPS.de>
    Re: Using DBI, better option than importing into @array <blb8@po.cwru.edu>
    Re: Using DBI, better option than importing into @array  usenet@DavidFilmer.com
    Re: Variable declaration - C vs script style <glex_no-spam@qwest-spam-no.invalid>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Tue, 31 Jul 2007 11:38:00 -0700
From:  jackson_samson@HOTMAIL.COM
Subject: CGI displays contents of script
Message-Id: <1185907080.677135.231260@o61g2000hsh.googlegroups.com>

I have installed perl 5.8.8 which already has the CGI included in it.
I created a small test script that uses the CGI.pm. When I run the
following in my browser, it shows me the entire script and does not
execute the script.  Does anyone know why this happens?

Here is my output from the web browser:


#!/usr/bin/perl use CGI; print "Content-type: text/plain\n\n"; print
"TEST";



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

Date: Tue, 31 Jul 2007 11:43:44 -0700
From:  Paul Lalli <mritty@gmail.com>
Subject: Re: CGI displays contents of script
Message-Id: <1185907424.271993.66470@b79g2000hse.googlegroups.com>

On Jul 31, 2:38 pm, jackson_sam...@HOTMAIL.COM wrote:
> I have installed perl 5.8.8 which already has the CGI included in it.
> I created a small test script that uses the CGI.pm. When I run the
> following in my browser, it shows me the entire script and does not
> execute the script.  Does anyone know why this happens?
>
> Here is my output from the web browser:
>
> #!/usr/bin/perl use CGI; print "Content-type: text/plain\n\n"; print
> "TEST";

Because your web server is configured to display .cgi scripts rather
than execute them.  This has nothing to do with Perl and everything to
do with web server configuration.  You will get better assistance from
a group that talks about web server configurations.

Paul Lalli



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

Date: Tue, 31 Jul 2007 11:51:34 -0700
From:  jackson_samson@HOTMAIL.COM
Subject: Re: CGI displays contents of script
Message-Id: <1185907894.104982.150140@r34g2000hsd.googlegroups.com>

On Jul 31, 2:43 pm, Paul Lalli <mri...@gmail.com> wrote:
> On Jul 31, 2:38 pm, jackson_sam...@HOTMAIL.COM wrote:
>
> > I have installed perl 5.8.8 which already has the CGI included in it.
> > I created a small test script that uses the CGI.pm. When I run the
> > following in my browser, it shows me the entire script and does not
> > execute the script.  Does anyone know why this happens?
>
> > Here is my output from the web browser:
>
> > #!/usr/bin/perl use CGI; print "Content-type: text/plain\n\n"; print
> > "TEST";
>
> Because your web server is configured to display .cgi scripts rather
> than execute them.  This has nothing to do with Perl and everything to
> do with web server configuration.  You will get better assistance from
> a group that talks about web server configurations.
>
> Paul Lalli

That makes sense. Thanks for your answer.



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

Date: Tue, 31 Jul 2007 14:00:46 -0500
From: "J. Gleixner" <glex_no-spam@qwest-spam-no.invalid>
Subject: Re: CGI displays contents of script
Message-Id: <46af86df$0$509$815e3792@news.qwest.net>

jackson_samson@HOTMAIL.COM wrote:
> On Jul 31, 2:43 pm, Paul Lalli <mri...@gmail.com> wrote:
>> On Jul 31, 2:38 pm, jackson_sam...@HOTMAIL.COM wrote:
>>
>>> I have installed perl 5.8.8 which already has the CGI included in it.
>>> I created a small test script that uses the CGI.pm. When I run the
>>> following in my browser, it shows me the entire script and does not
>>> execute the script.  Does anyone know why this happens?
>>> Here is my output from the web browser:
>>> #!/usr/bin/perl use CGI; print "Content-type: text/plain\n\n"; print
>>> "TEST";
>> Because your web server is configured to display .cgi scripts rather
>> than execute them.  This has nothing to do with Perl and everything to
>> do with web server configuration.  You will get better assistance from
>> a group that talks about web server configurations.
>>
>> Paul Lalli
> 
> That makes sense. Thanks for your answer.
> 

Also, once you modify your Web server, the shebang line should be on a 
line by itself.

#!/usr/bin/perl
use CGI; print "Content-type: text/plain\n\n"; print "TEST";

or.. actually using the CGI module...

#!/usr/bin/perl
use CGI qw( :standard );

print header( 'text/plain' ), 'TEST';


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

Date: Tue, 31 Jul 2007 12:16:41 -0700
From:  Paul Lalli <mritty@gmail.com>
Subject: Re: CGI displays contents of script
Message-Id: <1185909401.757567.13990@d55g2000hsg.googlegroups.com>

On Jul 31, 3:00 pm, "J. Gleixner" <glex_no-s...@qwest-spam-no.invalid>
wrote:
> jackson_sam...@HOTMAIL.COM wrote:
> > On Jul 31, 2:43 pm, Paul Lalli <mri...@gmail.com> wrote:
> >> On Jul 31, 2:38 pm, jackson_sam...@HOTMAIL.COM wrote:
>
> >>> Here is my output from the web browser:
> >>> #!/usr/bin/perl use CGI; print "Content-type: text/plain\n\n"; print
> >>> "TEST";

> Also, once you modify your Web server, the shebang line should be on a
> line by itself.
>
> #!/usr/bin/perl
> use CGI; print "Content-type: text/plain\n\n"; print "TEST";

The OP was giving what his browser was outputting, not the actual
contents of the script.  Obviously, his browser (I'm guessing IE) was
interpreting the results as HTML, and therefore displaying it
whitespace-agnostic.

Paul Lalli



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

Date: Tue, 31 Jul 2007 21:19:52 +0200
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: CGI displays contents of script
Message-Id: <5h9gh8F3jf0fsU1@mid.individual.net>

jackson_samson@HOTMAIL.COM wrote:
> I have installed perl 5.8.8 which already has the CGI included in it.
> I created a small test script that uses the CGI.pm. When I run the
> following in my browser, it shows me the entire script and does not
> execute the script.  Does anyone know why this happens?
> 
> Here is my output from the web browser:
> 
> #!/usr/bin/perl use CGI; print "Content-type: text/plain\n\n"; print
> "TEST";

Maybe the script must be in the cgi-bin to be executed by the web 
server, while you run it from somewhere else?

-- 
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl


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

Date: Tue, 31 Jul 2007 17:19:06 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: getting arguments
Message-Id: <2nkua3ltlu0g669rneb35htgi98huqbtqj@4ax.com>

On 31 Jul 2007 07:56:40 -0500, Lawrence Statton
<yankeeinexile@gmail.com> wrote:

>Something like ... 
>
>  The American comedy troupe Monty Perl was far superior to those lame
>  brits....

:)


Michele
-- 
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
 .'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,


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

Date: Tue, 31 Jul 2007 13:10:56 -0400
From: Ted Zlatanov <tzz@lifelogs.com>
Subject: Re: getting arguments
Message-Id: <m2fy34ijmn.fsf@lifelogs.com>

On 31 Jul 2007 07:56:40 -0500 Lawrence Statton <yankeeinexile@gmail.com> wrote: 

LS> Michele Dondi <bik.mido@tiscalinet.it> writes:
>> Well, I was about to make a joke about a very well known programming
>> language occasionally compared with Perl... but I'm refraining to...
>> 

LS> Something like ... 

LS>   The American comedy troupe Monty Perl was far superior to those lame
LS>   brits....

LS> "This is an undef parrot, he has been garbage collected  ..... " 

(Waitress) "We have the $ and %browns, $ and @eggs, $! and $@, $! $! $! $@ $@ and $?, $_ $_ $?
$! $! $_ cheese and $."

[NB for those who don't have it in their country: "hash browns" are a type of food]

(Hag) "Do you have anything without $"

(W) "Well, the @$ref doesn't have much $ in it..."

(Vikings) "$! $_ $! $_ $? $@ $_ \$_ \$_ $!"

(H) "I don't like $ and I miss Java variables!!!"



Ted


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

Date: Tue, 31 Jul 2007 11:30:36 -0700
From:  Thierry <lamthierry@gmail.com>
Subject: How do you continue in a for loop?
Message-Id: <1185906636.573813.108980@z28g2000prd.googlegroups.com>

In other languages, the for loop has a continue statement feature to
skip an interation, how do you do it in perl?

Thierry



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

Date: Tue, 31 Jul 2007 18:34:36 +0000 (UTC)
From: Azazel <azazel@azazel.net>
Subject: Re: How do you continue in a for loop?
Message-Id: <slrnfav061.409.azazel@kadath.azazel.net>

On 2007-07-31, Thierry <lamthierry@gmail.com> wrote:
> In other languages, the for loop has a continue statement feature to
> skip an interation, how do you do it in perl?

"next".  For example:

  for (my $i = 0; $i < 10; ++$i)
    {
    if ($i == 7)
       {
       next;
       }
    else
      {
      print $i, "\n";
      }
    }


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

Date: Tue, 31 Jul 2007 18:35:29 +0000 (UTC)
From: Azazel <azazel@azazel.net>
Subject: Re: How do you continue in a for loop?
Message-Id: <slrnfav07m.409.azazel@kadath.azazel.net>

On 2007-07-31, Azazel <azazel@azazel.net> wrote:
> On 2007-07-31, Thierry <lamthierry@gmail.com> wrote:
>> In other languages, the for loop has a continue statement feature to
>> skip an interation, how do you do it in perl?
>
> "next".  For example:
>
>   for (my $i = 0; $i < 10; ++$i)
>     {
>     if ($i == 7)
>        {
>        next;
>        }
>     else
>       {
>       print $i, "\n";
>       }
>     }

Or rather:

for (my $i = 0; $i < 10; ++$i)
  {
  if ($i == 7)
    {
    next;
    }

  print $i, "\n";
  }


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

Date: Tue, 31 Jul 2007 11:45:47 -0700
From:  Paul Lalli <mritty@gmail.com>
Subject: Re: How do you continue in a for loop?
Message-Id: <1185907547.360879.250390@o61g2000hsh.googlegroups.com>

On Jul 31, 2:30 pm, Thierry <lamthie...@gmail.com> wrote:
> In other languages, the for loop has a continue statement feature to
> skip an interation, how do you do it in perl?
>
> Thierry

C++ 'continue' ==> Perl 'next'
C++ 'break' ==> Perl 'last'
C++ ???? ==> Perl 'redo'  (restarts the current iteration)

Paul Lalli



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

Date: Tue, 31 Jul 2007 15:04:49 -0400
From: Jim James <jim@nnnnnnnnn.com>
Subject: NULL value question
Message-Id: <MPG.211951b1631c501998968c@news.newshosting.com>

I'm coding my first web site using a mysql
database and DBI.

I can fetch records from the database
with no problem, but I'm having trouble
testing NULL values. If I load the value
of a date field into a variable ($dateadded),
how should the IF condition be written?

if ( $dateadded = NULL ) {
   
	print "Date added is NULL";

}

I found some information that talked
about NULLs being undef, but I'm
not sure how to use that information.


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

Date: Tue, 31 Jul 2007 12:15:25 -0700
From:  Paul Lalli <mritty@gmail.com>
Subject: Re: NULL value question
Message-Id: <1185909325.693090.306310@g4g2000hsf.googlegroups.com>

On Jul 31, 3:04 pm, Jim James <j...@nnnnnnnnn.com> wrote:
> I'm coding my first web site using a mysql
> database and DBI.
>
> I can fetch records from the database
> with no problem, but I'm having trouble
> testing NULL values. If I load the value
> of a date field into a variable ($dateadded),
> how should the IF condition be written?

if (!defined $dateadded) {

> I found some information that talked
> about NULLs being undef, but I'm
> not sure how to use that information.

perldoc -f defined
perldoc -f undef

Note if the value in your DB isn't actually NULL, but is instead the
empty string, you'll have to specifically compare to the empty string:
if ($dateadded eq "") {

Paul Lalli



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

Date: 31 Jul 2007 14:18:49 -0500
From: Lawrence Statton <yankeeinexile@gmail.com>
Subject: Re: NULL value question
Message-Id: <873az4xtye.fsf@hummer.cluon.com>

Jim James <jim@nnnnnnnnn.com> writes:

> I'm coding my first web site using a mysql
> database and DBI.
> 
> I can fetch records from the database
> with no problem, but I'm having trouble
> testing NULL values. If I load the value
> of a date field into a variable ($dateadded),
> how should the IF condition be written?
> 
> if ( $dateadded = NULL ) {
>    
> 	print "Date added is NULL";
> 
> }
> 

unless ( defined ($dateadded) ) { 
  print 'Date added may have been NULL';
}

There are some edge cases you need to be wary of -- a DBI call may
return undef to show that the query failed ...

my $sth = $dbh->prepare(q(
  SELECT dateadded, lunar_phase
   FROM lunar_sighting
   WHERE something IS TRUE
));

if (my ($dateadded, $lunar_phase) = $sth->fetchrow_array) {
  if (defined($dateadded)) {
    print "Lunar phase of $lunar_phase was sighted on $dateadded\n";
  } else {
    print "Lunar phase of $lunar_phase was sighted on NULL date\n";
  }
}


-- 
	Lawrence Statton - lawrenabae@abaluon.abaom s/aba/c/g
Computer  software  consists of  only  two  components: ones  and
zeros, in roughly equal proportions.   All that is required is to
place them into the correct order.


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

Date: Tue, 31 Jul 2007 12:23:04 -0700
From:  Klaus <klaus03@gmail.com>
Subject: Re: NULL value question
Message-Id: <1185909784.068446.318990@g4g2000hsf.googlegroups.com>

On Jul 31, 9:04 pm, Jim James <j...@nnnnnnnnn.com> wrote:
> I'm coding my first web site using a mysql
> database and DBI.
>
> I can fetch records from the database
> with no problem, but I'm having trouble
> testing NULL values. If I load the value
> of a date field into a variable ($dateadded),
> how should the IF condition be written?
>
> if ( $dateadded = NULL ) {

The single "=" is the assignment operator which does not test
anything, to test numerical equality use "==", to test stringwise
equality use "eq" (see perldoc perlop, equality operators).

I don't know anything about DBI, but I assume that NULL is a constant
string or number in DBI. Depending on whether it is a number or a
string, use '==' or 'eq'.

On the other hand, I would guess that DBI returns NULL values as
undefined scalars, in this case, neither "==", nor "eq" work as
expected. You should better use the defined function (see perldoc -f
defined)

if ( ! defined($dateadded) ) {

--
Klaus



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

Date: Tue, 31 Jul 2007 18:07:18 +0000 (UTC)
From: Brian Blackmore <blb8@po.cwru.edu>
Subject: Re: Perl with DBI
Message-Id: <f8ntol$7uk$1@gnus01.u.washington.edu>

Peter J. Holzer <hjp-usenet2@hjp.at> wrote:
> On 2007-07-29 22:57, Jason <jwcarlton@gmail.com> wrote:
> > I'm tagging this onto the same thread because it's the same topic, but
> > the issue is a little different.
> >
> > With the ID field, I'm wanting to create a unique ID for each new
> > submission. I was originally using auto_increment, but the problem is
> > that when I remove a row, I do not want the ID to be reused.

> For MySQL, depends on the database engine. For MyISAM tables,
> auto_increment values are not reused, but for InnoDB, they are.
> Also the behavior changed at least once, and may change again in the
> future, so you shouldn't rely on it.

> Oracle has sequences instead of auto_increment columns, which are
> guarantueed to be never reused. You can simulate them in MySQL with a
> table with just one value, which you increment programmatically (but you
> have to lock it to prevent concurrent access).

Most reasonable databases have sequences; it's not an SQL92 requirement,
but if you're really worried about access to typical data types,
security, and data integrity, you probably want either Oracle, as
suggested, or PostgreSQL.  I'd recommend the latter because it will be
similar to the setup you have, its still completely free, hopefully the
transition will be rather seamless, and it has the features you need.
Yes, it has sequences, for example.

-- 
Brian Blackmore
blb8 at po dot cwru dot edu


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

Date: Tue, 31 Jul 2007 17:24:48 +0200
From: Thomas Kratz <ThomasKratz@REMOVEwebCAPS.de>
Subject: Re: threads and logfile rotation
Message-Id: <46af543f$0$2620$bb690d87@news.main-rheiner.de>

zentara wrote:
> On Mon, 30 Jul 2007 18:56:40 +0200, Thomas Kratz
> <ThomasKratz@REMOVEwebCAPS.de> wrote:
> 
>> I am a bit stumped with handling logfile rotation with a threaded app.
>> The below test script dies with "rename failed, Permission denied".
>> I assume this is because of the detached thread still referencing the 
>> filehandle because it got copied at thread creation.
>>
>> Moving the thread creation before creation of the file solves this, but 
>> it is not really what I want. Ideally the thread should be able to log 
>> as well to the copied handle.
>>
>> Is there a way around this?
>>
>> (perl 5.88 under Win23 with threads 1.64)
>>
> 
> I don't know how this will work on win32, but the preffered way
> of having threads share a filehandle, is by passing in the fileno;
> usually through a shared variable, but this passes it in directly.

Yes, that is the easy part :-)
(works under Win32 as well, I am using this for sockets already)

But the problem remains how to get the filehandle closed again to be 
able to rename it.
Signaling all the threads to close the filehandle and waiting for all of 
them to signal back 'done' is more than ugly.

I think I'll have to change the logging mechanism. Perhaps it is better 
to set up a queue for log messages and only the main thread logs them to 
file. That way my existing logfile rotation can be used without changes.
But I'll have to change object initiation for my Win32 service as well 
because the logfile gets created very early in the init stage of the 
base object.....

Back to the drawing board!

Thanks,
Thomas

-- 
$/=$,,$_=<DATA>,s,(.*),$1,see;__END__
s,^(.*\043),,mg,@_=map{[split'']}split;{#>J~.>_an~>>e~......>r~
$_=$_[$%][$"];y,<~>^,-++-,?{$/=--$|?'"':#..u.t.^.o.P.r.>ha~.e..
'%',s,(.),\$$/$1=1,,$;=$_}:/\w/?{y,_, ,,#..>s^~ht<._..._..c....
print}:y,.,,||last,,,,,,$_=$;;eval,redo}#.....>.e.r^.>l^..>k^.-


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

Date: Tue, 31 Jul 2007 18:25:56 +0000 (UTC)
From: Brian Blackmore <blb8@po.cwru.edu>
Subject: Re: Using DBI, better option than importing into @array
Message-Id: <f8nurk$7uk$2@gnus01.u.washington.edu>

Jason <jwcarlton@gmail.com> wrote:

> It's really a simple message board, just with a lot of rows. So the
> subjects table is

> Categories: id - lastmodified - subject
> Actual row: 17090 - 20070730192222 - This is a test

> The posts table would be like:

> Categories: id - subject - postdate - username - email - comment
> Actual row: 17090 - This is a test - 20070730192222 - Jason -
> jwcarlton@gmail.com - This is a test comment.

Where are the messages?

> In retrospect, I can't quite remember why I'm duplicating the
> information into the subjects table; I think it was at the suggestion
> of someone in another NG. I'm sure that the goal was to make the "view
> subjects" section load faster by reading 17,000 rows instead of
> 600,000.

I presume that the goal was to make the subjects load faster by moving
the message _contents_ (i.e., the actual posts) of into their own table.
Anything that you display in the "quick view" should doubtless be
someplace else that allows for faster database access.  Granted, a true
SQL VIEW might be able to handle fast selection on a big mess of a
table, but there's no point in doing that.

You need a posts table that contains the post id and the actual content
of the post (oh, maybe that was "comment"?); you need a summary table
that contains the "quick view" content; indices on the primary keys (of
course), and no doubt and index on postdate.

As suggested elsewhere, use LIMIT.

With such a small number of records, the database latency should be far
less than a second.

Also, I'll repeat one other thing from elsewhere, definitely let the
database do the selection because it knows how to optimize for fastest
query return.  Looping select statements in perl is generally a bad
idea.

-- 
Brian Blackmore
blb8 at po dot cwru dot edu


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

Date: Tue, 31 Jul 2007 18:38:41 -0000
From:  usenet@DavidFilmer.com
Subject: Re: Using DBI, better option than importing into @array
Message-Id: <1185907121.094224.142780@i13g2000prf.googlegroups.com>

On Jul 30, 4:34 pm, Jason <jwcarl...@gmail.com> wrote:

> the subjects table is
>
> Categories: id - lastmodified - subject
> Actual row: 17090 - 20070730192222 - This is a test
>
> The posts table would be like:
>
> Categories: id - subject - postdate - username - email - comment
> Actual row: 17090 - This is a test - 20070730192222 - Jason -
> jwcarl...@gmail.com - This is a test comment.

OK, try something like this (untested - I don't have a sample
database):

my $sth = $dbh->prepare(<<SQL);
   select $forum_posts.id,
          $forum_posts.subject,
          $forum_posts.postdate,
          $forum_posts.username,
          $forum_posts.email,
          $forum_posts.comment
   from $forum_posts
   left join id on ($forum_subjects.id = $forum_posts.id)
   order by $forum_subjects.postdate ASC
   limit 20
SQL

$sth->execute;

while (my $row = $sth->fetchrow_arrayref()) {
   #do stuff
}

> In retrospect, I can't quite remember why I'm duplicating the
> information into the subjects table; I think it was at the suggestion
> of someone in another NG.

The person who made such a suggestion is a complete idiot.

> Would it be better to get rid of the "subjects" table altogether, and
> just create an index with the ID field?

Absolutely.

> counter for a few other things, too, though; in this case, I use it to
> determine the background color of the table row (it alternates based
> on whether $count is divisible by 2).

You don't need a counter to implement a simple boolean toggle;
something like this will do:

   $toggle = ! $toggle;
   my $color = ($toggle) ? $color1 : $color2;

But hopefully you are using a good template module (I prefer
HTML::Template) and CSS to drive your markup.



--
The best way to get a good answer is to ask a good question.
David Filmer (http://DavidFilmer.com)



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

Date: Tue, 31 Jul 2007 10:54:46 -0500
From: "J. Gleixner" <glex_no-spam@qwest-spam-no.invalid>
Subject: Re: Variable declaration - C vs script style
Message-Id: <46af5b46$0$10310$815e3792@news.qwest.net>

markoa wrote:
> Hello,
> 
> I've been wondering whether there are any differences in performance
> when declaring variables within loops

You know that you can test these things yourself, right?

perldoc Benchmark


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

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>


Administrivia:

#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.  

NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice. 

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.

#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 V11 Issue 704
**************************************


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