[25394] in Perl-Users-Digest
Perl-Users Digest, Issue: 7639 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Jan 13 00:05:37 2005
Date: Wed, 12 Jan 2005 21:05:12 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Wed, 12 Jan 2005 Volume: 10 Number: 7639
Today's topics:
Re: $! is set to "Inappropriate ioctl..." on Linux <abigail@abigail.nl>
Re: Adding a delimiter inbetween number characters and <tadmc@augustmail.com>
Re: Adding a delimiter inbetween number characters and <tadmc@augustmail.com>
Re: Adding a delimiter inbetween number characters and <tadmc@augustmail.com>
Re: Adding a delimiter inbetween number characters and <tadmc@augustmail.com>
Re: Adding a delimiter inbetween number characters and <lv@aol.com>
Re: Adding a delimiter inbetween number characters and <1usa@llenroc.ude.invalid>
Re: angle operator, backticks, and redirection <whitey@newmail.net>
Re: angle operator, backticks, and redirection <tadmc@augustmail.com>
Re: CGI: Execute a perl script inside another perl scri <jurgenex@hotmail.com>
Determining which module exported a specific function. <kalinaubears@iinet.net.au>
Re: differences <tadmc@augustmail.com>
Re: disk space script <lv@aol.com>
Re: disk space script <blackforest2000@hotmail.com>
Re: FAQ 4.30: How do I capitalize all the words on one <lv@aol.com>
Re: Looking for strategies for performance improvements <abigail@abigail.nl>
Re: Looking for strategies for performance improvements <lv@aol.com>
Loop through a text file line by line toomanyjoes@mail.utexas.edu
Re: Loop through a text file line by line <matthew.garrish@sympatico.ca>
Re: Loop through a text file line by line <tadmc@augustmail.com>
Re: Loop through a text file line by line <1usa@llenroc.ude.invalid>
Re: Print question <jl_post@hotmail.com>
Re: Print question <edgrsprj@ix.netcom.com>
Re: Print question <edgrsprj@ix.netcom.com>
Re: Print question <spamtrap@dot-app.org>
Re: Print question <spamtrap@dot-app.org>
Session ID / login security script <bGhassemlou@GoMonitor.com>
Re: Session ID / login security script <matthew.garrish@sympatico.ca>
Works great! <edgrsprj@ix.netcom.com>
Works great! <edgrsprj@ix.netcom.com>
Re: Works great! <edgrsprj@ix.netcom.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 12 Jan 2005 23:10:06 GMT
From: Abigail <abigail@abigail.nl>
Subject: Re: $! is set to "Inappropriate ioctl..." on Linux
Message-Id: <slrncubbie.ucb.abigail@alexandra.abigail.nl>
amirkargerweb@yahoo.com (amirkargerweb@yahoo.com) wrote on MMMMCLII
September MCMXCIII in <URL:news:1105567257.387610.45040@z14g2000cwz.googlegroups.com>:
?? Hi.
??
?? Running perl5.8.* on Linux (more details later), I get:
??
?? ==============
?? >echo 'hi' > zzz
?? >echo 'bye' >> zzz
?? >perl -we 'print ".$\!.\n";open FOO, "<zzz" or die "foo\n";print
?? ".$\!.\n"; print <FOO>'
?? ..
?? .Inappropriate ioctl for device.
?? hi
?? bye
?? ==============
??
?? - Why is $! getting set if the open was successful?
Who says it is? But if it is, who cares?
The appropriate question is: why are you checking $! after a successful
call to open?
?? - My open command seems pretty darn simple. Am I doing something wrong?
With the open? No.
?? - Is this a known issue?
Yes. From perlvar:
$! If used numerically, yields the current value of
the C "errno" variable, or in other words, if a
system or library call fails, it sets this vari
able. This means that the value of $! is meaning
ful only _immediately_ after a *failure*:
if (open(FH, $filename)) {
# Here $! is meaningless.
...
} else {
# ONLY here is $! meaningful.
...
# Already here $! might be meaningless.
}
# Since here we might have either success or failure,
# here $! is meaningless.
In the above _meaningless_ stands for anything:
zero, non-zero, "undef". A successful system or
library call does *not* set the variable to zero.
Abigail
--
perl -Mstrict -we '$_ = "goto _.print chop;\n=rekcaH lreP rehtona tsuJ";_1:eval'
------------------------------
Date: Wed, 12 Jan 2005 16:43:00 -0600
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: Adding a delimiter inbetween number characters and letter characters
Message-Id: <slrncub9vk.ee9.tadmc@magna.augustmail.com>
toomanyjoes@mail.utexas.edu <toomanyjoes@mail.utexas.edu> wrote:
> I suggest you read up on
> newsgroup etiquette.
It is better to remain silent and be thought a fool than to
open your mouth and remove all doubt.
*plonk*
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Wed, 12 Jan 2005 16:45:33 -0600
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: Adding a delimiter inbetween number characters and letter characters
Message-Id: <slrncuba4d.ee9.tadmc@magna.augustmail.com>
toomanyjoes@mail.utexas.edu <toomanyjoes@mail.utexas.edu> wrote:
> I would be much oblidged to anyone who can
> post a little snippet of code for me.
We help those who help themselves.
*You* post a little snippet of code for us, and we will [1]
help you fix it.
This is not a "write my program for me" service.
[1] Except that you are now likely to be widely killfiled...
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Wed, 12 Jan 2005 16:48:28 -0600
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: Adding a delimiter inbetween number characters and letter characters
Message-Id: <slrncuba9s.ee9.tadmc@magna.augustmail.com>
toomanyjoes@mail.utexas.edu <toomanyjoes@mail.utexas.edu> wrote:
> One last post Sherm, then I'm done. No matter what obscenities you
> respond with,
Please show us exactly what obscenities Sherm posted that
you are referring to.
(it is customary to quote some context when composing a followup.)
I for one, think you are making stuff up to support your
untenable position.
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Wed, 12 Jan 2005 16:52:01 -0600
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: Adding a delimiter inbetween number characters and letter characters
Message-Id: <slrncubagh.ee9.tadmc@magna.augustmail.com>
toomanyjoes@mail.utexas.edu <toomanyjoes@mail.utexas.edu> wrote:
> I've been posting on these groups for over
> 10 years back when it was DejaNews
Usenet was *never* DejaNews.
Usenet has been chugging along since 1979, long before Deja's existence.
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Wed, 12 Jan 2005 22:29:01 -0600
From: l v <lv@aol.com>
Subject: Re: Adding a delimiter inbetween number characters and letter characters
Message-Id: <41e5f984$1_2@127.0.0.1>
toomanyjoes@mail.utexas.edu wrote:
> I've been posting on these groups for over
> 10 years back when it was DejaNews
I sat next to Al Gore and watched him create the Internet.
------------------------------
Date: 13 Jan 2005 05:02:01 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: Adding a delimiter inbetween number characters and letter characters
Message-Id: <Xns95DD57B552asu1cornelledu@132.236.56.8>
toomanyjoes@mail.utexas.edu wrote in news:1105553915.762548.182620
@c13g2000cwb.googlegroups.com:
> Showing the passion of your emotions is very unattractive
Lucky for us, this is not Fifth Wheel, we don't care about what you find
attractive.
Sinan.
--
A. Sinan Unur
1usa@llenroc.ude.invalid
(remove '.invalid' and reverse each component for email address)
------------------------------
Date: Wed, 12 Jan 2005 17:19:11 -0600
From: Whitey Johnson <whitey@newmail.net>
Subject: Re: angle operator, backticks, and redirection
Message-Id: <pan.2005.01.12.23.19.11.58811@newmail.net>
On Wed, 12 Jan 2005 13:50:16 -0500, Sherm Pendley wrote:
<snip>
>
> Your code is correct - but your explanation is not. It's the chomp() in your
> version that's making the difference, not your use of system() instead of
> backticks.
>
> sherm--
My bad. I saw that explained in the other email and didn't think it needed
rementioning. Now looking back at my email it does look like I am trying
to say that the system command is what would fix the OP's problem. Thanks.
------------------------------
Date: Wed, 12 Jan 2005 21:18:21 -0600
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: angle operator, backticks, and redirection
Message-Id: <slrncubq3t.evn.tadmc@magna.augustmail.com>
Whitey Johnson <whitey@newmail.net> wrote:
> in the other email
> looking back at my email
This is NOT email.
This is Usenet.
They are not the same, and the difference makes a difference!
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Thu, 13 Jan 2005 01:34:00 GMT
From: "Jürgen Exner" <jurgenex@hotmail.com>
Subject: Re: CGI: Execute a perl script inside another perl script
Message-Id: <cekFd.19535$lG.18231@trnddc03>
xdarcos@hotmail.com wrote:
> Regarding "perldoc -q environment" Jürgen, this is dedicated to Unix
> and I am using Windows
Actually, this particular behaviour (modifications of the environment of a
child process will never be back-propped to the parent process) applies to
Windows, too.
jue
------------------------------
Date: Thu, 13 Jan 2005 03:43:51 +0000
From: Sisyphus <kalinaubears@iinet.net.au>
Subject: Determining which module exported a specific function.
Message-Id: <41e5fdf7$0$19452$5a62ac22@per-qv1-newsreader-01.iinet.net.au>
Hi,
Let's say I'm working through a script, trying to diagnose a problem,
and there's a function foo() that I don't know much about. I wish to
consult the documentation on foo(), but I don't know which of the 20
loaded modules exported it. I know 'foo' is in @EXPORT_OK of one of
those 20 modules - but I don't know *which* module.
How can I determine quickly and easily which module's documentation I
need to consult ?
Or, to rephrase, how can I quickly determine an imported function's
fully qualified package name.
Cheers,
Rob
--
To reply by email u have to take out the u in kalinaubears.
------------------------------
Date: Wed, 12 Jan 2005 17:04:51 -0600
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: differences
Message-Id: <slrncubb8j.ee9.tadmc@magna.augustmail.com>
Robin <webmaster@infusedlight.net> wrote:
> What are respectively the difference with linux and windows installed on
> different partitions and windows by itself perl on both machines has
> reletively the same run time, but that is just a guess.
Huh?
Was that meant to be a sentence in the English language?
> am wondering how to get a hold of perl
> modules and then install them.
The way the Perl FAQ says to:
perldoc -q module
What modules and extensions are available for Perl? What is CPAN?
What does CPAN/src/... mean?
How do I install a module from CPAN?
How do I keep my own module/library directory?
How do I add the directory my program lives in to the mod-
ule/library search path?
> Let me know if this will be a problem for
> some of you to answer or not.
Re-answering a Question that is Asked Frequently is always a problem,
which is why FAQ lists were developed in the first place.
They don't work if people won't look in them though.
> please be kind.
Please be respectful of other's time.
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Wed, 12 Jan 2005 22:00:00 -0600
From: l v <lv@aol.com>
Subject: Re: disk space script
Message-Id: <41e5f2b6$1_1@127.0.0.1>
Bernd wrote:
> Hello Newsgroup,
>
> Anyone has a little Perlscript which could
> give me the disk space left on all disks on a windows
> system (nt, w2k, w3k servers?)?
> And best of, the Disk space all in all? on each Disk?
> Google did not help that much in this case.
>
> Bernd
>
>
How about Win32::DriveInfo or Win32::DirSize from CPAN
Len
------------------------------
Date: Thu, 13 Jan 2005 06:05:11 +0100
From: "Bernd" <blackforest2000@hotmail.com>
Subject: Re: disk space script
Message-Id: <cs4ung$8qc$04$1@news.t-online.com>
THX!
i will check out the Tips...
Bernd
------------------------------
Date: Wed, 12 Jan 2005 22:53:12 -0600
From: l v <lv@aol.com>
Subject: Re: FAQ 4.30: How do I capitalize all the words on one line?
Message-Id: <41e5ff2e$1_2@127.0.0.1>
Matt Garrish wrote:
> "Martin Kissner" <news@chaos-net.de> wrote in message
> news:slrncu27vh.2hj.news@maki.homeunix.net...
>
>>Jürgen Exner wrote :
>>
>>>kerb@kerb.eu.org wrote:
>>>
>>>>$text =~ tr/a-a/A-Z/;
>>>
>>> $text =~ tr/a-z/A-Z/;
>>>
>>>This prints
>>> JüRGEN
>>>while the correctly uppercased text would have been
>>> JÜRGEN
>>
>>How about:
>>$text =~ tr/a-zäöü/A-ZÄÖÜ/;
>>This does the Job.
>>
>
>
> But what about àáâãçèé, etc.?
>
> That's why the solution posted is so very, very wrong. Please read the faq.
>
> Matt
>
>
Does ucfirst() not work for àáâãçèé? I currently do not have access to
a box with multiple languages installed to test myself or I would.
$t = 'this sentence looks like this when capitalized';
print "$t\n";
print map { ucfirst "$_ " } split /\s/, $t;
__OUTPUT__
this sentence looks like this when capitalized
This Sentence Looks Like This When Capitalized
Len
------------------------------
Date: 12 Jan 2005 23:13:03 GMT
From: Abigail <abigail@abigail.nl>
Subject: Re: Looking for strategies for performance improvements
Message-Id: <slrncubbnv.ucb.abigail@alexandra.abigail.nl>
lvirden@gmail.com (lvirden@gmail.com) wrote on MMMMCLII September
MCMXCIII in <URL:news:cs3dmn$ikp$1@srv38.cas.org>:
`'
`'
`' A perl developer stopped by this morning with this question.
`' He has a new trainee that is learning Perl. One of the early tasks
`' he has a need to complete is this.
`'
`' He has an application that reads through terabytes of information,
`' searching for particular patterns and combinations. The program
`' runs for days. However, as the time that the program runs progresses,
`' it appears to produce results less frequently than expected.
`'
`' When he notices this, he stops the application, starts it back up where
`' things left off, and the application returns to producing results at
`' the frequency expected - until, of course, the next time 8 or 10 or whatever
`' hours have gone by...
`'
`' What tools might be available to a newbie perl developer that would assist
`' in analysing and improving an application exhibiting this sort of
`' behavior?
Lunch break?
Abigail
--
@;=split//=>"Joel, Preach sartre knuth\n";$;=chr 65;%;=map{$;++=>$_}
0,22,13,16,5,14,21,1,23,11,2,7,12,6,8,15,3,19,24,14,10,20,18,17,4,25
;print@;[@;{A..Z}];
------------------------------
Date: Wed, 12 Jan 2005 22:19:57 -0600
From: l v <lv@aol.com>
Subject: Re: Looking for strategies for performance improvements
Message-Id: <41e5f763$1_1@127.0.0.1>
lvirden@gmail.com wrote:
>
> A perl developer stopped by this morning with this question.
> He has a new trainee that is learning Perl. One of the early tasks
> he has a need to complete is this.
>
> He has an application that reads through terabytes of information,
> searching for particular patterns and combinations. The program
> runs for days. However, as the time that the program runs progresses,
> it appears to produce results less frequently than expected.
>
> When he notices this, he stops the application, starts it back up where
> things left off, and the application returns to producing results at
> the frequency expected - until, of course, the next time 8 or 10 or whatever
> hours have gone by...
>
> What tools might be available to a newbie perl developer that would assist
> in analysing and improving an application exhibiting this sort of
> behavior?
Watch the memory used by this program. If it grows steadily it could
get too large and would swap memory to disk slowing the program. If
this is the case, look for areas of improperly scoped variables. Pass
large arrays and hashes by reference vs copy. At key locations in the
program print to a log file noting where it is at and the date/time,
then watch the file via tail or analyze it after you kill the process.
Just a thought -- long running process on unix have their priority
lowered, maybe you are not get enough cpu??
Good luck with the hunt!
Len
------------------------------
Date: 12 Jan 2005 18:32:13 -0800
From: toomanyjoes@mail.utexas.edu
Subject: Loop through a text file line by line
Message-Id: <1105583533.605587.261600@z14g2000cwz.googlegroups.com>
Hi,
I'm trying to loop through a .txt file and grab a number at the
beginning of the line. I want to save this number in a variable and
then compare it with the number at the beginning of the next line. For
instance my text would look like this:
1sampletextsampletextsamplet22tsampletextsampletextsampletext
2sampletextsampletextsamplet22tsampletextsampletextsampletext
3sampletextsampletextsamplet22tsampletextsampletextsampletext
The lines are distinct from one other, each one ends with a newline
character. How do I loop through a text file line by line?
#Heres my code so far
$myvar = "1sampletextsampletextsamplet22tsampletext"; #easy way out of
opening the text file (I'm not sure how)
if ($myvar =~ /^(\d+)/){
$curNum = "$1"; #curNum should equal 1
}
print "$curNum";
This only works for an individual line. I need to move to the next line
and do the same thing, then compare $curNum with $newNum.
------------------------------
Date: Wed, 12 Jan 2005 21:55:33 -0500
From: "Matt Garrish" <matthew.garrish@sympatico.ca>
Subject: Re: Loop through a text file line by line
Message-Id: <AqlFd.30256$b64.824699@news20.bellglobal.com>
<toomanyjoes@mail.utexas.edu> wrote in message
news:1105583533.605587.261600@z14g2000cwz.googlegroups.com...
> Hi,
>
> I'm trying to loop through a .txt file and grab a number at the
> beginning of the line.
>
From the command line:
perldoc perlopentut
Or try:
http://perldoc.com/perl5.8.4/pod/perlopentut.html
Matt
------------------------------
Date: Wed, 12 Jan 2005 21:33:32 -0600
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: Loop through a text file line by line
Message-Id: <slrncubr0c.evn.tadmc@magna.augustmail.com>
toomanyjoes@mail.utexas.edu <toomanyjoes@mail.utexas.edu> wrote:
> I'm trying to loop through a .txt file and grab a number at the
> beginning of the line. I want to save this number in a variable and
> then compare it with the number at the beginning of the next line.
> The lines are distinct from one other, each one ends with a newline
> character.
You should speak Perl rather than English, when possible,
(as suggested in the Posting Guidelines) then you won't need
to try and explain it in English.
foreach ( "1sampletextsampletextsamplet22tsampletextsampletextsampletext\n",
"2sampletextsampletextsamplet22tsampletextsampletextsampletext\n",
"3sampletextsampletextsamplet22tsampletextsampletextsampletext\n"
) {
> How do I loop through a text file line by line?
By using a while() loop (see the "Compound statements"
section in perlsyn.pod), and the Input operator (see the
"I/O Operators" section in perlop.pod).
> $myvar = "1sampletextsampletextsamplet22tsampletext"; #easy way out of
Errr, I thought you said the strings had newlines on the end.
That string does NOT have a newline at the end.
There should be a "my " at the beginning of that line.
You _are_ enabling strict (as suggested in the Posting Guidelines),
aren't you?
> opening the text file (I'm not sure how)
You use the open() function to open a file.
perldoc -f open
If you use the __DATA__ token, then you can post file contents
as part of your program, as suggested in the Posting Guidelines
(that you have read so many times).
> if ($myvar =~ /^(\d+)/){
> $curNum = "$1"; #curNum should equal 1
> }
> print "$curNum";
>
> This only works for an individual line. I need to move to the next line
> and do the same thing, then compare $curNum with $newNum.
Errr, what is $newNum? It does not appear in your code anywhere...
What kind of comparison do you need?
Equal/not equal to the previous?
one more than the previous?
larger than the previous?
smaller than the previous?
...
---------------------------------
#!/usr/bin/perl
use warnings;
use strict;
my $curNum;
while ( my $myvar = <DATA> ) {
$curNum = $1 if $myvar =~ /^(\d+)/;
}
print "$curNum\n";
__DATA__
1sampletextsampletextsamplet22tsampletextsampletextsampletext
2sampletextsampletextsamplet22tsampletextsampletextsampletext
3sampletextsampletextsamplet22tsampletextsampletextsampletext
---------------------------------
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: 13 Jan 2005 05:03:19 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: Loop through a text file line by line
Message-Id: <Xns95DD906C50Basu1cornelledu@132.236.56.8>
toomanyjoes@mail.utexas.edu wrote in news:1105583533.605587.261600
@z14g2000cwz.googlegroups.com:
> The lines are distinct from one other, each one ends with a newline
> character. How do I loop through a text file line by line?
perldoc -f readline
Sinan.
--
A. Sinan Unur
1usa@llenroc.ude.invalid
(remove '.invalid' and reverse each component for email address)
------------------------------
Date: 12 Jan 2005 17:16:51 -0800
From: "jl_post@hotmail.com" <jl_post@hotmail.com>
Subject: Re: Print question
Message-Id: <1105579011.856217.268380@f14g2000cwb.googlegroups.com>
Sherm Pendley wrote:
>
> So if you add:
> $| == 1;
>
> To your example, you get what the OP presumably wants
> from the sleep(2) calls above - a two-second pause
> between each letter.
I'm sure it's a typographical error on your part, but I
think you meant (with only one '='):
$| = 1;
> jl_post@hotmail.com wrote:
>
> > Normally, a print() statement in Perl won't print
> > a newline unless you tell it to.
>
> Quite correct, but that doesn't answer the question.
> The OP is asking how to unbuffer output, so it appears
> immediately, rather than a line at a time.
You might be right -- it's just that when I read the
following from the original post:
> I need to have a word etc. print ... without a
> new line ( print "\n";) being executed until later
> in time.
I got the impression that his print() statements were
always printing a newline. I have experienced this
"feature, not a bug" a long time ago when I programmed
in BASIC. C, C++, and Perl don't suffer from this
"feature" (unless of course Perl is run with the "-l"
switch), which made me think that maybe the original
poster inherited a Perl script that happened to use
several command-line switches, one being the "-l"
switch.
-- Jean-Luc
------------------------------
Date: Thu, 13 Jan 2005 03:54:32 GMT
From: "edgrsprj" <edgrsprj@ix.netcom.com>
Subject: Re: Print question
Message-Id: <YhmFd.5693$C52.2636@newsread2.news.atl.earthlink.net>
"edgrsprj" <edgrsprj@ix.netcom.com> wrote in message
news:F2ZEd.4034$KJ2.1086@newsread3.news.atl.earthlink.net...
Thanks all. I will give the things that people mentioned a try and see what
happens.
For some background information,
What is being worked on here is a Perl program which can be used to compare
electromagnetic energy field pulse data with earthquake data in order to
generate probability lists for where destructive earthquakes might be about
to occur. The program is in my opinion already producing extraordinarily
accurate and invaluable data. And I am just finishing a major revision
which increases its power and versatility tremendously and cuts calculation
time from 5 hours per run to about 2 minutes. It accomplishes that time
reduction by saving data from previous runs which it then reuses rather than
start from scratch with each run.
This general effort was discussed in the following report which I submitted
to disaster mitigation personnel earlier this year:
http://www.unisdr.org/wcdr-dialogue/t3-dialogue.htm#34
That report proposed that the U.N. or some other organization create a Web
site where information regarding disasters could be stored and easily
accessed by people around the world. On December 17, 2004 U.N. personnel
circulated a press release stating that they had created the following Web
site:
http://www.HEWSweb.org
Unfortunately their announcement was made too close to the time of that
recent catastrophic earthquake and tidal wave in the Indian Ocean area for
the new site to be of much help.
What I am planning to try to do is have that Perl program translated into a
CGI type language so that it will run at that U.N. site or some other site.
Then people around the world will be able to visit the site and use the
program to evaluate their own earthquake precursor data.
------------------------------
Date: Thu, 13 Jan 2005 03:54:37 GMT
From: "edgrsprj" <edgrsprj@ix.netcom.com>
Subject: Re: Print question
Message-Id: <1imFd.5694$C52.3280@newsread2.news.atl.earthlink.net>
"Matt Garrish" <matthew.garrish@sympatico.ca> wrote in message
news:K82Fd.33124$TN6.1038398@news20.bellglobal.com...
>
> "edgrsprj" <edgrsprj@ix.netcom.com> wrote in message
> news:F2ZEd.4034$KJ2.1086@newsread3.news.atl.earthlink.net...
> >
> Why are you asking us? I thought you wrote the documentation?
>
> http://www.freewebz.com/eq-forecasting/Perl.html
>
> Matt
>
>
That Web page was to a large degree intended to serve as an interim type of
resource for people such as myself who are not expert computer programmers
to use as they developed modifications for the earthquake forecasting
program which is stored at the site. I agree that the documentation is
pretty rough. But that is all that was needed. I am considering deleting
the Web page the next time the site gets an overhaul.
------------------------------
Date: Wed, 12 Jan 2005 23:15:51 -0500
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: Re: Print question
Message-Id: <UJmdnaQ0d-hkaHjcRVn-2A@adelphia.com>
edgrsprj wrote:
> What is being worked on here is a Perl program which can be used to
> compare electromagnetic energy field pulse data with earthquake data
... yadda yadda. Yeah, we know. You've said it before - many times. Your
goal is admirable, but your execution lacking. Your tutorial is *full* of
misinformation, and does more harm than good to anyone who wants to learn
the language.
If you truly want to do the people in your field a service, you should
provide a link to the quality material on <http://learn.perl.org>, instead
of trying to write your own low-quality version of it.
> What I am planning to try to do is have that Perl program translated into
> a CGI type language
CGI is not a language. It's a specification for how a web server interfaces
with a child process it launches in response to an incoming request.
sherm--
--
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org
------------------------------
Date: Wed, 12 Jan 2005 23:25:03 -0500
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: Re: Print question
Message-Id: <38qdnQlqY7y8ZXjcRVn-vw@adelphia.com>
jl_post@hotmail.com wrote:
> I'm sure it's a typographical error on your part, but I
> think you meant (with only one '='):
>
> $| = 1;
Yes - good catch.
> You might be right -- it's just that when I read the
> following from the original post:
>
>> I need to have a word etc. print ... without a
>> new line ( print "\n";) being executed until later
>> in time.
>
> I got the impression that his print() statements were
> always printing a newline.
Hmmm... that's not how I read it, but I see your point. I read it as "I need
to have a word etc. print immediately ... without having to print a new
line until later."
sherm--
--
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org
------------------------------
Date: Wed, 12 Jan 2005 20:35:53 -0500
From: "B. Ghassemlou" <bGhassemlou@GoMonitor.com>
Subject: Session ID / login security script
Message-Id: <10ubkb575hj1j3f@corp.supernews.com>
I am developing a website which requires login ID /Password for identifying
a user.
Is there any stadard script in perl which can maintain some sort of security
and access control. Like maintaining session ID or some other parameters to
identify a users within a
session?
Regards
B
------------------------------
Date: Wed, 12 Jan 2005 22:06:33 -0500
From: "Matt Garrish" <matthew.garrish@sympatico.ca>
Subject: Re: Session ID / login security script
Message-Id: <UAlFd.30335$b64.827587@news20.bellglobal.com>
"B. Ghassemlou" <bGhassemlou@GoMonitor.com> wrote in message
news:10ubkb575hj1j3f@corp.supernews.com...
>
> Is there any stadard script in perl which can maintain some sort of
> security
> and access control. Like maintaining session ID or some other parameters
> to
> identify a users within a
> session?
>
Security and access control are issues you have to deal with as a developer.
There are modules that can help you save state, but what to recommend
depends a lot on if you're using Apache or IIS or some other server (see the
CGI::Session and/or Apache::Session modules as a start).
I suspect, however, from the vagueness of your post that you're not a
programmer and are looking for something pre-packaged, in which case you're
in the wrong forum.
Matt
------------------------------
Date: Thu, 13 Jan 2005 04:10:06 GMT
From: "edgrsprj" <edgrsprj@ix.netcom.com>
Subject: Works great!
Message-Id: <ywmFd.5220$KJ2.116@newsread3.news.atl.earthlink.net>
That did the trick.
"Michele Dondi" <bik.mido@tiscalinet.it> wrote in message
news:ca5au094qqtcphcitiosp1q2ajane0krdf@4ax.com...
> On Tue, 11 Jan 2005 23:11:33 GMT, "edgrsprj" <edgrsprj@ix.netcom.com>
> wrote:
>
> >Is there a way to get Perl to print information on the display screen
line
> >at the same time that it is generated?
>
> $|++;
>
> Michele
print 'Thanks ';
$|++,;
sleep 2;
print 'again', "\n";
sleep 2;
print 'Thanks '; $|++,; sleep 2; print 'again', "\n"; sleep 2;
------------------------------
Date: Thu, 13 Jan 2005 04:10:11 GMT
From: "edgrsprj" <edgrsprj@ix.netcom.com>
Subject: Works great!
Message-Id: <DwmFd.5221$KJ2.2493@newsread3.news.atl.earthlink.net>
That works.
<jl_post@hotmail.com> wrote in message
news:1105579011.856217.268380@f14g2000cwb.googlegroups.com...
> Sherm Pendley wrote:
> >
> > So if you add:
> > $| == 1;
> >
> > To your example, you get what the OP presumably wants
> > from the sleep(2) calls above - a two-second pause
> > between each letter.
>
>
> I'm sure it's a typographical error on your part, but I
> think you meant (with only one '='):
>
> $| = 1;
>
print 'Thanks ';
$|=1;
sleep 2;
print 'again', "\n";
sleep 2;
print 'Thanks '; $|=1; sleep 2; print 'again', "\n"; sleep 2;
------------------------------
Date: Thu, 13 Jan 2005 04:44:13 GMT
From: "edgrsprj" <edgrsprj@ix.netcom.com>
Subject: Re: Works great!
Message-Id: <x0nFd.5722$C52.3204@newsread2.news.atl.earthlink.net>
And buffering is restored in this manner. Or is that the wrong way to do
that?
$|=1;
print 'Thanks ';
sleep 2;
$|='';
print 'again';
sleep 2;
print "\a\n";
sleep 5;
------------------------------
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 V10 Issue 7639
***************************************