[18284] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 452 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Mar 9 06:05:39 2001

Date: Fri, 9 Mar 2001 03:05:10 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <984135910-v10-i452@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Fri, 9 Mar 2001     Volume: 10 Number: 452

Today's topics:
    Re: (Linux beginner) How to de-install and re-install P (Martien Verbruggen)
    Re: alarm() syntax (Rafael Garcia-Suarez)
        binary to decimal conversion: FAQ answer is not good <johnlin@chttl.com.tw>
    Re: Can a regex do this? <uri@sysarch.com>
    Re: Can a regex do this? <bart.lateur@skynet.be>
    Re: Can a regex do this? <jonni@ifm.liu.se>
    Re: Can a regex do this? (Abigail)
    Re: Can a regex do this? (Ben Okopnik)
    Re: Can a regex do this? (Martien Verbruggen)
    Re: Can a regex do this? (Martien Verbruggen)
    Re: Count matches? (Anno Siegel)
    Re: file share <sat_ring@hotmail.com>
    Re: Help to Install Perl <dream1625@aol.com>
    Re: Help to Install Perl <dream1625@aol.com>
    Re: Help to Install Perl (Anno Siegel)
    Re: Help to Install Perl <dream1625@aol.com>
        Help! apache->cgi->perl->dbi->mysql error <oracle@zonai.com>
    Re: Hidden URL (Miguel Cruz)
    Re: Hidden URL (Miguel Cruz)
    Re: Hidden URL <godzilla@stomp.stomp.tokyo>
    Re: How to convert morse to ascii using perl? <bart.lateur@skynet.be>
    Re: Newbies welcome <althtml@brucies.com>
    Re: Perl fortune database - where? (was: Dynamic naming (Abigail)
    Re: print abstract ('blah'); # subroutine or file handl (EED)
    Re: Regex to quote XML attributes? <bart.lateur@skynet.be>
    Re: Regex to quote XML attributes? <thunderbear@bigfoot.com>
    Re: Ties (Anno Siegel)
    Re: Tk based alarm clock lvirden@cas.org
    Re: Use PERL or Java? Which is faster? <thunderbear@bigfoot.com>
    Re: Use PERL or Java? Which is faster? <thunderbear@bigfoot.com>
    Re: What information can I get from a GLOB reference? <Jerome.Abela@free.fr>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Thu, 8 Mar 2001 20:34:40 +1100
From: mgjv@tradingpost.com.au (Martien Verbruggen)
Subject: Re: (Linux beginner) How to de-install and re-install Perl on Linux
Message-Id: <slrn9aekhg.k18.mgjv@martien.heliotrope.home>

On Thu, 8 Mar 2001 09:32:43 +1300, Peter Sundstrom
	<peter.sundstrom-eds@eds.com> wrote:
> 
> "Martien Verbruggen" <mgjv@tradingpost.com.au> wrote in message
> news:slrn9ac69i.k18.mgjv@martien.heliotrope.home...
>> On Tue, 6 Mar 2001 22:35:24 -0000, Garry Heaton
>> <garry@heaton6.freeserve.co.uk> wrote:
>> > I'm new to Linux/Unix and want to remove the default Perl
>> > installation, then re-install from source code because I read
>> > somewhere that the Perl libraries on some Linux distributions are
>> > incomplete. How do I remove and re-install?
>>
>> It's better to leave the original installed, otherwise all other
>> packages managed by rpm will start whinging that you don't have perl
>> installed (and that includes bind, for crying out loud!).
> 
> I assume you were using your PSI::ESP module again, and realised their
> Linux distribution used RPM?

Actually, that was an assumption, that may or may not be correct. The
chances are in favour of me being coreect, but not overwhelmingly so. 

A few years from now, an assumption lie that will be almost certain to
be correct :)

Martien
-- 
Martien Verbruggen              | 
Interactive Media Division      | Make it idiot proof and someone will
Commercial Dynamics Pty. Ltd.   | make a better idiot.
NSW, Australia                  | 


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

Date: Fri, 09 Mar 2001 08:12:24 GMT
From: rgarciasuarez@free.fr (Rafael Garcia-Suarez)
Subject: Re: alarm() syntax
Message-Id: <slrn9ah42u.35g.rgarciasuarez@rafael.kazibao.net>

Walter Greenwood wrote in comp.lang.perl.misc:
[...]
> Thanks for the sugggestion. That got me a little farther along. The timeout
> works properly, but now it hangs when closing STDOUT. I'm sorry if I'm
> overlooking the obvious, but programming is new to me, and I'm trying to make
> sense of it all. 
[...]
>      open (STDOUT,"| $MAIL $MAIL_FLAGS") || die "mail: $!";
>      select STDOUT; $| = 1;
>      open (STDERR,">&STDOUT");
[...]
>         close STDERR;
>         close STDOUT;

I don't see why you're using STDOUT instead of another filehandle :
  open(MAIL, "| $MAIL $MAIL_FLAGS") || die "mail: $!";
  ...
  close MAIL or die "Can't close pipe to mail: $!"; # you should check
    # the return value of close when writing to a pipe

I don't know if this will fix your problem though.

If you want to drop STDERR and STDOUT (in case you're writing a daemon),
redirect them to /dev/null :
  open STDOUT, '>>/dev/null' or die "Can't write to /dev/null: $!\n";
  open STDERR, '>>/dev/null' or die "Can't write to /dev/null: $!\n";

-- 
Rafael Garcia-Suarez / http://rgarciasuarez.free.fr/


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

Date: Fri, 9 Mar 2001 18:17:18 +0800
From: "John Lin" <johnlin@chttl.com.tw>
Subject: binary to decimal conversion: FAQ answer is not good
Message-Id: <98aak5$a7j@netnews.hinet.net>

Dear all,

For binary to decimal conversion, FAQ gives some solutions:

perldoc -q convert

print ord(pack('B*','110110110110'));
219
or
print unpack('c', pack('B*','110110110110'));
-37

Both give wrong answer if the binary is just a little bit longer.
Is there any other (better) build-in function to use here?

Thank you very much.

John Lin





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

Date: Fri, 09 Mar 2001 08:05:15 GMT
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Can a regex do this?
Message-Id: <x7hf13cqpw.fsf@home.sysarch.com>

>>>>> "b" == blahblah  <blah@blah.com> writes:

  b> I think you need to go back and read my original post, and then
  b> you'd see that yours makes no sense whatsoever. And while you're at
  b> it, I would suggest you consult with a proctologist about removing
  b> the bug that crawled up your ass.

you are just another anonymous troll, so play with moronzilla. here is
your original post. NOWHERE does it mention anything about .net or
java. NOWHERE does it say no perl specific code. NOWHERE does it have
another group but this. so you take your stupid test and get the fuck
out of here. you are too stupid to even use a real address or name.

---------------------------------
From: blahblah <blah@blah.com>
Subject: Can a regex do this?
Newsgroups: comp.lang.perl.misc
Date: Thu, 08 Mar 2001 20:39:03 -0600
Organization: Posted via Supernews, http://www.supernews.com
Path: typhoon.ne.mediaone.net!chnws06.ne.mediaone.net!24.147.2.43!chnws02.mediaone.net!news-out.cwix.com!newsfeed.cwix.com!newsfeed.yosemite.net!nntp.csufresno.edu!sn-xit-01!sn-post-01!supernews.com!news.supernews.com!not-for-mail
Message-ID: <2dggatgkelcs2t0ub7fdst8s9jgrup4c8m@4ax.com>
X-Newsreader: Forte Agent 1.8/32.548
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Complaints-To: newsabuse@supernews.com
Lines: 14
Xref: chnws06.ne.mediaone.net comp.lang.perl.misc:305485

I am looking for a regex that will do two replacements on the same
line. For example:

$test = "test1 test2 test3";
$test =~ s/1/a/g;
$test =~ s/2/b/g;
$test =~ s/3/c/g;
print $test;

The effect is that 1, 2 and 3 will be changed to a, b and c.

Can this be done on the same line?

Thanks for any input, regexes are cool!
---------------------------------

and now you can be plonked by everyone else and will never get help here
again.

uri

-- 
Uri Guttman  ---------  uri@sysarch.com  ----------  http://www.sysarch.com
SYStems ARCHitecture, Software Engineering, Perl, Internet, UNIX Consulting
The Perl Books Page  -----------  http://www.sysarch.com/cgi-bin/perl_books
The Best Search Engine on the Net  ----------  http://www.northernlight.com


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

Date: Fri, 09 Mar 2001 09:41:40 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: Can a regex do this?
Message-Id: <c39hat4bh3d8brl9n95ijqltpg1m1dsnpt@4ax.com>

blahblah wrote:

>>%mapping = ( 1 => 'a', 2 => ' b', 3 => 'c');
>>$test =~ s/([123])/$mapping{$1}/g;
>
>I'm starting to lose faith... is there no way to do it all in one
>line? I thought maybe an anchor or something could map a match to a
>replacement.

That IS one line of code. The first line merely sets up the conversion,
it's the second line that does the work. If you need to do this a 1000
times, you only have to execute 1001 statements. The setup needs to be
done only once.

I guess this looks more like your definition of  one line:

	$test =~ s/(1|2|3)/{ 1 => 'a', 2 => 'b', 3 => 'c' }->{$1}/ge;

but it will be a lot slower when repeated than the optimized version of
the former.

Your demand for one line is an artifical manufacture.

-- 
	Bart.


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

Date: Fri, 9 Mar 2001 11:03:29 +0100
From: "Jonas Nilsson" <jonni@ifm.liu.se>
Subject: Re: Can a regex do this?
Message-Id: <98a9n4$1ao$1@newsy.ifm.liu.se>

> I am looking for a regex that will do two replacements on the same
> line. For example:
>
> $test = "test1 test2 test3";
> $test =~ s/1/a/g;
> $test =~ s/2/b/g;
> $test =~ s/3/c/g;

Will this to:

$test=~s/([123])/$1 eq 1?a:$1 eq 2?b:c/ge;
/jN

--





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

Date: 9 Mar 2001 10:40:42 GMT
From: abigail@foad.org (Abigail)
Subject: Re: Can a regex do this?
Message-Id: <slrn9ahcpa.uqr.abigail@tsathoggua.rlyeh.net>

blahblah (blah@blah.com) wrote on MMDCCXLVII September MCMXCIII in
<URL:news:29sgat02lakeotdmng5line6fi0t2a8jt8@4ax.com>:
$$ 
$$ I think you need to go back and read my original post, and then you'd
$$ see that yours makes no sense whatsoever. And while you're at it, I
$$ would suggest you consult with a proctologist about removing the bug
$$ that crawled up your ass.


*plonk*


Abigail
-- 
print v74.117.115.116.32.97.110.111.116.104.101.114.
      v32.80.101.114.108.32.72.97.99.107.101.114.10;


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

Date: 9 Mar 2001 10:50:38 GMT
From: ben-fuzzybear@geocities.com (Ben Okopnik)
Subject: Re: Can a regex do this?
Message-Id: <slrn9ahdjg.qe6.ben-fuzzybear@Odin.Thor>

The ancient archives of Fri, 09 Mar 2001 00:01:08 -0600 showed
blahblah of comp.lang.perl.misc speaking thus:
>
>I think you need to go back and read my original post, and then you'd
>see that yours makes no sense whatsoever. And while you're at it, I
>would suggest you consult with a proctologist about removing the bug
>that crawled up your ass.


Oops. And I was just going to answer with a particularly clever one-liner
I wanted to show off...

*plonk*


Ben Okopnik

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
The Church of the SuperGenius continues to worship Wile E. Coyote. We are
currently denying the existence of a secret gnostic inner group, known as
the Church of Wile E. Coyote, Scientist, whose esoteric  doctrine is that
this entire world was built by ACME. -- Arthur D. Hlavaty


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

Date: Fri, 9 Mar 2001 21:39:08 +1100
From: mgjv@tradingpost.com.au (Martien Verbruggen)
Subject: Re: Can a regex do this?
Message-Id: <slrn9ahcmc.rvg.mgjv@martien.heliotrope.home>

On Thu, 08 Mar 2001 22:54:10 -0600,
	blahblah <blah@blah.com> wrote:
> On 9 Mar 2001 04:13:31 GMT, sholden@pgrad.cs.usyd.edu.au (Sam Holden)
> wrote:
> 
>>$test =~ s/([123])/{1 => 'a', 2 => ' b', 3 => 'c'}->{$1}/ge;
> 
> This does not work because it's utilizing parts of the perl language
> and not regexes.

Uhmmm... Don't know if you ever noticed it, but the right bit of s///
always uses 'parts of the perl language'. The only bit that is a regex
is the left bit.

What exactly is your obseesion about doing this with a single regex?

s/(\d)/chr($1 + 96)/eg;

Of course, the above also uses "part of the perl language". It uses chr.
It uses $1/. It uses s///eg. And it uses $_. Pity. That doesn't count.
Oh, and you have to be on a machine that uses ASCII, or a character set
that is identical to ASCII between characters 49 to 51 and 97 to 99.

>>%m=( 1 => 'a', 2 => ' b', 3 => 'c');$test =~ s/([123])/$m{$1}/g;
> 
> Because that's two lines of code, not one.

No, it's one line. If you get hung up about the semicolon, replace it
with something else:

%m = ( 1 => 'a', 2 => ' b', 3 => 'c'),    $test =~ s/([123])/$m{$1}/g;
%m = ( 1 => 'a', 2 => ' b', 3 => 'c') and $test =~ s/([123])/$m{$1}/g;
%m = ( 1 => 'a', 2 => ' b', 3 => 'c') or  $test =~ s/([123])/$m{$1}/g;

Any of those will do. There are others.

> Looks like it can't be done!

You have been shown several ways to do this. You're making up arbitrary
restrictions, which make no sense (only a regex!). The following would
also definitely prohibit it:

1 - It has to be Wednesday for all values of test.
2 - The banana has to be peeled
3 - You can't use Perl
4 - It has to be done in Perl
5 - You can't use number 6
7 - You can't use letters d, g, r, s, w, and y
8 - It has to be exactly 3.14159265358979 lines long.
9 - You have to be standing on one leg, singing the national anthem of
    Macedonia, while drinking a glass of water and balancing an unbrella
	on your nose.
10- But most importantly, you can't do it! because I say so!

Martien
-- 
Martien Verbruggen              | 
Interactive Media Division      | life ain't fair, but the root
Commercial Dynamics Pty. Ltd.   | password helps. -- BOFH
NSW, Australia                  | 


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

Date: Fri, 9 Mar 2001 21:43:16 +1100
From: mgjv@tradingpost.com.au (Martien Verbruggen)
Subject: Re: Can a regex do this?
Message-Id: <slrn9ahcu4.rvg.mgjv@martien.heliotrope.home>

On Thu, 08 Mar 2001 23:58:44 -0600,
	blahblah <blah@blah.com> wrote:
> On Thu, 8 Mar 2001 23:31:07 -0600, "Charles K. Clarkson"
><c_clarkson@hotmail.com> wrote:
> 
> Arrrgh, and it's seems so close too! Unfortunately, .net and
> jakarta-oro don't like it, the test variable never gets changed. I'm

You've been wasting our time with a Java problem, not even understanding
what you are doing. This is a Perl group. You don't understand what
regexen are for. They are for MATCHING things. Not replacing things.

You have some bloody nerve.

*plonk*

Martien
-- 
Martien Verbruggen              | 
Interactive Media Division      | That's funny, that plane's dustin'
Commercial Dynamics Pty. Ltd.   | crops where there ain't no crops.
NSW, Australia                  | 


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

Date: 9 Mar 2001 10:51:58 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Count matches?
Message-Id: <98acke$j4m$1@mamenchi.zrz.TU-Berlin.DE>

According to Godzilla! <godzilla@stomp.stomp.tokyo>:
 
> Ask a whatever questions and...
> 
> Whatever!

Uh, professor?  Come again?

Anno


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

Date: Fri, 9 Mar 2001 09:20:03 -0000
From: "Chris45" <sat_ring@hotmail.com>
Subject: Re: file share
Message-Id: <98a6jo$112c5$1@ID-54577.news.dfncis.de>

Thanks Eric ,
Will try out this weekend will let you know how I get on.
Regards
Chris
Http://www.aqua.org.uk

"Eric" <mail@ericmarques.net> wrote in message
news:YsSp6.12083$PF4.17741@news.iol.ie...
> www.ericscgi.com
> FTC 1.0 Beta 2
>
>
> --
> Eric Marques
> mail@ericmarques.net
>
> "Chris45" <sat_ring@hotmail.com> wrote in message
> news:988pbp$ncp3$1@ID-54577.news.dfncis.de...
> > Hi ,
> > I'm looking for a cgi script that will work like yahoo's file share. One
> > that you can upload a file by your browser and it will write a link to
the
> > file and maybe comments. Cost hopefully free .I think
> > Post Board 0.1b by Stephen is what I may need but all link to it at
> > http://www.itm.com/ are dead .
> >
> > Thanks for your help
> > Chris
> >
> >
> >
>
>




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

Date: Fri, 09 Mar 2001 10:00:30 GMT
From: "Suzanne" <dream1625@aol.com>
Subject: Re: Help to Install Perl
Message-Id: <2R1q6.163687$B6.36693885@news1.rdc1.md.home.com>

Perhaps you are a shut-in ... I am not.  I have an account from work, from
AOL, from Mindspring and cable ....  tsk tsk tsk ..... crime of the century

__________________________________________
Suzanne @CampusTech
http://www.campustech.com   Beta Site: http://campust.iserver.net/
Big Discounts on Software for Students & Teachers



Damian James <damian@qimr.edu.au> wrote in message
news:slrn9agbog.412.damian@puma.qimr.edu.au...
> Thus spake Chris Stith on Thu, 08 Mar 2001 17:40:08 -0000:
> >...
> >Perhaps a score-down of 3000?
> >
> >*dekaplonk* *dekaplonk* *dekaplonk*
> >(tin plonks by 100 points by default ;-)
> >
>
> Hell, I went straight to -9999 (slrn), but then, I am not American (aside:
> you used to ba able to get t-shirts here with 'I am not American' in
English
> and Arabic). I was annoyed when she turned out to be posting from multiple
> addreses, but that was easy enough to fix.
>
> Cheers,
> Damian
> --
> "Monitoring a nuclear power plant? Well... maybe not. Not sure I'd trust
>  C for this either as a core dump could lead to, well, a core dump."
>                                 -- Michael Carman in comp.lang.perl.misc




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

Date: Fri, 09 Mar 2001 10:00:48 GMT
From: "Suzanne" <dream1625@aol.com>
Subject: Re: Help to Install Perl
Message-Id: <kR1q6.163688$B6.36693987@news1.rdc1.md.home.com>

Give it a rest ... you Perl people take yourselves and life entirely too
seriously.

Regards
Suzanne
Note:  Reponse posted at top
__________________________________________
Suzanne @CampusTech
http://www.campustech.com   Beta Site: http://campust.iserver.net/
Big Discounts on Software for Students & Teachers



Scott R. Godin <webmaster@webdragon.munge.net> wrote in message
news:98a1b5$t00$3@216.155.32.134...
> In article <%qKp6.161592$B6.36271990@news1.rdc1.md.home.com>, "Suzanne"
> <sbucciarelli1@home.com> wrote:
>
> [snip]
>  | accomplished.  As for "top posting" ... not familiar with any
>  | particular etiquette ... if that means
> [snip]
>
> as for 'top-posting' here's some informational stuff you can peruse, as
> to why it's bad form, bad nettiquette, wasteful of resources, and can
> and will cause people to simply ignore your posts ( I kid you not )
>
> This is akin to a "dress code" here and IS something that the perl
> masters and gurus who post here will tend to insist on.
>
> Top posting wouldn't even exist if some bright young and stupid
> MicroSoft programmer hadn't written the app to use that as the 'default'
> instead of following usenet convention for this purpose. (visualizing MS
> inter-company e-mail, all top-posted and containing zillions of lines of
> previous text that no one ever reads along with every single .sig of
> every previous poster. and laughing.)
>
> anyway, the links I promised:
>
> [ Please put your comments *following* the quoted text that you
>   are commenting on.
>
>   Please do not quote an entire article. (notice that I snipped your
> post -- usenet has 'references' to previous articles that can be used --
> there's ABSOLUTELY NO NEED to include the entire previous article in a
> follow-up as long as you follow-up properly. notice at the top of my
> post it even kindly INCLUDES the reference to the previous article! :)
>
>   Please do not quote .sigs. (I snipped your .sig too, following
> standard usenet convention)
>
>   Please see:
>      http://www.geocities.com/nnqweb/nquote.html
>      http://www.uwasa.fi/~ts/http/quote.html
>      http://www.btinternet.com/~chiba/sbox/topposters.html
>
>   Thank you.
>
>   Jeopardectomy performed. (it's called Jeopardy-style after the
> gameshow "Jeopardy")
> ]
>
> I hope you find this useful information. I hope you decide to stop
> top-posting based on the knowledge you gain from this information. I
> hope you don't think I'm flaming you in ANY way shape or form. (I'm not
> -- I'm being informative and helpful)
>
> --
> unmunge e-mail here:
> #!perl -w
> print map {chr(ord($_)-3)} split //, "zhepdvwhuCzhegudjrq1qhw";
> # ( damn spammers. *shakes fist* take a hint. =:P )




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

Date: 9 Mar 2001 10:14:30 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Help to Install Perl
Message-Id: <98aae6$gj7$1@mamenchi.zrz.TU-Berlin.DE>

According to Suzanne <sbucciarelli1@home.com>:
> Give it a rest ... you Perl people take yourselves and life entirely too
> seriously.

That may be as it may.  Your opinion about it definitely carries no
weight around here.

Anno


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

Date: Fri, 09 Mar 2001 10:24:19 GMT
From: "Suzanne" <dream1625@aol.com>
Subject: Re: Help to Install Perl
Message-Id: <nb2q6.163689$B6.36698272@news1.rdc1.md.home.com>

So what ... I still have the right to express it.

Suzanne from CampusTech with multiple ISP providers .... sing a bar of
zippity do dah and have a nice day.
__________________________________________
Suzanne @CampusTech
http://www.campustech.com   Beta Site: http://campust.iserver.net/
Big Discounts on Software for Students & Teachers



Anno Siegel <anno4000@lublin.zrz.tu-berlin.de> wrote in message
news:98aae6$gj7$1@mamenchi.zrz.TU-Berlin.DE...
> According to Suzanne <sbucciarelli1@home.com>:
> > Give it a rest ... you Perl people take yourselves and life entirely too
> > seriously.
>
> That may be as it may.  Your opinion about it definitely carries no
> weight around here.
>
> Anno




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

Date: Fri, 09 Mar 2001 05:37:34 -0400
From: DBA+ <oracle@zonai.com>
Subject: Help! apache->cgi->perl->dbi->mysql error
Message-Id: <3AA8A45E.88A7D48C@zonai.com>

I made a perl script to query some table in an MySQL database using the
DBI and it runs without a problem from the shell as root      BUT
when I try to execute it from the browser it aborts with an "MySQL could
not connect thru socket '/var/local/mysql/mysql.sock'". I suspect that
some environment variable is missing in this process because I get the
same error when I try to execute the script logged as a regular user.
Any help will be greatly super-appreciated.

Thanks in advance

Marcos



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

Date: Fri, 09 Mar 2001 08:57:51 GMT
From: mnc@admin.u.nu (Miguel Cruz)
Subject: Re: Hidden URL
Message-Id: <jW0q6.1095$8I5.753918@typhoon2.ba-dsg.net>

Hilda <hilda@invopower.com> wrote:
>> 1. Frame the new page.
>
> But i am not quite sure how to frame a new page, can u give me an example?

I think I would be pushing the boundaries of this newsgroup a bit much with
that. Try comp.infosystems.www.authoring.html, where there are zillions of
people who eat this stuff up.

miguel


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

Date: Fri, 09 Mar 2001 08:59:06 GMT
From: mnc@admin.u.nu (Miguel Cruz)
Subject: Re: Hidden URL
Message-Id: <uX0q6.1096$8I5.754028@typhoon2.ba-dsg.net>

Godzilla! <godzilla@stomp.stomp.tokyo> wrote:
>> ...want to open a new page without the user knowing the IP
>
> http://www.nwi.net/~pchelp/obscure.htm

Very browser-specific. A mildly interesting parlor trick, but not
particularly useful for a web site you want to be sure everyone can see.

miguel


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

Date: Fri, 09 Mar 2001 01:23:17 -0800
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: Hidden URL
Message-Id: <3AA8A105.6D6F8BB5@stomp.stomp.tokyo>

Miguel Cruz wrote:
 
> Godzilla! wrote:

> >> ...want to open a new page without the user knowing the IP

> > http://www.nwi.net/~pchelp/obscure.htm
 
> Very browser-specific. A mildly interesting parlor trick, but not
> particularly useful for a web site you want to be sure everyone can see.

 
Direct your comments to the originating author. I have
asked no questions nor do I find your comments to be
relationally pertinent.

Godzilla!


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

Date: Fri, 09 Mar 2001 09:08:32 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: How to convert morse to ascii using perl?
Message-Id: <487hat8311i2h1vkeg61jbntcvnjn8b2b4@4ax.com>

John Lin wrote:

>"Logan Shaw" wrote
>> >  LS> @backwards{ values %morse_hash } = keys %morse_hash;
>>  My way could be a little weird
>> if keys %morse_hash is shorter than values %morse_hash
>
>I have a question: can this happen?  (keys shorter than values, or vice versa)

No. keys and values always return the same number of items, and they're
always in sync, so the third item of values always is the value of the
third item of keys. That's what they're  designed for.

What may happen, is that you have duplicate values. So if you reverse a
hash this way, you'll get a smaller hash than the one you started from.
Well, it's the latest, i.e. rightmost, assignment that sticks.

	@hash{qw(a b a c a d)} = (1..6);
	print $hash{a};  # 5

-- 
	Bart.


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

Date: Fri, 9 Mar 2001 17:52:21 +1000
From: "Brucie" <althtml@brucies.com>
Subject: Re: Newbies welcome
Message-Id: <3aa88c81$0$25473$7f31c96c@news01.syd.optusnet.com.au>


"Raman Sinha" <raman@raman-sinha.com> wrote in message
news:B6CDBC5D.4FF5%raman@raman-sinha.com...

| some people simply don't know *how* to look.

i agree, sometimes i would have liked to beat a person senseless because
they couldn't grasp the concept of a search engine and how to use one.

but a bad teacher always blames the student

--
Brucie
BAHB
http://www.brucies.com/althtml/





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

Date: 9 Mar 2001 09:14:01 GMT
From: abigail@foad.org (Abigail)
Subject: Re: Perl fortune database - where? (was: Dynamic naming of arrays or hashes)
Message-Id: <slrn9ah7mp.t8e.abigail@tsathoggua.rlyeh.net>

David H. Adler (dha@panix2.panix.com) wrote on MMDCCXLVII September
MCMXCIII in <URL:news:slrn9agog1.ha8.dha@panix2.panix.com>:
-: 
-: and, in case anyone cares, my sigfile has a number of perlish things in
-: it as well: http://www.panix.com/~dha/randsig.html


Interesting. Last modified: Sun Oct 18 14:56:16 1998, but it contains
quotes made in 2000.



Abigail
-- 
perl -wle 'print "Prime" if ("m" x shift) !~ m m^\m?$|^(\m\m+?)\1+$mm'


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

Date: Fri, 09 Mar 2001 10:50:57 +0100
From: "Alexander Farber (EED)" <eedalf@eed.ericsson.se>
Subject: Re: print abstract ('blah'); # subroutine or file handle?
Message-Id: <3AA8A781.CA3396EB@eed.ericsson.se>

Joe Schaefer wrote:
> > > The problem occurs because at this point in the parsing, perl
> > > does not know of any subroutine named 'abstract'. If it did
> > > know that you would be defining such a subroutine, then it
> > > would do the Right Thing.
> >
> > But I also haven't opened any file handle called
> > "abstract". So the perl-parser is not consistent here.
> 
> From perlsub:
> 
>        To call subroutines:
> 
>            NAME(LIST);    # & is optional with parentheses.
> >>>>>>     NAME LIST;     # Parentheses optional if predeclared/imported.
>            &NAME;         # Makes current @_ visible to called subroutine.
> 
> Your problem has nothing to do with file handles.

It does: I am calling "print NAME (LIST)" with parentheses


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

Date: Fri, 09 Mar 2001 09:17:34 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: Regex to quote XML attributes?
Message-Id: <hr7hat0pgr8k6rujauqfpjfucgru915qup@4ax.com>

Rafael Garcia-Suarez wrote:

>Or, you can search the CPAN for a SGML-parser module.

In fact, HTML::Parser can parse the common SGML syntax pretty well,
irrespective on the tag types. I think it would choke on the <tag/>
syntax. And tags are case insensitive, which is also different from in
XML. But in this case, it might just work.

-- 
	Bart.


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

Date: Fri, 09 Mar 2001 10:32:57 +0100
From: =?iso-8859-1?Q?Thorbj=F8rn?= Ravn Andersen <thunderbear@bigfoot.com>
Subject: Re: Regex to quote XML attributes?
Message-Id: <3AA8A349.E37161CF@bigfoot.com>

Matt Sergeant wrote:
> 
> Jesse Sheidlower wrote:
> >
> > I have a lot of data in a flavor of SGML that I need to convert
> > to XML so I can process it with XML::Parser. Most of the
> > discrepancies are trivial, and I've been able to deal with them
> > (for instance, the original uses "." instead of ";" as the
> > terminator for entity references, so I used "s/(&\w+)./\1;/g;").
> >
> > But I'm having some trouble with the attributes; the original
> > doesn't ever quote them, so a tag could be:
> > <e date=2001 changed=no id=2938223>, and I need this to be
> > <e date="2001" changed="no" id="2938223"> or XML::Parser chokes
> > on it.
> >
> > I've tried a few different things, and every one has either
> > missed some attributes or has scattered quotation marks with
> > abandon throughout my data. Can someone suggest a solution?
> 
> XML Tidy will let you convert SGML to XML. You can get it from the W3C.

Certain?  I thought it just converted HTML to XHTML.

If you have a SGML-DTD for the SGML-file you can use SX from
www.jclark.org to convert it to XML.  Others have reported that Omnimark
can do the same.

-- 
  Thorbjørn Ravn Andersen              "...sound of...Tubular Bells!"
  http://bigfoot.com/~thunderbear


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

Date: 9 Mar 2001 10:57:26 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Ties
Message-Id: <98acum$j4m$2@mamenchi.zrz.TU-Berlin.DE>

According to Hernux <hernux@etherac.com.ar>:
> Where can i find a good tutorial of Ties.....to know how to save more
> memory, and when should i use them

Tie in itself doesn't save memory.  Tying a hash to a database file
does, in a way.  For these see (for instance) perldoc DB_File.

Anno


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

Date: 9 Mar 2001 09:40:44 GMT
From: lvirden@cas.org
Subject: Re: Tk based alarm clock
Message-Id: <98a8es$4qd$3@srv38.cas.org>


According to * Tong *  <sun_tong_001@yahoo.com>:
:Here is what I've found and the reason that I don't like
:personally:
:
:xalarm clock: C based.
:alarm clock in tkgoodstuff: too simple and not stand alone. 
:
:Beside, a search in all news in comp.lang.* on alarm/Tk turns out
:nothing.... 

Did you have a chance to check some of the Tcl software catalogs, such as
<URL: http://www.purl.org/NET/Tcl-FAQ/part4.html> ?  There I see

What: aclock (Lehenbauer)
Where: From the contact
	alt.sources archives such as the following (Nov 1992)
	<URL: ftp://ftp.sterling.com/usenet/alt.sources/>
	<URL: ftp://wuarchive.wustl.edu/usenet/alt.sources/articles/>
	<URL: ftp://src.doc.ic.ac.uk:/usenet/alt.sources/articles/>
	<URL: http://www.leo.org/pub/comp/usenet/alt.sources/>
Description: Tk analog clock script - two versions were posted.
Updated: 05/1999
Contact: <URL: mailto:karl@NeoSoft.com> (Karl Lehenbauer)

What: bclock
Where: From the contact
Description: Tk clock program which uses a bezier curve to draw the hands.
Updated:
Contact: <URL: mailto:shess@tundra.winternet.com> (Scott Hess)

What: biff clock
Where: From the contact
	alt.sources archives (Nov 1992)
	<URL: ftp://ftp.sterling.com/usenet/alt.sources/>
	<URL: ftp://wuarchive.wustl.edu/usenet/alt.sources/articles/>
	<URL: ftp://src.doc.ic.ac.uk:/usenet/alt.sources/articles/>
	<URL: http://www.leo.org/pub/comp/usenet/alt.sources/>
Description: Tk example program showing biff and xclock like functions
Updated: 05/1999
Contact: <URL: mailto:karl@NeoSoft.com> (Karl Lehenbauer)

What: cfclock
Where: <URL: http://brahms.fmi.uni-passau.de/bs/staff/friedric.shtml>
Description: Clock which displays time in words rather than numbers or hands.
Updated: 09/1996
Contact: <URL: mailto:friedric@fmi.uni-passau.de> (Carsten Friedrich)

What: Clock (Analog)
Where: From the contact
Description: Graphical representation of non-digital clock.
Updated:
Contact: <URL: mailto:karl@NeoSoft.com> (Karl Lehenbauer)

What: FileMan
Where: <URL: http://www.bongo.demon.co.uk/fileman/>
Description: File Manager with multi-window views, drag and drop,
	private trashcan, event logging, configurable menus, file types,
	double click operations, toolbox, button bar, security,
	file splitting, file encoding/decoding/compression/spell checker/
	word counting, file copy/move/deletion/viewing/editing/sorting,
	program launching, archive creation/extraction, configurable
	icons, intelligent links, progress meter and clock,
	tested on AIX/UNIXWARE/UPUX/LINUX,
Updated: 11/1997
Contact: <URL: mailto:filem@bongo.demon.co.uk>

What: mickey mouse clock
Where: From the contact
Description: A simple Tk clock which displays Mickey Mouse.
Updated:
Contact: <URL: mailto:sandler@udel.edu> (Michael Sandler)

What: monitor
Where: <URL: http://www.isi.edu/%7Ejohnh/SOFTWARE/MONITOR/>
Description: Tcl/tk based system monitor, with modules for
	clock, mail, PPP, batter, POP mail access, appointments, and
	positioning info.  Originally written in Tcl 7.5
Updated: 07/2000
Contact: <URL: mailto:johnh@isi.edu> (John Heidemann)

What: Netscape client Tcl plugin and Tclets
Where: <URL: http://www.demailly.com/tcl/plugin/>
	<URL: http://home.netscape.com/>
	<URL: ftp://ftp.demailly.com/pub/tclplug20-x86-linux-glibc.tar.gz>
	<URL: http://dev.scriptics.com/download/plugin.html>
	<URL: http://lheawww.gsfc.nasa.gov/docs/xray/astroe/tako/plugin/>
	<URL: ftp://ftp.neosoft.com/languages/tcl/sorted/packages-8.0/devel/tclplug21b1-unoff.exe>
Description: A Tcl/Tk plugin for Netscape Navigator 3.x ,
	Communicator 4.x and Internet Explorer 3.x is available.
	Originally written by staff working for Sun, now that they have
	spun off into AjubaSolutions, the code was taken over by one of the
	original programmers.
	Binaries exist for Solaris 1 and 2 (SPARC and INTEL), Macintosh,
	Windows 95 or NT, and Linux.  HP-UX and IRIX binaries have been
	reportedly sited around the internet.
	Some newsgroup postings seem to imply that the plugin has also
	been able to be used on the Windows platform with Opera and
	theOther browser.
	The plugin enables support for Tcl/Tk 8.0 (in 2.0.x) Tclets
	embedded in an HTML page to be displayed interactively.
	As you read thru the above pages, you will also find
	demo pages for 2.0 Tclets which contain demos of
	sending email, inline Tclets, pack demo,
	javascript features and security policy,
	persistence and data sharing, tkconsole, 'version indicator' Tclet,
	draggable text demos, engraved text, bezier curve clock, a tcl ruler,
	interactive floor plan, calculator, tetris, 15 puzzle,
	animated coffee cup, eyes following mouse, ticker tape,
	line drawing program, mouse event tracing, oval drawing,
	bike gear ratio calculation, biorythms, mortgage calculator,
	and card game.
	A tutorial and FAQ for the plugin are also available.
	TclPlugin 2.0.x, because of its roots in Tk 8.0., provides native
	look and feel for Tclets.  Several new security policies are provided.
	Faster loading of Tclets are now possible.  Dynamic loading of
	Tcl extensions is now supported, when the plugin uses an external
	process to host Tclets.  It also supports a console for debugging.
	An updated version of the Windows binary plugin provides support for
	the latest Netscapes and Internet Explorers, works on Windows 95/98/NT,
	based on Tcl/Tk 8.2.1, and h as the plus, dash, and Img patches applied
	and supports stub enabled extensions.
Updated: 10/1999
Contact: <URL: mailto:tclplug@demailly.com>

What: Netscape client Tcl Tclets (NeoSoft)
Where: <URL: http://www.neosoft.com/tcl/plugin/demos/default.html>
Description: Digital clock, analog clock, modern clock,
	variable speed filmstrip player, reversible filmstrip player.
Updated: 09/1996
Contact: <URL: mailto:karl@neosoft.com>

What: oh-clock
Where: <URL: ftp://ftp.neosoft.com/languages/tcl/sorted/packages-7.6/games/oh-clock-1.0/oh-clock-1.0.tar.gz>
Description: Old Hacker's Clock... an unusual clock.
Updated: 08/1998
Contact: <URL: mailto:erix@mclink.it> (Enrico Colombini)

What: tiny beat watch
Where: <URL: http://www.tomix.de/niels/soft/tbwatch/>
Description: Tcl/Tk clock that displays NetBeat time.
	Currently at version 0.1.3.
Updated: 02/2000
Contact: <URL: mailto:niels.ott@gmx.de>

What: TkChrom
Where: <URL: http://www.cs.berkeley.edu/%7Ephelps/tcltk/>
	<URL: ftp://ftp.neosoft.com/languages/tcl/sorted/packages-7.6/apps/tkchrom-1.1/tkchrom-1.1.gz>
Description: A clock (patterned after xchrom) that uses the orientation
	of a wedge in a circle to indicate the time.
Updated: 11/1998
Contact: <URL: mailto:phelps@cs.berkeley.edu> (Tom Phelps)

What: tkgoodstuff
Where: <URL: http://www-personal.umich.edu/%7Emarkcrim/tkgoodstuff/> ???
	<URL: ftp://merv.philosophy.lsa.umich.edu/pub/tkgoodstuff.tgz> ???
	<URL: ftp://merv.philosophy.lsa.umich.edu/pub/in-progress/tkgoodstuff4.1.tgz> ???
	<URL: ftp://merv.philosophy.lsa.umich.edu/pub/in-progress/tkgoodstuff8.0.tgz> ???
	<URL: ftp://ftp.neosoft.com/languages/tcl/sorted/packages-7.6/x11/tkgoodstuff4.1/tkgoodstuff4.1.tar.gz>
	<URL: ftp://ftp.neosoft.com/languages/tcl/sorted/packages-7.6/x11/tkgoodstuff4.2.b1-7/tkgoodstuff4.2.b1-7.tar.gz>
Description: A Tk 4.x based configurable desktop button panel.  Supports
	a clock, biff, PPP/SLIP/TERM net link GUI dialer, POP/IMAP
	mail fetch scheduler, launcher for www browser, note taker
	calendar/alarm support, system load monitor, Webster dictionary client,
	calculator, file watcher, tkman launcher,
	button bars, stacks, fvwm support, etc. Requires Tk 4.1.
	The 8.0 version is an alpha version that works with Tk 8.0a1.
Updated: 02/1997
Contact: <URL: mailto:markcrim@umich.edu> (Mark Crimmins)

What: tkNewMail
Where: <URL: http://www.schooner.com/%7Eloverso/tcl-tk/>
Description: Tk 4.1 replacement for xbiff.  Can report on new mail in
	several ways, including using POP directly, or using MH folders,
	can work with exmh, and includes a clock.
Updated: 12/1998
Contact: <URL: mailto:John@LoVerso.Southborough.MA.US> (John Robert LoVerso)

What: twoClocks
Where: <URL: ftp://ftp.neosoft.com/languages/tcl/sorted/packages-7.6/x11/twoClocks.tcl/twoClocks.tcl.gz>
Description: Two different kinds of clock.
Updated: 02/1997
Contact: <URL: mailto:read@oracle.lanl.gov> (Charles Read) ???

What: Wafe
Where: <URL: http://www.wu-wien.ac.at/wafe/wafe.html>
	<URL: http://www.wu-wien.ac.at/wafe/www/wafe-packages.html>
		<URL: http://nestroy.wi-inf.uni-essen.de/wafe/wafe.html>
		<URL: ftp://ftp.wu-wien.ac.at/pub/src/X11/wafe/1.0.19/>
		<URL: ftp://ftp.wu-wien.ac.at/pub/src/X11/wafe/1.0.19/wafe-1.0.19.tar.gz>
		<URL: ftp://ftp.wu-wien.ac.at/pub/src/X11/wafe/Xaw3d-1.3.2-src.tar.gz>
		<URL: http://nestroy.wi-inf.uni-essen.de/wafe/Cineast/video.html>
	<URL: http://www.inria.fr/koala/jml/jml.html>
Description: Tcl binding to Xt and various widget sets like Athena (Xaw3d),
	OSF/Motif (1.1 to 2.0), and others.  At the above FTP site are
	many other associated tar files, such as Linux binaries, Xaw3d,
	documentation, etc.  Wafe can be used as a frontend for programs
	in abitrary programming languages (there are many example programs
	written in Perl contained in the package). As of version v1.0.18
	Wafe supports the Kino widget class, Mosaic HTML widget, plotter
	widgets, XmGraph widget, Layout widget, tree widget, XbaeMatrix
	widget, Ghostview widget, Eurobridge widget, analog clock widget,
	most of the FWF widget classes, libWWW, LDAP library and more.
	Wafe supports graphic formats such as XBM, XPM, GIF, JPEG,
	and PNG.  Various object oriented Tcl extensions such as OTcl
	or itcl are also supported.  SSLEAY is supported.  Available in
	RedHat's .rpm format.  The current version
	supports Tcl 8.0, SSL streams, the choice of Tcl
	or Xt event loop, as well as a number of new modules.  Package
	includes cineast, an extensible WWW browser, written using Otcl
	and Wafe.  Other sample applications, such as htmlEdit, cpu-bars,
	gsv, pinger, xwafemail, etc. are also included.
	In version v1.0.19, Tcl_Objects are supported, UTF support when
	used with Tcl 8.1, Knvas widgets, Kino-2 widgets.
Updated: 06/1998
Contact: <URL: mailto:wafe@wu-wien.ac.at> (WaFE mailing list)


-- 
-- 
"See, he's not just anyone ... he's my son."  Mark Schultz
<URL: mailto:lvirden@cas.org> <URL: http://www.purl.org/NET/lvirden/>
Even if explicitly stated to the contrary, nothing in this posting


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

Date: Fri, 09 Mar 2001 09:32:02 +0100
From: =?iso-8859-1?Q?Thorbj=F8rn?= Ravn Andersen <thunderbear@bigfoot.com>
Subject: Re: Use PERL or Java? Which is faster?
Message-Id: <3AA89502.4170C655@bigfoot.com>

Matt Sergeant wrote:
> 
> Thorbjørn Ravn Andersen wrote:
> >
> > Daniel Berger wrote:
> >
> > > As for speed, I have *yet* to see a Java app that was as fast or faster than Perl/Tk,
> > > or Perl in general for that matter.
> >
> > I parse XML with Java because it is a _lot_ faster than with Perl.
> 
> Not necessarily, since Perl can interface to C based parsers. See the work
> being done on Orchard right now. Though yes, in the general case and with
> currently released libraries this tends to be true.

Don't get me wrong.  I would much rather have a free choice, but the
current mature technologies available to me as a Perlprogrammer is
simply not fast enough.

I'm keeping an eye on it though.
-- 
  Thorbjørn Ravn Andersen              "...sound of...Tubular Bells!"
  http://bigfoot.com/~thunderbear


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

Date: Fri, 09 Mar 2001 09:38:30 +0100
From: =?iso-8859-1?Q?Thorbj=F8rn?= Ravn Andersen <thunderbear@bigfoot.com>
Subject: Re: Use PERL or Java? Which is faster?
Message-Id: <3AA89686.6F924D0B@bigfoot.com>

brian d foy wrote:

> do you have some benchmarks for whatever you were doing?  it would
> be interesting to see the relative speeds. :)

Not off-hand, as the Java-application I use now do not have a equivalent
Perl counterpart, but quite a bit (I seem to recall 3-5 times faster).

The problem (as I understand it from Matt Sergent) is that it is
expensive to do the call-back from C to Perl for each event, and there
is a _lot_ of those.

It was faster to have well-printed XML-files and then use nasty regexps
to parse each line.

-- 
  Thorbjørn Ravn Andersen              "...sound of...Tubular Bells!"
  http://bigfoot.com/~thunderbear


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

Date: Fri, 09 Mar 2001 08:32:27 GMT
From: Jerome Abela <Jerome.Abela@free.fr>
Subject: Re: What information can I get from a GLOB reference?
Message-Id: <3AA893F4.16CE9466@free.fr>

John Lin a écrit :
> print map {"[$_]"} keys %{*{$fh}};  # Of course this doesn't work

I believe *foo{THING} is NOT a hash access. It's just the way to access
glob members, which happens to use the same syntax as hash syntax.


Jerome.

-- 
 ()    Campagne du ruban ascii...
 /\    Contre les mails en HTML et les pièces jointes Micros~1


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

Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 16 Sep 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.  

| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.

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 452
**************************************


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