[13239] in Perl-Users-Digest
Perl-Users Digest, Issue: 649 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Aug 26 06:07:11 1999
Date: Thu, 26 Aug 1999 03:05:11 -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 Thu, 26 Aug 1999 Volume: 9 Number: 649
Today's topics:
[Question]perl-DBM file.. Can visitors open a DBM file <loveshlee@hanmail.net>
CGI and ident (Fulko van Westrenen)
Re: CGI and ident <gellyfish@gellyfish.com>
Re: cgi POST in Perl script <zargo@siteiberica.com>
Computing loop over array problem marcza@my-deja.com
cool programming site (IlIIIIIIII)
Re: DBI, fetchrow_array and sorting (mysql) <michael.preminger@jbi.hioslo.no>
dbm and hash (Raymond Ip)
Re: email address verification <.@gellyfish.com>
Re: email address verification (Michel Dalle)
Re: extract text (Gary O'Keefe)
Re: extract text <gellyfish@gellyfish.com>
Re: grab random image --> post into browser lars_krueger@my-deja.com
Re: grab random image --> post into browser <james.williamson@bbc.co.uk>
Re: grab random image --> post into browser <espen@nextel.no>
Re: help on using DBI <rhrh@hotmail.com>
Re: Jenda's gender [was: newbi: Registry Help under NT] (Jenda Krynicky)
Re: looking for help (Michel Dalle)
Re: LWP Legality Issue? <hykit@jps.net>
Re: Need to get number of days in a specific month (Larry Rosler)
Re: Need to get number of days in a specific month (Abigail)
Re: Perl a Black Sheep? (David Cantrell)
Re: perl in bash functions (Abigail)
Re: print dollar format? <roman.stawski@synersoft.fr>
Re: puzzle <m.grimshaw@salford.ac.uk>
Re: puzzle <m.grimshaw@salford.ac.uk>
Re: rename with ActivePerl (Christophe Oddo)
Re: REQ: tell-a-friend script <rabrody@earthlink.net>
Re: REQ: tell-a-friend script <gellyfish@gellyfish.com>
Re: socket timeout <accprob@worldonline.nl>
Re: The extent of double-quotish interpolation (Alan Curry)
Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 26 Aug 1999 16:54:38 +0900
From: "shl" <loveshlee@hanmail.net>
Subject: [Question]perl-DBM file.. Can visitors open a DBM file at the same time.?
Message-Id: <mQGsjd57#GA.260@news3.netsgo.com>
Hi.
I use perl DBM file.
ex>
dbmopen(%TEST,"data1",0666);
...
...
...
...
dbmclose(%TEST);
Can many visitor open and update above data1.db DBM file at the same time?
if many visitor open or update above data1.db DBM file at the same time,
then the file break?
please help me..... (U.U)
------------------------------
Date: 26 Aug 1999 09:09:48 GMT
From: fulko@dizzy.ipo.tue.nl (Fulko van Westrenen)
Subject: CGI and ident
Message-Id: <slrn7sa12s.dal.fulko@dizzy.ipo.tue.nl>
Hello,
I wrote a CGI-script using Perl and one of the things I would
like to get is the ident-information. I thought that
remote_ident() would give me this but it's always empty.
Is there something extra I need to make this work?
Thanks,
Fulko
------------------------------
Date: 26 Aug 1999 10:26:07 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: CGI and ident
Message-Id: <37c5082f_2@newsread3.dircon.co.uk>
Fulko van Westrenen <fulko@dizzy.ipo.tue.nl> wrote:
>
> Hello,
>
> I wrote a CGI-script using Perl and one of the things I would
> like to get is the ident-information. I thought that
> remote_ident() would give me this but it's always empty.
> Is there something extra I need to make this work?
>
Ensure that the person on the other end is running identd.
This obviously has nothing to do with Perl.
/J\
--
"It needs to be said: Tinky Winky is ... an ideal role model for any
child without toes or genitalia" - Paul Rudnick, The Guardian
------------------------------
Date: Thu, 26 Aug 1999 08:10:13 +0200
From: "Zargo A. Claudios" <zargo@siteiberica.com>
Subject: Re: cgi POST in Perl script
Message-Id: <37C4DA45.47E31429@siteiberica.com>
> and another problem ...
> how to make a POST in perl script to a https (under SSL conection)?
------------------------------
Date: Thu, 26 Aug 1999 09:38:17 GMT
From: marcza@my-deja.com
Subject: Computing loop over array problem
Message-Id: <7q31u9$d9r$1@nnrp1.deja.com>
Assume we have a string with an unknown number of pairs of numbers and
spaces between them like:
$str = " 6 34 23 33 7 0 2 03 ";
Now I want to loop over these pairs and find out if more first parts
greater then the refering second parts. If this is the case "y" should
be returned otherwise "n":
6 < 34 -> second part greater
23 < 33 -> second part greater
7 > 0 -> first part greater
2 < 03 -> second part greater
---------------------------------
sum 3 x second part greater - 1 x first part greater
=> return("n")
How is the shortest way of doing this ?
This is my current (slow) solution:
sub calc {
local($tmp) = $_[0];
$tmp = trim($tmp); # removes leading/trailing spaces
$tmp = split(/ +/,$tmp);
local($w) = 0;
while(0 < $#tmp) {
if (pop(@tmp) < pop(@tmp)) {
$w++; }
else {
$w--; } }
return((( 0 <= $w) ? "n" : "y")); }
Bye
Marcus
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: 26 Aug 1999 08:06:31 GMT
From: iliiiiiiii@aol.com (IlIIIIIIII)
Subject: cool programming site
Message-Id: <19990826040631.02298.00004338@ng-fc1.aol.com>
here is a cool programming web site: http://devlibrary.tsx.org/
------------------------------
Date: Thu, 26 Aug 1999 08:52:55 +0100
From: Michael Preminger <michael.preminger@jbi.hioslo.no>
Subject: Re: DBI, fetchrow_array and sorting (mysql)
Message-Id: <37C4F257.87029901@jbi.hioslo.no>
Sorry to have bothered the BB with this bullshit...
The sorting was, of course nice and neat. Not so much for my coding and
testing in this example...
Thanks for the response
Michael
Michael Preminger wrote:
> Hei!
>
> I am using perl DBI against a mysql database, and fetching a set of
> record from the database ordered.
>
> I use the construct:
> $IndexedDocs=$dbh->prepare("select Document_inc_id from
> Term_indexes_Document where Term_inc_id=$old_n order by Document_inc_id
> ");
> $IndexedDocs->execute;
> while (@doc_id=$IndexedDocs->fetchrow_array){
> $tmpTermEntry.="$doc_id[1] ";
> }
>
> To my surprize the list I get has lost the sorting imposed by the select
> call. Trying to run the same call directly against the base retains the
> sorting.
>
> Question:
>
> Why do I lose the sorting the way I implement it, and how do I retain
> the sorting within DBI
>
> --
> Michael Preminger
>
> Forsker / Research Scientist
> Avdeling for journalistikk,
> bibliotek- og informasjonsfag /
> Faculty of Journalism, Library and
> Information Science
> Høgskolen i Oslo / Oslo College
>
> http://www.hioslo.no/~michaelp
>
> Pilestredet 52, N-0167 Oslo
> Voice: +47-22452778
> Fax: +47-22452605
> E-mail: michael.preminger@jbi.hioslo.no
--
Michael Preminger
Forsker / Research Scientist
Avdeling for journalistikk,
bibliotek- og informasjonsfag /
Faculty of Journalism, Library and
Information Science
Høgskolen i Oslo / Oslo College
http://www.hioslo.no/~michaelp
Pilestredet 52, N-0167 Oslo
Voice: +47-22452778
Fax: +47-22452605
E-mail: michael.preminger@jbi.hioslo.no
------------------------------
Date: 26 Aug 1999 08:20:43 GMT
From: rwmip@glink.net.hk (Raymond Ip)
Subject: dbm and hash
Message-Id: <7q2tcr$g41$1@unix2.glink.net.hk>
Anybody can let me that the limitation on dbm file and hash table....
When I want to insert record to dbm file, it'll return insert error after
I succesfully insert some certain records.... But the case don't occur in
hash table ...
Best Regards
Raymond Ip
------------------------------
Date: 26 Aug 1999 09:32:59 +0100
From: Jonathan Stowe <.@gellyfish.com>
Subject: Re: email address verification
Message-Id: <37c4fbbb_2@newsread3.dircon.co.uk>
Jon Hollcraft <webmaster@mendonet.com> wrote:
> Paul Falardeau wrote:
>>
>> Can somebody please post a snippet of code which will check the validity
>> of an email address?
>
> This works for most (on Perl 5.004_4 unix box). Jon
>
<snip code>
This code will reject perfectly valid e-mail addresses.
I would suggest re-reading the relevant RFC regarding e-mail addresses.
/J\
--
"I can't believe Elton John recorded that song again. Exactly how do you
live your life like a spurgis in the wind?" - Ronnie, Veronica's Closet
------------------------------
Date: Thu, 26 Aug 1999 08:40:41 GMT
From: michel.dalle@usa.net (Michel Dalle)
Subject: Re: email address verification
Message-Id: <7q2un5$fs2$2@news.mch.sbs.de>
In article <37C4BB91.2A5C@mendonet.com>, webmaster@mendonet.com wrote:
[snip]
>My criteria is speed and security. For my purposses with this program,
>the trade off is allowing 200 million addresses in quickly with out any
>funny business characters, while disallowing 10K or whaterever there
>might be, of addresses which the filter disallows. To load a 5K module
>to catch all the others just isn't indicated. It does sound pretty
>provocative thought, and I will take a look at it; perhaps for another
>application.
I'm almost afraid to ask what you're planning to do with 200 million
addresses. The only legal application I see off-hand is statistical :
find the distribution of names/characters/domain names/... in e-mail
addresses.
I do hope it's nothing more than that :o
Michel.
------------------------------
Date: Thu, 26 Aug 1999 09:31:02 GMT
From: gary@onegoodidea.com (Gary O'Keefe)
Subject: Re: extract text
Message-Id: <37c504f6.2227804@news.hydro.co.uk>
A keyboard was whacked upside David Cassell's head and out came:
>Gary O'Keefe wrote:
>>
>> A keyboard was whacked upside Abigail's head and out came:
>>
>> >michael hagberg (mzh@cntw.com) wrote on MMCLXXXV September MCMXCIII in
>> ><URL:news:7q0l57$4ln$1@news3.global-ip.net>:
>>
>> What? Michael wrote this message on 2185th September 1993? Cool...
>
>Yep. All of Abigail's posts use Roman numerals and September
>1993. You've heard the saying "Now it's September all the
>time on Usenet" haven't you? If not, search deja.com for
>discussions in this ng on the subject.
Educated guess before looking up deja.com: September is when colleges
and universities start their semesters. New courses mean new
assignments, which take time, getting in the way of their drinking
floor polish, smoking joss sticks, date rape, and listening to their
crazy rock-and-roll music. Loads of dumbass questions hit the
newsgroup looking for someone gullible enough to do their assignment.
But now that everyone (that matters) gets usenet (even those in
otherwise gainful employment), the dumbasses are posting all the time.
Close?
Gary
--
Gary O'Keefe
gary@onegoodidea.com
You know the score - my current employer has nothing to do with what I post
------------------------------
Date: 26 Aug 1999 10:34:17 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: extract text
Message-Id: <37c50a19_2@newsread3.dircon.co.uk>
Gary O'Keefe <gary@onegoodidea.com> wrote:
> A keyboard was whacked upside David Cassell's head and out came:
>
>>Gary O'Keefe wrote:
>>>
>>> A keyboard was whacked upside Abigail's head and out came:
>>>
>>> >michael hagberg (mzh@cntw.com) wrote on MMCLXXXV September MCMXCIII in
>>> ><URL:news:7q0l57$4ln$1@news3.global-ip.net>:
>>>
>>> What? Michael wrote this message on 2185th September 1993? Cool...
>>
>>Yep. All of Abigail's posts use Roman numerals and September
>>1993. You've heard the saying "Now it's September all the
>>time on Usenet" haven't you? If not, search deja.com for
>>discussions in this ng on the subject.
>
> Educated guess before looking up deja.com: September is when colleges
> and universities start their semesters. New courses mean new
> assignments, which take time, getting in the way of their drinking
> floor polish, smoking joss sticks, date rape, and listening to their
> crazy rock-and-roll music. Loads of dumbass questions hit the
> newsgroup looking for someone gullible enough to do their assignment.
>
> But now that everyone (that matters) gets usenet (even those in
> otherwise gainful employment), the dumbasses are posting all the time.
>
> Close?
>
Almost spot on ...
/J\
--
"The Tory Party is like a wonky shopping trolley - it pulls to the
left, it pulls to the right, but you just can't get it to go forward"
- John Prescott
------------------------------
Date: Thu, 26 Aug 1999 07:39:21 GMT
From: lars_krueger@my-deja.com
Subject: Re: grab random image --> post into browser
Message-Id: <7q2qv8$91h$1@nnrp1.deja.com>
In article
<david_lee_ford-2508992319320001@ts010d16.lax-ca.concentric.net>,
david_lee_ford@my-Deja.com (David Ford) wrote:
>
> When the "reload" button is hit in Explorer, the entire contents of
the
> page reload (along with the image file). This is what we want. By
> contrast, however, Netscape only "reloads" the cached version of the
page
> (in other words, neither the page or the image are RE-loaded at all --
> only the cache contents are "reloaded"). This is not acceptable. I
need
> for Netscape to perform a full reload of the page (and to obtain a
> fresh/random image) upon hitting the "reload" button. What is the
> solution here?
>
Do "Shift-Click" on reload and your page gets reloaded from the net, not
from the cache or turn off caching.
--
Lars Krueger
mailto:lars_krueger@my-dejanews.com
URL:
http://homestead.dejanews.com/user.lars_krueger/
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Thu, 26 Aug 1999 09:18:06 +0100
From: "James Williamson" <james.williamson@bbc.co.uk>
Subject: Re: grab random image --> post into browser
Message-Id: <7q2tao$sl2$1@nntp0.reith.bbc.co.uk>
David Ford wrote in message ...
>Hello,
>
>I am totally new at this, and am hoping to find the answer here.
>
>I need a CGI script that will grab a random image from a directory and
>post it into a preset location on a WWW page. I need for the image to
>refresh and randomize upon every page reload. The trick is that it has to
>work the same in Netscape and Explorer. A friend of mine came up with
>what we thought would be a working script until we ran into the following
>problem:
>
>When the "reload" button is hit in Explorer, the entire contents of the
>page reload (along with the image file). This is what we want. By
>contrast, however, Netscape only "reloads" the cached version of the page
>(in other words, neither the page or the image are RE-loaded at all --
>only the cache contents are "reloaded"). This is not acceptable. I need
>for Netscape to perform a full reload of the page (and to obtain a
>fresh/random image) upon hitting the "reload" button. What is the
>solution here?
>
>I have heard that due to Netscape's tendency to "see" this CGI script as
>an image (and thus load it into cache), my best solution for this problem
>is Javascript instead of a CGI script. Supposedly (in this case),
>Javascript would "force" a reload in every browser. Is this true?
>
>Thank you for any help which you could offer.
>
>David Ford
>Costa Mesa, California
This isn't really a Perl question now is it? I would think the solution is
to look into the HTTP protocol and I'll think you'll the 'expires' header
set at the time the page was sent will tell the browser not to cache the
page.
James Williamson
james.williamson@bbc.co.uk
------------------------------
Date: Thu, 26 Aug 1999 11:40:35 +0200
From: Espen Myrland <espen@nextel.no>
Subject: Re: grab random image --> post into browser
Message-Id: <37C50B92.A2AFB8D4@nextel.no>
> >By contrast, however, Netscape only "reloads" the cached version of the
> page
> >(in other words, neither the page or the image are RE-loaded at all --
> >only the cache contents are "reloaded"). This is not acceptable. I need
> >for Netscape to perform a full reload of the page (and to obtain a
> >fresh/random image) upon hitting the "reload" button. What is the
> >solution here?
> >
for example:
/usr/bin/perl -wT
use strict;
use CGI;
my $q = new CGI;
print $q->header(-type=>'text/html',
-expires => '-1000d',
);
espen
------------------------------
Date: Thu, 26 Aug 1999 08:38:32 +0100
From: Richard H <rhrh@hotmail.com>
Subject: Re: help on using DBI
Message-Id: <37C4EEF8.A7DCF06@hotmail.com>
Nick Lee wrote:
>
> Hi,
>
> I have the following code:
>
> ---------------------------
> #! /usr/bin/perl -w
>
> use DBI;
>
> $dbName = 'DBI:ODBC:MyDatabase';
> $dbUsername = 'admin';
> $dbPassword = '';
>
> $dbh = DBI->connect($dbName, $dbUsername, $dbPassword);
> ---------------------------
>
> But when I execute it, I got the following error message:
>
> ---------------------------
> install_driver(ODBC) failed: Can't locate DBD/ODBC.pm in @INC at line
> 3. Perhaps the DBD::ODBC perl module hasn't been fully installed, or
> perhaps the captialization of 'ODBC' isn't right.
> Available drivers: ADO, ExampleP, Proxy at line 9. (the last line)
> ---------------------------
>
> I presume the error message means that I have to install the DBD::ODBC
> module. So I go into the PPM (perl package manager. I'm using
> ActivePerl), and try to install DBD::ODBC. But then PPM said it cannot
> locate a PPD file for package DBD::ODBC.
Go to www.activestate.com/packages and download the binary for
DBD::ODBC, extract it wherever you like, then use the dos prompt, change
to the directory where the ppd file is located and go:
>ppm install DBD-ODBC.ppd
that should work,
Richard H
------------------------------
Date: Thu, 26 Aug 1999 08:54:27 GMT
From: Jenda@Krynicky.cz (Jenda Krynicky)
Subject: Re: Jenda's gender [was: newbi: Registry Help under NT]
Message-Id: <1106_935657667@prague_main>
On Thu, 26 Aug 1999 13:05:33 +1000, elephant@squirrelgroup.com (elephant) wrote:
> David Cassell writes ..
> >Jenda Krynicky wrote:
> >[snip of gender error]
> >> HIS site!
> >>
> >> Oh well. I guess I should put a picture of me online or at least
> >> specify my sex on my site.
> >>
> >> Never mind :-)
> >
> >Just keep repeating these three words:
> > Americans.. are.. stupid.
> >
> >David, proud to be stupid^WAmerican
I don't think this has anything to do with stupidity. Sometimes you simply have to guess.
And if the other person comes from a different language territory you have
about 50% chance to be right.
In case you ever need it:
Do not look at the first name (you'd have to remember all names), but at the last name.
It differs between males and females in Czech. (Same for Slovak)
If it ends with "a" you have about 99.9% chance it's a female. Otherwise it's male.
> only problem is that I'm not American .. neither am I female (another
> common reason for assuming someone else is female in my experience)
In US it's, I guess, safer to assume female by default.
You never know when you meet an AFB.
> I'm Australian .. I just guessed at Jenda's gender .. it's not the first
> time - and I'm sure it will not be the last - that those Czech (s?)
> names screw me up .. my culturally-inept apologies Jenda
>
> ( I guess I'll have to go back to dreaming about Abigail *8^)
I wish you nice dreams ;-)
> --
> jason - elephant@squirrelgroup.com -
Jenda
http://Jenda.Krynicky.cz
BTW: Did we get far from Perl, huh?
------------------------------
Date: Thu, 26 Aug 1999 08:45:38 GMT
From: michel.dalle@usa.net (Michel Dalle)
Subject: Re: looking for help
Message-Id: <7q2v0f$fs2$3@news.mch.sbs.de>
In article <37C4606E.A80C1866@gel.ulaval.ca>, Christian Hudon <hudon01@gel.ulaval.ca> wrote:
>I"m trying to make a cgi script, I've tried it in c++, but it is not
>working as i d like it to
>
>I want my script to take the info from a form and place it at the right
>place in a text...
>the name would replace name123 in the text etc...
Go to cgi.resourceindex.com and stay there until you have read
some CGI tutorials and found the scripts you're looking for.
HTH,
Michel.
------------------------------
Date: Thu, 26 Aug 1999 01:13:57 -0800
From: Kit <hykit@jps.net>
Subject: Re: LWP Legality Issue?
Message-Id: <260819990113573396%hykit@jps.net>
In article <935462580.1239334475@news.skunkworks.berghold.net>, Peter
L. Berghold <peter@berghold.net> wrote:
> On Fri, 20 Aug 1999, DC wrote:
>
> > My questions is this: Is this a copyright violation if I re-display ONLY
> >THE FORM portion of their website temporarily ONCE, so I can enter the
> >correct search information into the FORM manually?
> >
>
>
> I'm not a copyright attorney, in fact I'm not an attorney at all and don't
> even
> play one on TV. I'd say IMHO that what you are doing *could* be construed as
> a
> copyright violation though...
>
>
> --
No, that would not be a copyright violation. You cannot copyright what
a form looks like.
--Kit
------------------------------
Date: Thu, 26 Aug 1999 00:09:27 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Need to get number of days in a specific month
Message-Id: <MPG.122e87fca2ad562d989eac@nntp.hpl.hp.com>
[Posted and a courtesy copy sent to Tom Christiansen.]
In article <ylyaez83d5.fsf@windlord.stanford.edu> on 25 Aug 1999
23:25:58 -0700, Russ Allbery <rra@stanford.edu> says...
...
> sub days_in_month {
> my ($month, $year) = @_;
> 30 + ($month + ($month > 7)) % 2 - ($month == 2)
> * (2 - ($year % 4 == 0 && ($year % 100 != 0 || $year % 400 == 0)));
> }
Note the implicit assumption that the value of a Boolean in numerical
context is 1 if true, 0 if false. I think this is fine; it is
documented to work that way in C.
I wish someone would bite the bullet and document it in Perl also. All
that perlop says now is 'true'. Note that the <=> and cmp operators are
specified to return -1, 0, and 1 (instead of just <0, 0, >0). So why
not the Booleans to return 1 and 0 in numerical context?
How about it, TomC? I'll keep asking until it finally happens. :-)
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: 26 Aug 1999 02:24:02 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Need to get number of days in a specific month
Message-Id: <slrn7s9qu5.lhu.abigail@alexandra.delanet.com>
Need Help (needhelp@help.com) wrote on MMCLXXXV September MCMXCIII in
<URL:news:37c3b6a5.89153780@news.isdn.net.il>:
;; Hi,
;;
;; How can I get the number of days in a specific month?
;; Lets say I need to know how many days are going to be in February
;; 2005.
#!/opt/perl/bin/perl -w
use strict;
sub days {
my $l = length (my $m = lc shift);
my $y = shift;
return 30 if $l == 9 or $l == 5 and $m le reverse $m;
return 31 if $l == 6 or $l % 2;
return 30 + (($m le reverse $m) ? 1 : 0) if $l == 4;
return 29 - !!($y % 4) + !!($y % 100) - !!($y % 400)
if reverse ($m) ge 'wall';
return 30 + $m =~ y/c//;
die "$m is a very funny month!\n";
}
__END__
28
Abigail
--
perl -we '$@="\145\143\150\157\040\042\112\165\163\164\040\141\156\157\164".
"\150\145\162\040\120\145\162\154\040\110\141\143\153\145\162".
"\042\040\076\040\057\144\145\166\057\164\164\171";`$@`'
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: Thu, 26 Aug 1999 09:22:01 GMT
From: NukeEmUp@ThePentagon.com (David Cantrell)
Subject: Re: Perl a Black Sheep?
Message-Id: <37c505ad.58051263@news.insnet.net>
On 25 Aug 1999 18:17:29 -0400, elflord@panix.com (Donovan Rebbechi)
said:
>Java ? at the moment, it's used mostly for client side processing, because
>it's better for portable GUI programming ( ie client side stuff ) than
>for text processing ( ie server side stuff ).
Au contraire, Java programmers are finally waking up to the fact that
applets are a Bad Idea and are finally using Java for what it was
designed for - distributed back-end applications, real client-end
applications. At least, that's what _I_ see happening. YMMV.
Java is admittedly not as capable as perl in the text-processing
arena, but throw in a GPLed regex library such as can be found at
http://www.gjt.org/servlets/JCVSlet/list/gjt/top.gnu.regexp or use the
excellent shareware regex package from http://javaregex.com/ and you
can go a long way.
[Copying newsgroup posts to me by mail is considered rude]
--
David Cantrell, part-time Unix/perl/SQL/java techie
full-time chef/musician/homebrewer
http://www.ThePentagon.com/NukeEmUp
------------------------------
Date: 26 Aug 1999 02:55:27 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: perl in bash functions
Message-Id: <slrn7s9sp3.lhu.abigail@alexandra.delanet.com>
Eric Smith (eric@fruitcom.com) wrote on MMCLXXXVI September MCMXCIII in
<URL:news:slrn7s9oq6.978.eric@plum.fruitcom.com>:
{}
{} May one use perl code in a bash function and pass the command line args of
{} the function to the perl "script"?
Well, yes, but why are you asking here?
Abigail
--
sub f{sprintf$_[0],$_[1],$_[2]}print f('%c%s',74,f('%c%s',117,f('%c%s',115,f(
'%c%s',116,f('%c%s',32,f('%c%s',97,f('%c%s',0x6e,f('%c%s',111,f('%c%s',116,f(
'%c%s',104,f('%c%s',0x65,f('%c%s',114,f('%c%s',32,f('%c%s',80,f('%c%s',101,f(
'%c%s',114,f('%c%s',0x6c,f('%c%s',32,f('%c%s',0x48,f('%c%s',97,f('%c%s',99,f(
'%c%s',107,f('%c%s',101,f('%c%s',114,f('%c%s',10,)))))))))))))))))))))))))
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: Thu, 26 Aug 1999 10:03:15 +0200
From: Roman Stawski <roman.stawski@synersoft.fr>
Subject: Re: print dollar format?
Message-Id: <37C4F4C3.53722CC2@synersoft.fr>
Abigail wrote:
> b chung (bchung@ci.south-el-monte.ca.us) wrote on MMCLXXXV September
> .. In Perl How do I print the 22343.87 like this $22,232.87
> print '$22,232.08';
Hmm. Rounding problems?
------------------------------
Date: Thu, 26 Aug 1999 08:58:25 +0100
From: Mark Grimshaw <m.grimshaw@salford.ac.uk>
Subject: Re: puzzle
Message-Id: <37C4F3A1.993925D2@salford.ac.uk>
Hmmm... some difference here surely. I simply wish to automate a process
that the music site allows everyone/anyone to do manually. I could go around
everyone of our thousand+ computers (I guess the site checks on IP addresses)
every day and download my stuff. This, I think, would achieve the same
result as the automated script.
revjack wrote:
> Mark Grimshaw explains it all:
>
> :P.S. I'm not into hacking and there's nothing illegal about hype!
>
> That's an interesting notion. I just wrote a script that will e-mail the
> music site administrator about a dozen times a day with a complaint about
> your behavior. It munges the From: address, etc., so it looks like
> hundreds of separate people are complaining about you. Nothing illegal,
> just a little hype.
------------------------------
Date: Thu, 26 Aug 1999 09:02:21 +0100
From: Mark Grimshaw <m.grimshaw@salford.ac.uk>
Subject: Re: puzzle
Message-Id: <37C4F48D.F6DC16FB@salford.ac.uk>
Yes, heard of the payola scandal. Record companies bribing/corrupting third
parties (DJ Alan Freed) is a bit different to record companies spending their own
money to buy their own product back. Most governments do it all the time of
course - known as subsidies.
Jonathan Stowe wrote:
> On Wed, 25 Aug 1999 17:24:36 +0100 Mark Grimshaw wrote:
> > In the
> > time-honoured tradition of musical hype (cf popular music record
> > companies buying albums to push them up the charts!), I'd like to hype
> > my music and push it up the charts.
> >
> <snip>
> >
> > P.S. I'm not into hacking and there's nothing illegal about hype!
> >
>
> Never heard of the payola scandal then.
>
> /J\
> --
> Jonathan Stowe <jns@gellyfish.com>
> Some of your questions answered:
> <URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
> Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: Wed, 25 Aug 1999 09:37:40 GMT
From: 2002@antispam.calva.net (Christophe Oddo)
Subject: Re: rename with ActivePerl
Message-Id: <37c3b94c.6127767@news.calvacom.fr>
Hello David and Jenda,
Thank you! Your answers made me on the right way.
I found why my 'rename' doesn't work:
That's because the file I wanted to rename was opened by
open(FILEHANDLE,"wordlist.txt")
(I needed to open it...)
By closing it before renaming, there's no more the "permission denied"
message error... and all go right!
Thank you!
See you soon in the group.
Christophe
(In order to reply by mail, delete 'antispam.' in the address).
------------------------------
Date: Thu, 26 Aug 1999 01:06:03 -0700
From: "Robert Brody" <rabrody@earthlink.net>
Subject: Re: REQ: tell-a-friend script
Message-Id: <7q2rgl$ikj$1@birch.prod.itd.earthlink.net>
Abigail <abigail@delanet.com> wrote in message
news:slrn7s91b7.lhu.abigail@alexandra.delanet.com...
> I'd suggesting picking up the phone and call your friend, because your
> description of forms going to pages via referers and then coming back
> completely lost me.
Spare me the stupid "suggestion" and if you're completely lost, then why
respond? Is this your personal newsgroup or a public one? I don't recall
addressing my post to you. Obviously you don't know what I'm talking about,
nor have seen the many tell-a-friend scripts that I was referring to. Try:
http://bignosebird.com/carchive/birdcast.shtml
for one.
Good bye.
------------------------------
Date: 26 Aug 1999 09:09:20 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: REQ: tell-a-friend script
Message-Id: <37c4f630_2@newsread3.dircon.co.uk>
Robert Brody <rabrody@earthlink.net> wrote:
> Abigail <abigail@delanet.com> wrote in message
> news:slrn7s91b7.lhu.abigail@alexandra.delanet.com...
>
>> I'd suggesting picking up the phone and call your friend, because your
>> description of forms going to pages via referers and then coming back
>> completely lost me.
>
> Spare me the stupid "suggestion" and if you're completely lost, then why
> respond? Is this your personal newsgroup or a public one? I don't recall
> addressing my post to you. Obviously you don't know what I'm talking about,
> nor have seen the many tell-a-friend scripts that I was referring to. Try:
>
I think that everyone has seen one of these things and most people consider
it be little better than spamming.
This group is a resource for people who are writing Perl programs - it is
not a market for stupid CGI programs. If you are unable to find the
program that you want from one of the free CGI archives then I suggest
that you either learn Perl and write it yourself or hire a programmer.
/J\
--
"Buzz Aldrin was the second man to walk on the moon and the first to
fill his pants" - Violet Berlin, The Big Bang
------------------------------
Date: Thu, 26 Aug 1999 10:34:36 +0200
From: Daniel Kupfer <accprob@worldonline.nl>
Subject: Re: socket timeout
Message-Id: <37C4FC1C.3F6ED044@worldonline.nl>
GiN wrote:
>
> Hi I am having problems with my portscanner in PERL.
>
>
> while ($beginport < $maxport) {
> print "Scanning: $beginport\n";
>
> if ($child = fork) {
> sleep 4;
> kill 9, $child if $child; #
> this should kill the child if it takes to long to connect
> }
> else {
>
> if (scan($beginport))
> {
> #the socket opener
> print "SERVER: $target PORT: $beginport STATUS:
> open.\n";
> }
> }
> $beginport++;
> }
>
>
> my problem is: the loop is weird and the timeout/kill is not functioning wel..
>
> if you know the answer, please e-mail to : no-gin@dds.nl (without "no-")
>
> thanks advanced!!!
>
> --
> #phreak.nl http://www.casema.net/~gin
>
>
Install the latest IO-module from CPAN, you shouldnt have to use the
forking then, because the time-out on IO::Socket::INET will work.
--
Daniel Kupfer -=> featuring accprob <=-
------------------------------
Date: Thu, 26 Aug 1999 07:36:25 GMT
From: pacman@defiant.cqc.com (Alan Curry)
Subject: Re: The extent of double-quotish interpolation
Message-Id: <Z76x3.25900$x04.1527002@typ11.nn.bcandid.com>
In article <MPG.122f73d427cbb620989c82@news-server>,
elephant <elephant@squirrelgroup.com> wrote:
>Alan Curry writes ..
>this can be seen with this code
>
> #!/usr/bin/perl -w
> use strict;
>
> my $a = 'xyz';
> print "$a[3]"; # nope - compile time error
> print "${a}[3]"; # also no go
> print "$a"."[3]"; # finally
Eek! I hadn't even thought about that one.
> print "$h{\"$h{$s}\"}";
>
>you were surprised by this ? .. because there are extra double quotes ?
extremely surprised.
>.. what did you want to be printed $h{"bar"} ?? .. it's still possible
>to interpolata that further .. hence the 'baz' output
I expected it to try to interpolate $h{"bar"} but I thought in this context
it would take "bar" as a 5-character key, including the quotes. Instead I
have actually found a way to make "" nest inside "". That's surprising.
--
Alan Curry |Declaration of | _../\. ./\.._ ____. ____.
pacman@cqc.com|bigotries (should| [ | | ] / _> / _>
--------------+save some time): | \__/ \__/ \___: \___:
Linux,vim,trn,GPL,zsh,qmail,^H | "Screw you guys, I'm going home" -- Cartman
------------------------------
Date: 1 Jul 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 1 Jul 99)
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.
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" from
almanac@ruby.oce.orst.edu. The real FAQ, as it appeared last in the
newsgroup, can be retrieved with the request "send perl-users FAQ" from
almanac@ruby.oce.orst.edu. 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" from
almanac@ruby.oce.orst.edu.
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 V9 Issue 649
*************************************