[29398] in Perl-Users-Digest
Perl-Users Digest, Issue: 642 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Jul 11 00:09:50 2007
Date: Tue, 10 Jul 2007 21:09:06 -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, 10 Jul 2007 Volume: 11 Number: 642
Today's topics:
Re: dollar sign literals <tadmc@seesig.invalid>
Re: Great new developer community concept krakle@visto.com
Hash ref, but what is the key? with Chemistry::File::SD <hpbenton@gmail.com>
Re: Hash ref, but what is the key? with Chemistry::File <mritty@gmail.com>
Re: Hash ref, but what is the key? with Chemistry::File <hpbenton@gmail.com>
Re: Hash ref, but what is the key? with Chemistry::File <hpbenton@gmail.com>
Re: Hash ref, but what is the key? with Chemistry::File <hpbenton@gmail.com>
Re: Hash ref, but what is the key? with Chemistry::File <hpbenton@gmail.com>
Re: Hash ref, but what is the key? with Chemistry::File <uri@stemsystems.com>
Re: Mail-Webmail-Yahoo-0.601 / yahootils.pl does not s <glex_no-spam@qwest-spam-no.invalid>
Perl 5.6 vs 5.8 <sigzero@gmail.com>
Re: Perl 5.6 vs 5.8 <mritty@gmail.com>
Re: Portable general timestamp format, not 2038-limited <martin@see.sig.for.address>
Re: Portable general timestamp format, not 2038-limited <nospam-abuse@ilyaz.org>
Re: Remove a specific element from an Array <stoupa@practisoft.cz>
Re: Remove a specific element from an Array <tadmc@seesig.invalid>
Re: Remove a specific element from an Array <stoupa@practisoft.cz>
Re: Streamlining login to Web site <stoupa@practisoft.cz>
Re: sysread vs read? xhoster@gmail.com
Re: TXL-like capability? <somedeveloper@gmail.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 11 Jul 2007 02:35:23 GMT
From: Tad McClellan <tadmc@seesig.invalid>
Subject: Re: dollar sign literals
Message-Id: <slrnf98eqh.nnt.tadmc@tadmc30.sbcglobal.net>
Jason Williams <Jason.Williams.0617@gmail.com> wrote:
> #!/usr/bin/perl
use strict;
use warnings;
> open(infile, "$ARGV[0]");
You should use UPPER CASE for filehandles.
You should always, yes *always*, check the return value from open.
You should not use useless quotes.
perldoc -q vars
What’s wrong with always quoting "$vars"?
open(INFILE, $ARGV[0]) or die "could not open '$ARGV[0]' $!";
Better yet, you should use the 3-argument form of open:
open(my $infile, '<', $ARGV[0]) or die "could not open '$ARGV[0]' $!";
> while (<infile>) {
while ( <$infile> ) {
--
Tad McClellan
email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"
------------------------------
Date: Tue, 10 Jul 2007 16:42:23 -0700
From: krakle@visto.com
Subject: Re: Great new developer community concept
Message-Id: <1184110943.678603.279540@n60g2000hse.googlegroups.com>
On Jul 9, 8:16 pm, codezill...@gmail.com wrote:
> I found this new site I am excited abouthttp://www.spikesolutions.net.
> The concept, zip up your programming solutions and submit them to this
> site for free. Each time someone downloads your solution you get
> $1.00. The creators of the site are trying to improve the quality and
> availability of "spike solutions" by rewarding developers with cash
> for submitting their solutions. I would like to hear your thoughts.
How can you put a $1 value on code you haven't even seen. Someone
could submit a full blown community script or web based employee
mangement system and it would be given the same value as a poorly
written simple form mail script..... I think a better idea would be to
offer 40-60% of revenue generated from the code.
But you know what... it doesn't matter because your layout looks like
a wiki and behaves odd with the AJAX and looks like you have a total
of 3 products and 0 traffic.
------------------------------
Date: Wed, 11 Jul 2007 01:23:52 -0000
From: pistachio <hpbenton@gmail.com>
Subject: Hash ref, but what is the key? with Chemistry::File::SDF mod
Message-Id: <1184117032.703736.80650@w3g2000hsg.googlegroups.com>
Hello all,
It's a ref question. I'm not getting what I'm doing wrong here. All
the other variables work but the sdf variable. When I try to print
that it just gives me an error. I've used data dumper to see what's
going on and now I'm really confused. Any help would be great.
Cheers,
PB
Abstract code below.
my $sdffile="SDF_database_file.sdf";
my @mols = Chemistry::Mol->read($sdffile);
for loop{
$formula[$i]=$mols[$i]->attr("sdf/data")->{FORMULA};
$mass[$i]=$mols[$i]->attr("sdf/data")->{EXACT_MASS};
my @smile;
$sdf[$i]=$mols[$i]->attr("sdf/data");
#my $temp={$sdf[$i]};
#$sdf[$i]=$mols[$i]->attr("sdf/data")->{SDF} . "\t";
print "$mass[$i] $name[$i] $formula[$i] $owner $date\n";
}
print $sdf[1] ."\n";
print Dumper $sdf[2] . "\n";
This gives:
517.270898 Choloyl-taurine C25H43NO8S dwong 2007-05-16 12:01:59
483.301819 Taurolithocholate C26H45NO5S dwong 2007-05-16 12:01:59
499.296729 Taurodeoxycholate C26H45NO6S dwong 2007-05-16 12:01:59
499.296729 Taurochenodeoxycholate C26H45NO6S dwong 2007-05-16
12:01:59
410.391251 hop-22(29)-ene C30H50 dwong 2007-05-16 12:01:59
HASH(0x84f45c8)
$VAR1 = 'HASH(0x84e6738)
';
Which I have no idea how to get my data from that. :D again thx for
any help.
------------------------------
Date: Tue, 10 Jul 2007 18:58:12 -0700
From: Paul Lalli <mritty@gmail.com>
Subject: Re: Hash ref, but what is the key? with Chemistry::File::SDF mod
Message-Id: <1184119092.781464.251490@n2g2000hse.googlegroups.com>
On Jul 10, 9:23 pm, pistachio <hpben...@gmail.com> wrote:
> It's a ref question. I'm not getting what I'm doing wrong here. All
> the other variables work but the sdf variable. When I try to print
> that it just gives me an error. I've used data dumper to see what's
> going on and now I'm really confused. Any help would be great.
> Abstract code below.
Abstract is massively not good enough. You're doing something wrong in
your real code that you're not doing in this code. Pare your problem
down to the shortest complete script that demonstrates the error.
But before you post again, read:
perldoc -q quoting
Paul Lalli
------------------------------
Date: Wed, 11 Jul 2007 03:47:55 -0000
From: pistachio <hpbenton@gmail.com>
Subject: Re: Hash ref, but what is the key? with Chemistry::File::SDF mod
Message-Id: <1184125675.608279.211940@22g2000hsm.googlegroups.com>
This is the entire code.
Paul THX for the perldoc, will do in future :)
#usr/bin/perl -w
use strict;
use DBI();
use Chemistry::File::SDF;
use Data::Dumper;
#-----Globals-----
my (@sdf);
my $owner="xxxxx";
my $date= "2007-05-16 12:01:59";
#-----Reading Data file-----
my $sdffile="LMSDFDownload_cp.sdf";
my @mols = Chemistry::Mol->read($sdffile);
my (@sdf, @mass, @name, @formula, @keggID, @note, @ID, @mol,
@other)=0;
for (my $i=0; $i < @mols; $i++){
#print $i;
$ID[$i]= $mols[$i]->attr("sdf/data")->{LM_ID};
$name[$i]=$mols[$i]->attr("sdf/data")->{COMMON_NAME};
$formula[$i]=$mols[$i]->attr("sdf/data")->{FORMULA};
$mass[$i]=$mols[$i]->attr("sdf/data")->{EXACT_MASS};
my @smile;
$sdf[$i]=$mols[$i]->attr("sdf/data");
#my $temp={$sdf[$i]};
#$sdf[$i]=$mols[$i]->attr("sdf/data")->{SDF} . "\t";
#print ".";
print $mass[$i] . $name[$i] . $formula[$i] . $date . $ID[$i]. "\n";
}
print $sdf[1] ."\n";
print Dumper $sdf[2] . "\n";
------------------------------
Date: Wed, 11 Jul 2007 03:48:04 -0000
From: pistachio <hpbenton@gmail.com>
Subject: Re: Hash ref, but what is the key? with Chemistry::File::SDF mod
Message-Id: <1184125684.702766.301080@p39g2000hse.googlegroups.com>
This is the entire code.
Paul THX for the perldoc, will do in future :)
#usr/bin/perl -w
use strict;
use DBI();
use Chemistry::File::SDF;
use Data::Dumper;
#-----Globals-----
my (@sdf);
my $owner="xxxxx";
my $date= "2007-05-16 12:01:59";
#-----Reading Data file-----
my $sdffile="LMSDFDownload_cp.sdf";
my @mols = Chemistry::Mol->read($sdffile);
my (@sdf, @mass, @name, @formula, @keggID, @note, @ID, @mol,
@other)=0;
for (my $i=0; $i < @mols; $i++){
#print $i;
$ID[$i]= $mols[$i]->attr("sdf/data")->{LM_ID};
$name[$i]=$mols[$i]->attr("sdf/data")->{COMMON_NAME};
$formula[$i]=$mols[$i]->attr("sdf/data")->{FORMULA};
$mass[$i]=$mols[$i]->attr("sdf/data")->{EXACT_MASS};
my @smile;
$sdf[$i]=$mols[$i]->attr("sdf/data");
#my $temp={$sdf[$i]};
#$sdf[$i]=$mols[$i]->attr("sdf/data")->{SDF} . "\t";
#print ".";
print $mass[$i] . $name[$i] . $formula[$i] . $date . $ID[$i]. "\n";
}
print $sdf[1] ."\n";
print Dumper $sdf[2] . "\n";
------------------------------
Date: Wed, 11 Jul 2007 03:48:34 -0000
From: pistachio <hpbenton@gmail.com>
Subject: Re: Hash ref, but what is the key? with Chemistry::File::SDF mod
Message-Id: <1184125714.104203.145320@o61g2000hsh.googlegroups.com>
This is the entire code.
Paul THX for the perldoc, will do in future :)
#usr/bin/perl -w
use strict;
use DBI();
use Chemistry::File::SDF;
use Data::Dumper;
#-----Globals-----
my (@sdf);
my $owner="xxxxx";
my $date= "2007-05-16 12:01:59";
#-----Reading Data file-----
my $sdffile="LMSDFDownload_cp.sdf";
my @mols = Chemistry::Mol->read($sdffile);
my (@sdf, @mass, @name, @formula, @keggID, @note, @ID, @mol,
@other)=0;
for (my $i=0; $i < @mols; $i++){
#print $i;
$ID[$i]= $mols[$i]->attr("sdf/data")->{LM_ID};
$name[$i]=$mols[$i]->attr("sdf/data")->{COMMON_NAME};
$formula[$i]=$mols[$i]->attr("sdf/data")->{FORMULA};
$mass[$i]=$mols[$i]->attr("sdf/data")->{EXACT_MASS};
my @smile;
$sdf[$i]=$mols[$i]->attr("sdf/data");
#my $temp={$sdf[$i]};
#$sdf[$i]=$mols[$i]->attr("sdf/data")->{SDF} . "\t";
#print ".";
print $mass[$i] . $name[$i] . $formula[$i] . $date . $ID[$i]. "\n";
}
print $sdf[1] ."\n";
print Dumper $sdf[2] . "\n";
------------------------------
Date: Wed, 11 Jul 2007 03:48:51 -0000
From: pistachio <hpbenton@gmail.com>
Subject: Re: Hash ref, but what is the key? with Chemistry::File::SDF mod
Message-Id: <1184125731.429526.117520@r34g2000hsd.googlegroups.com>
This is the entire code.
Paul THX for the perldoc, will do in future :)
#usr/bin/perl -w
use strict;
use DBI();
use Chemistry::File::SDF;
use Data::Dumper;
#-----Globals-----
my (@sdf);
my $owner="xxxxx";
my $date= "2007-05-16 12:01:59";
#-----Reading Data file-----
my $sdffile="LMSDFDownload_cp.sdf";
my @mols = Chemistry::Mol->read($sdffile);
my (@sdf, @mass, @name, @formula, @keggID, @note, @ID, @mol,
@other)=0;
for (my $i=0; $i < @mols; $i++){
#print $i;
$ID[$i]= $mols[$i]->attr("sdf/data")->{LM_ID};
$name[$i]=$mols[$i]->attr("sdf/data")->{COMMON_NAME};
$formula[$i]=$mols[$i]->attr("sdf/data")->{FORMULA};
$mass[$i]=$mols[$i]->attr("sdf/data")->{EXACT_MASS};
my @smile;
$sdf[$i]=$mols[$i]->attr("sdf/data");
#my $temp={$sdf[$i]};
#$sdf[$i]=$mols[$i]->attr("sdf/data")->{SDF} . "\t";
#print ".";
print $mass[$i] . $name[$i] . $formula[$i] . $date . $ID[$i]. "\n";
}
print $sdf[1] ."\n";
print Dumper $sdf[2] . "\n";
------------------------------
Date: Wed, 11 Jul 2007 04:05:15 GMT
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: Hash ref, but what is the key? with Chemistry::File::SDF mod
Message-Id: <x7y7hnbn60.fsf@mail.sysarch.com>
>>>>> "p" == pistachio <hpbenton@gmail.com> writes:
p> #-----Globals-----
those are not globals but file lexicals. they don't exist in the symbol table
p> my (@sdf);
why the parens?
p> my (@sdf, @mass, @name, @formula, @keggID, @note, @ID, @mol,
p> @other)=0;
that doesn't do what you think it does. first off you redeclared
@sdf. then @sdf will get assigned a 0 as its first element. the rest of
the arrays will be empty.
p> for (my $i=0; $i < @mols; $i++){
no need for that as you can loop over @mols directly and use a hash for
the other parts. this also means you can drop all of those arrays. you
have a parallel set of arrays which means you should be using an array
of hashes instead.
foreach my $mol ( @mols ) {
my %stuff ;
p> $ID[$i]= $mols[$i]->attr("sdf/data")->{LM_ID};
$stuff{id} = $mol->attr("sdf/data")->{LM_ID};
isn't that much easier to read? none of those ugly [$i] in the way.
p> $name[$i]=$mols[$i]->attr("sdf/data")->{COMMON_NAME};
p> $formula[$i]=$mols[$i]->attr("sdf/data")->{FORMULA};
p> $mass[$i]=$mols[$i]->attr("sdf/data")->{EXACT_MASS};
do the same for those
p> my @smile;
you don't use that array
p> $sdf[$i]=$mols[$i]->attr("sdf/data");
p> #my $temp={$sdf[$i]};
p> #$sdf[$i]=$mols[$i]->attr("sdf/data")->{SDF} . "\t";
p> #print ".";
p> print $mass[$i] . $name[$i] . $formula[$i] . $date . $ID[$i]. "\n";
print join( '', @stuff{ qw( mass name formula date id ) } ), "\n" ;
uri
--
Uri Guttman ------ uri@stemsystems.com -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs ---------------------------- http://jobs.perl.org
------------------------------
Date: Tue, 10 Jul 2007 17:14:02 -0500
From: "J. Gleixner" <glex_no-spam@qwest-spam-no.invalid>
Subject: Re: Mail-Webmail-Yahoo-0.601 / yahootils.pl does not seem to work ?
Message-Id: <469404aa$0$504$815e3792@news.qwest.net>
coder_expert@yahoo.com wrote:
>
> Any idea why its not working... valid username and passwd are
> supplied...
> Any hints how to proceed ?
>
>
> C:\Perl\site\lib\Mail\Webmail>c:\Perl\bin\perl.exe yahootils.pl --user
> some_user -pass changed_password --trace 4
[...]
> Use of uninitialized value in string eq at c:/Perl/site/lib/Mail/
> Webmail/Yahoo.p
> m line 269.
> Use of uninitialized value in string eq at c:/Perl/site/lib/Mail/
> Webmail/Yahoo.p
> m line 269.
> Use of uninitialized value in string eq at c:/Perl/site/lib/Mail/
> Webmail/Yahoo.p
> m line 269.
Ahhh.. line 269 of that module might be a start.
> %253d0%2526c%3D&login=chakhaaa&passwd=XXXXXXXXX&.save=Sign%20In' via GET.
Time to change your password!
> Mail::Webmail::Yahoo: Unable to log in (welcome page did not contain
> welcome tex
> t).
> get_mail_messages: Unable to log in (welcome page did not contain
> welcome text).
Looks like it didn't find qr{<a\s+href="/ym/ShowFolder?[^>]*>Check
Mail</a>} in the page.
What was the content of the page? Find out for yourself by uncommenting
the line:
# $self->debug($welcome_page) if $self->trace > 9;
and set trace to 10, or change it to be '> 0'.
I don't use it, but that's how I'd suggest you start to debug it.
------------------------------
Date: Tue, 10 Jul 2007 17:48:49 -0700
From: Robert Hicks <sigzero@gmail.com>
Subject: Perl 5.6 vs 5.8
Message-Id: <1184114929.175250.103930@o61g2000hsh.googlegroups.com>
We are migrating from a 5.6 PA-RISC setup to a 5.8 Itanium setup. It
is "mostly" working except it is dropping messages that weren't
before. I am looking more at did something change with how Perl
handles hashes and arrays between the two versions.
Any help or suggestions would be appreciated.
Robert
------------------------------
Date: Tue, 10 Jul 2007 18:22:46 -0700
From: Paul Lalli <mritty@gmail.com>
Subject: Re: Perl 5.6 vs 5.8
Message-Id: <1184116966.800664.245830@57g2000hsv.googlegroups.com>
On Jul 10, 8:48 pm, Robert Hicks <sigz...@gmail.com> wrote:
> We are migrating from a 5.6 PA-RISC setup to a 5.8 Itanium setup. It
> is "mostly" working except it is dropping messages that weren't
> before. I am looking more at did something change with how Perl
> handles hashes and arrays between the two versions.
>
> Any help or suggestions would be appreciated.
Please post a short-but-complete script that demonstrates the problems
you're seeing. What "messages" are being dropped? In what
circumstances?
In lieu of any actual information, I point you to the delta file that
describes changes from 5.6 to 5.8: http://perldoc.perl.org/perl58delta.html
Paul Lalli
------------------------------
Date: Tue, 10 Jul 2007 23:49:59 +0100
From: Martin Gregorie <martin@see.sig.for.address>
Subject: Re: Portable general timestamp format, not 2038-limited
Message-Id: <u1fdm4-32o.ln1@zoogz.gregorie.org>
Ilya Zakharevich wrote:
> [A complimentary Cc of this posting was sent to
> greg
> <greg@cosc.canterbury.ac.nz>], who wrote in article <5fh0imF3cjte7U1@mid.individual.net>:
>> Ilya Zakharevich wrote:
>>> In pedantic mode: negative timestamps make sense with Big Bang as the
>>> epoch as well. (AFAIU, the current way of thinking is that it was
>>> "just too hot" before the big bang, it is not that "there was
>>> nothing".)
>> If Stephen Hawking is right, the shape of the universe
>> is such that there isn't any time "before" the big bang
>> at all. It's like asking what's north of the North Pole.
>
> I do not remember any statement like this - even from 70s... Could
> you provide a reference? There were conjectures about "initial
> singularity", but I do not recollect them related to SH.
>
Its in "A Short History of Time". Sorry I can't quote chapter or page,
but a friend borrowed my copy and lent me Dawkins "Climbing Mount
Improbable" before vanishing, never to be seen since. Not an equal
exchange: I preferred ASHOT to CMI.
--
martin@ | Martin Gregorie
gregorie. | Essex, UK
org |
------------------------------
Date: Wed, 11 Jul 2007 01:58:57 +0000 (UTC)
From: Ilya Zakharevich <nospam-abuse@ilyaz.org>
Subject: Re: Portable general timestamp format, not 2038-limited
Message-Id: <f71dh1$u2$1@agate.berkeley.edu>
[A complimentary Cc of this posting was sent to
Martin Gregorie
<martin@see.sig.for.address>], who wrote in article <u1fdm4-32o.ln1@zoogz.gregorie.org>:
> >> If Stephen Hawking is right, the shape of the universe
> >> is such that there isn't any time "before" the big bang
> >> at all. It's like asking what's north of the North Pole.
> > I do not remember any statement like this - even from 70s... Could
> > you provide a reference? There were conjectures about "initial
> > singularity", but I do not recollect them related to SH.
> Its in "A Short History of Time". Sorry I can't quote chapter or page,
> but a friend borrowed my copy and lent me Dawkins "Climbing Mount
> Improbable" before vanishing, never to be seen since. Not an equal
> exchange: I preferred ASHOT to CMI.
I would prefer a reference to a peer-reviewed paper. ;-)
Thanks,
Ilya
------------------------------
Date: Wed, 11 Jul 2007 02:03:10 +0200
From: "Petr Vileta" <stoupa@practisoft.cz>
Subject: Re: Remove a specific element from an Array
Message-Id: <f716t6$1voe$4@ns.felk.cvut.cz>
Sumit wrote:
> Hey Guys,
>
> I am a new bie to this Group.
> I have a Problem.
> I want to remove an element from an array whose index i dont know.
> --------------------------------------------------------------------------------------------------
>
> #!/usr/bin/perl -w
> use strict;
>
> my @updateNames = ();
> my @tempArr = ();
> my $item = "";
> my $item2 = "";
>
> push @updateNames,"I_love_you";
> push @updateNames,"I_love_you_too";
> push @updateNames,"I_hate_you";
>
> push @tempArr,"I_love_you";
> push @tempArr,"I_love_Him";
> push @tempArr,"I_hate_you";
>
I rewrote next part of your script
foreach $item (0..$#updateNames)
{
foreach $item2 (@tempArr)
{
if (@updateNames[$item] eq $item2)
{
splice @updateNames, $item, 1;
}
}
}
Maybe this help you ;-)
--
Petr Vileta, Czech republic
(My server rejects all messages from Yahoo and Hotmail. Send me your mail
from another non-spammer site please.)
------------------------------
Date: Wed, 11 Jul 2007 02:35:24 GMT
From: Tad McClellan <tadmc@seesig.invalid>
Subject: Re: Remove a specific element from an Array
Message-Id: <slrnf98fal.nnt.tadmc@tadmc30.sbcglobal.net>
Petr Vileta <stoupa@practisoft.cz> wrote:
> Sumit wrote:
>> #!/usr/bin/perl -w
> if (@updateNames[$item] eq $item2)
You should not ignore the warnings that perl issues.
They often point out a bug in your code...
--
Tad McClellan
email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"
------------------------------
Date: Wed, 11 Jul 2007 04:58:33 +0200
From: "Petr Vileta" <stoupa@practisoft.cz>
Subject: Re: Remove a specific element from an Array
Message-Id: <f71h32$25bq$2@ns.felk.cvut.cz>
Tad McClellan wrote:
> Petr Vileta <stoupa@practisoft.cz> wrote:
>> Sumit wrote:
>
>>> #!/usr/bin/perl -w
>
>> if (@updateNames[$item] eq $item2)
>
>
> You should not ignore the warnings that perl issues.
>
Well, sorry ;-) Should be
if ($updateNames[$item] eq $item2)
but on my Perl 5.6.1 work well both forms ;-)
--
Petr Vileta, Czech republic
(My server rejects all messages from Yahoo and Hotmail. Send me your mail
from another non-spammer site please.)
------------------------------
Date: Wed, 11 Jul 2007 01:54:55 +0200
From: "Petr Vileta" <stoupa@practisoft.cz>
Subject: Re: Streamlining login to Web site
Message-Id: <f716t5$1voe$3@ns.felk.cvut.cz>
mailbox@cpacker.org wrote:
> For an existing suite of CGI scripts, I have
> a task to improve the site's login access,
> and I would like to know if CGI::Auth is
> what I need.
>
> Right now, the user must log in to gain
> access to the main menu page, which is a
> static HTML page. If he then clicks on
> certain menu items that require
> more privileged access, he will be
> presented with the login dialogue again.
> I understand how this has been set up by
> configuring httpd.conf.
>
If you are running Linux server and Apache then you can use ".htaccess"
files for authentication users. This is very simple and relative very
secure. All you must to do is configure Apache for this (in httpd.conf) and
create .htaccess and .htpassword files in directories you want to be
authenticated. All other work made Apache for you.
--
Petr Vileta, Czech republic
(My server rejects all messages from Yahoo and Hotmail. Send me your mail
from another non-spammer site please.)
------------------------------
Date: 10 Jul 2007 23:21:11 GMT
From: xhoster@gmail.com
Subject: Re: sysread vs read?
Message-Id: <20070710192114.167$oU@newsreader.com>
kj <socyl@987jk.com.invalid> wrote:
> I've rtfm'd this question but I still can't figure out why one
> would prefer Perl's read over Perl's sysread, or viceversa.
"read" can be used with readline (aka "<$fh>") , while sysread generally
can't be, at least not without introducing strange behavior.
sysread can be used with select (or IO::Select), while "read" generally
(or at least often) can't be.
> Is
> one significantly faster than the other?
If you use very small read sizes, then read will be much faster than
sysread. If you don't use small read sizes, then the main difference is in
what other functions/operations they are compatible with.
> (And why would Perl provide two different functions that, aside
> from possible differences in performance, seem to both do pretty
> much the same thing?)
It would have been very hard to make readline compatible with sysread
(and select) without making readline very slow. So we have two
incompatible sets of features. "read" and "sysread" or analogous to each
other, but one in the buffered camp and one in the unbuffered camp.
Xho
--
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service $9.95/Month 30GB
------------------------------
Date: Wed, 11 Jul 2007 02:57:57 -0000
From: SomeDeveloper <somedeveloper@gmail.com>
Subject: Re: TXL-like capability?
Message-Id: <1184122677.842954.93580@22g2000hsm.googlegroups.com>
On Jul 10, 11:33 pm, Sherm Pendley <spamt...@dot-app.org> wrote:
> SomeDeveloper <somedevelo...@gmail.com> writes:
> > Can I do source to source transformations elegantly in Perl?
>
> Check out the Filter module on CPAN:
>
> <http://search.cpan.org/~pmqs/Filter-1.34/perlfilter.pod>
>
> sherm--
>
> --
> Web Hosting by West Virginians, for West Virginians:http://wv-www.net
> Cocoa programming in Perl:http://camelbones.sourceforge.net
Thanks, but this is not what I'm looking for. Among other things TXL
lets you, e.g., transform a simple Pascal program into an equivalent C/
C++ program, identify certain language constructs via its grammar and
re-write their better or different versions, etc.
Only because its modus operandi is via regex patterns and their
replacements, is why I asked whether or not the same thing could be
done in Perl.
My question is still open.
------------------------------
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 642
**************************************