[18957] in Perl-Users-Digest
Perl-Users Digest, Issue: 1152 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Jun 18 11:05:47 2001
Date: Mon, 18 Jun 2001 08: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)
Message-Id: <992876711-v10-i1152@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Mon, 18 Jun 2001 Volume: 10 Number: 1152
Today's topics:
Re: A question on some basic things <bowman@montana.com>
Re: A question on some basic things <pne-news-20010618@newton.digitalspace.net>
Re: Access Sybase from PERL on NT <mpeppler@peppler.org>
Re: Add LDAP entry <pne-news-20010618@newton.digitalspace.net>
Re: Best way for batch renaming specific files <john.imrie@pa.press.net>
Re: Best way for batch renaming specific files <krahnj@acm.org>
Re: compiling with perl <patelnavin@icenet.net>
creating perl variable from C <sgrover@delsoft.com>
Re: creating perl variable from C (Anno Siegel)
Re: creating perl variable from C <sgrover@delsoft.com>
Re: creating perl variable from C (Anno Siegel)
Re: having trouble with system <me@grimblefritz.com>
Re: help with regexp? (Dave Bailey)
Re: help with regexp? <gnarinn@hotmail.com>
Looking for DB Extension for Perl v5 to work with Oracl <czajko@ocas.on.ca>
Re: more than one execution for wait? <pne-news-20010618@newton.digitalspace.net>
New posters to comp.lang.perl.misc <gbacon@cs.uah.edu>
Newbie: Problems with Unicode::String <o.moser@mobilkom.at>
Re: Newbie: Problems with Unicode::String <pne-news-20010618@newton.digitalspace.net>
Perl on Win32. <f_dubru@yahoo.com>
Re: Perl on Win32. <pne-news-20010618@newton.digitalspace.net>
Re: Perl on Win32. <krahnj@acm.org>
Re: Perl on Win32. <bart.lateur@skynet.be>
Re: PPM (Helgi Briem)
Re: Printing filenames that are in a directory <john.imrie@pa.press.net>
Re: Problem with redirect (with IE and not with Netscap <cpryce@pryce.net>
Re: Server Side Includes on IIS <cpryce@pryce.net>
Re: Sorting hash <ren@tivoli.com>
Re: Sorting hash (Anno Siegel)
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 18 Jun 2001 07:35:34 -0600
From: "bowman" <bowman@montana.com>
Subject: Re: A question on some basic things
Message-Id: <WpnX6.176$3o4.2245@newsfeed.slurp.net>
"Bernard Chan" <khchan2@csis.hku.hk> wrote in message
news:3B2D71A5.8000202@csis.hku.hk...
> I would like to know why it is incorrect to say that
> execution of compiled programs is often faster than
> that of interpreted programs.
because compiled programs are ALWAYS faster???
------------------------------
Date: Mon, 18 Jun 2001 15:58:52 +0200
From: Philip Newton <pne-news-20010618@newton.digitalspace.net>
Subject: Re: A question on some basic things
Message-Id: <h32sit0bl7nl1cnc26edh5ml8q17aoqukn@4ax.com>
On Mon, 18 Jun 2001 07:35:34 -0600, "bowman" <bowman@montana.com> wrote:
>
> "Bernard Chan" <khchan2@csis.hku.hk> wrote in message
> news:3B2D71A5.8000202@csis.hku.hk...
> > I would like to know why it is incorrect to say that
> > execution of compiled programs is often faster than
> > that of interpreted programs.
>
> because compiled programs are ALWAYS faster???
Not always.
This perl script:
#!/usr/bin/perl
exit;
should finish faster than this C program after it's compiled:
int main(void) { while(1); return 0; }
You're comparing apples with onions. And you can't even compare, say, a
C interpreter with a C compiler since the difference depends not only on
"compiled vs interpreted" but also, for example, on the quality of the
compiler or interpreter (as is seen by the fact that some compilers are
considered "better" than others).
cheers,
Philip
--
Philip Newton <nospam.newton@gmx.li>
Yes, that really is my address; no need to remove anything to reply.
If you're not part of the solution, you're part of the precipitate.
------------------------------
Date: Mon, 18 Jun 2001 07:46:24 -0700
From: "Michael Peppler" <mpeppler@peppler.org>
Subject: Re: Access Sybase from PERL on NT
Message-Id: <tis521omq94ad9@corp.supernews.com>
In article <db67a7f3.0106160724.36e9b72d@posting.google.com>, "isterin"
<isterin@hotmail.com> wrote:
> David Busby <dbusby3@slb.com> wrote in message
> news:<3B2A6B46.230A1369@slb.com>...
>> Does anyone know how to access sybase from PERL running on NT with IIS.
>
> Yes. Are you trying to access from a non wintel platform, or are both
> the Perl script and the server on the wintel platform?
>
>> I have tried several times but keep getting the error that for some
>> reason PERL can't load the sybperl::dblib or sybperl::ctlib dll files
>> from dynaloader.pm. If anyone has any suggestions please let me know.
>
> Did you install DBI/DBD::Sybase successfully? If yes let's see a snip
> of your code.
He's trying to use the Sybase::* modules (aka sybperl). I think he's
installed the ActiveState versions of these modules, but I'm not sure.
In any case he needs to make sure that the Sybase client libraries are
properly installed.
Michael
>> Thanks in advance.
>>
>> Please send email to dbusby@houston.geoquest.slb.com
--
Michael Peppler - Data Migrations Inc. - mpeppler@peppler.org
http://www.mbay.net/~mpeppler - mpeppler@mbay.net
International Sybase User Group - http://www.isug.com
Sybase on Linux mailing list: ase-linux-list@isug.com
------------------------------
Date: Mon, 18 Jun 2001 13:06:08 +0200
From: Philip Newton <pne-news-20010618@newton.digitalspace.net>
Subject: Re: Add LDAP entry
Message-Id: <h1orito77c7v2eiijfa488ge82dda7e024@4ax.com>
On Mon, 18 Jun 2001 10:30:38 +0200, Enrique Ochagavía
<henryNOSPAM@larioja.org> wrote:
> How to add a ldap entry?
Here's one way. From the Net::LDAP manpage:
: $result = $ldap->add (
: dn => 'cn = Barbara Jensen, o=University of Michigan, c=us',
: attr => [ 'cn' => ['Barbara Jensen', 'Barbs Jensen'],
: 'sn => 'Jensen',
: 'mail' => 'b.jensen@umich.edu'
: ]
: );
(after calling new and bind).
Cheers,
Philip
--
Philip Newton <nospam.newton@gmx.li>
Yes, that really is my address; no need to remove anything to reply.
If you're not part of the solution, you're part of the precipitate.
------------------------------
Date: Mon, 18 Jun 2001 12:12:23 +0100
From: "John Imrie" <john.imrie@pa.press.net>
Subject: Re: Best way for batch renaming specific files
Message-Id: <VmlX6.1447$h45.8939@news.uk.colt.net>
John Imrie <john.imrie@pa.press.net> wrote in message
news:a6kX6.1443$h45.8794@news.uk.colt.net...
>
> Michael Segulja <michael.segulja@kingwoodcable.net> wrote in message
> news:3b2a407c$1_3@newsfeeds...
> > I have some files name filename.0001, filename.0002....filename.0450,
etc.
> > I want to rename these files to filename.0001.tif,
> > filename.0002.tif....filename.0450.tif, but I'm not sure how. I'm sure
> Perl
> > is the best solution for this since I'm running Linux, but I'm not a
Perl
> > programmer. Is this something that is easy enough to figure out with a
> > decent tutorial? I'd like to learn how to do it, but I haven't found
> > anything on the Internet that is specific to something like this.
> >
> > Can someobody give me a head start or some ideas on where to look?
> >
> > Thank you very much,
> >
> > Michael
>
> If you want all the files in the directory to be modified then this should
> work
>
> perl -ni.tif -e 'unlink'
>
> Why is left as an exercise to the reader :-)
>
Except it don't and I can't work out why. I even tried perl -ni.tif -e
'unlink @ARGV' *
And that leaves the old files there. :-(
------------------------------
Date: Mon, 18 Jun 2001 11:38:43 GMT
From: "John W. Krahn" <krahnj@acm.org>
Subject: Re: Best way for batch renaming specific files
Message-Id: <3B2DE83D.3684BD76@acm.org>
John Imrie wrote:
>
> If you want all the files in the directory to be modified then this
> should work
^^^^^^^^^^^
>
> perl -ni.tif -e 'unlink'
Maybe if you specify the files on the command line, but it still leaves
the original file names.
perl -ni.tif -e 'unlink' *
John
--
use Perl;
program
fulfillment
------------------------------
Date: Mon, 18 Jun 2001 16:56:14 +0530
From: "Aman Patel" <patelnavin@icenet.net>
Subject: Re: compiling with perl
Message-Id: <9gkof3$9l64p$1@ID-93885.news.dfncis.de>
thanks!!!
------------------------------
Date: Mon, 18 Jun 2001 17:21:18 +0530
From: Sandeep Grover <sgrover@delsoft.com>
Subject: creating perl variable from C
Message-Id: <3B2DEB36.CDF619BE@delsoft.com>
Hi
I am interfacing perl with C using perl_parse and perl_run.
Now, I want to make a scalar variable created in C to be
visible in perl.
I am using
SV *mysv = newSV ();
How Can I use this variable in perl-environment.
thanks
------------------------------
Date: 18 Jun 2001 12:04:43 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: creating perl variable from C
Message-Id: <9gkqor$jk2$1@mamenchi.zrz.TU-Berlin.DE>
According to Sandeep Grover <sgrover@delsoft.com>:
> Hi
>
> I am interfacing perl with C using perl_parse and perl_run.
>
> Now, I want to make a scalar variable created in C to be
> visible in perl.
> I am using
>
> SV *mysv = newSV ();
>
> How Can I use this variable in perl-environment.
This isn't a Perl variable, it's just an anonymous scalar value. If
you want to access it in a Perl program you can return it from an XS
routine.
If you really need to create a new scalar variable, use the get_sv
macro. This is described in perlguts.
Anno
------------------------------
Date: Mon, 18 Jun 2001 18:16:45 +0530
From: Sandeep Grover <sgrover@delsoft.com>
Subject: Re: creating perl variable from C
Message-Id: <3B2DF835.F4556C69@delsoft.com>
> This isn't a Perl variable, it's just an anonymous scalar value. If
> you want to access it in a Perl program you can return it from an XS
> routine.
>
> If you really need to create a new scalar variable, use the get_sv
> macro. This is described in perlguts.
>
> Anno
Actually I have an array in C, which I want to be
available in perl just after perl_parse and before perl_run.
How can I do that?
thanks
------------------------------
Date: 18 Jun 2001 13:16:20 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: creating perl variable from C
Message-Id: <9gkuv4$8dn$1@mamenchi.zrz.TU-Berlin.DE>
According to Sandeep Grover <sgrover@delsoft.com>:
> > This isn't a Perl variable, it's just an anonymous scalar value. If
> > you want to access it in a Perl program you can return it from an XS
> > routine.
> >
> > If you really need to create a new scalar variable, use the get_sv
> > macro. This is described in perlguts.
> >
> > Anno
>
> Actually I have an array in C, which I want to be
> available in perl just after perl_parse and before perl_run.
> How can I do that?
First of all, don't stealth-cc a Usenet posting. If you post to
Usenet *and* mail the author, then say so in the mail.
Second, have you even looked at the perlguts document yet? It describes
a number of methods to create and populate a Perl array. If you have
specific problems with one of the methods, ask again.
I don't know how to arrange for this to be executed at compile time;
it would probably depend on how you invoke the Perl interpreter in
the first place.
Anno
------------------------------
Date: Mon, 18 Jun 2001 13:39:23 GMT
From: "grimblefritz" <me@grimblefritz.com>
Subject: Re: having trouble with system
Message-Id: <fwnX6.195$jM1.128956468@newssvr17.news.prodigy.com>
"Abe Timmerman" <abe@ztreet.demon.nl> wrote in message
news:ts7pit0cc2l1obsmfk11okrn8vg0drpmag@4ax.com...
>
> What of? What were its last words? What did system() return if it
> returned at all?
>
> system( $action ) == 0 or die "system( '$action' ): $?";
perl complains not a word -- simply dies and drops to the shell prompt.
I have checked the scalar $action, which is set by splitting the value
pulled from the hash, and the scalar $action2, which is set with a literal.
$action == $action2 is true.
The command above, with die, outputs nothing. Then again, warn() doesn't
output either, so I've come to believe STDERR is being trapped. The
following, though, yeilds SUCCESS even though the command fails to execute:
if (system($action) == 0) {
print "SUCCESS\n";
} else {
print "FAILURE $?\n";
}
I will work on paring this down to a small script that I can post that will
demonstrate the problem. I'm not the original author and this is my first
perl project of any consequence, so that may take a while ;-)
Thanks all -- stay tuned.
grim
------------------------------
Date: 18 Jun 2001 10:41:49 GMT
From: dave@sydney.daveb.net (Dave Bailey)
Subject: Re: help with regexp?
Message-Id: <slrn9irchn.3gh.dave@sydney.daveb.net>
On Sun, 17 Jun 2001 19:29:28 -0400, Benjamin Goldberg
<goldbb2@earthlink.net> wrote:
>oza wrote:
[...]
>> I will use Apaches rewrite module to translate the url in first line
>> to the one in second line below:
>>
>> www.mysite.com/top/scriptname/modename/idnum
>> www.mysite.com/scriptname.php?mode=modename&id=idnum
[...]
>I don't see why you *want* to rewrite the urls like this, though. It is
>entirely possible to use a cgi with a url like the following:
> http://host/path/foo.cgi/param/param
>
>The path_info function/method of CGI.pm will return the string
>"/param/param", as will $ENV{PATH_INFO}. This is, IMHO, a superior way
>of giving static arguments to a CGI (by static, I mean part of the fixed
>content of a page, not generated by a <form> tag).
CGI.pm is a nasty module to use if all you need is CGI arguments.
Using CGI.pm under mod_perl increases the size of your Apache processes
by around 2 MB compared with something simpler like Apache::Request,
which also provides a param() method. In any case, the point is moot
since the OP is migrating his site's CGI content to PHP, not Perl.
As for the argument scheme, it's not superior, it's just different.
In some situations the CGI arguments have a natural hierarchy such
as /chapter/section/paragraph which lends itself nicely to directory
style naming. In other situations this is not the case, such as
?x=14&y=7&z=5. Which one is more suitable depends on what the
arguments represent, IMHO.
--
Dave Bailey
davidb54@yahoo.com
------------------------------
Date: Mon, 18 Jun 2001 10:46:03 +0000
From: gnari <gnarinn@hotmail.com>
Subject: Re: help with regexp?
Message-Id: <992861163.523023690097034.gnarinn@hotmail.com>
In article <slrn9irchn.3gh.dave@sydney.daveb.net>,
Dave Bailey <dave@sydney.daveb.net> wrote:
>
>CGI.pm is a nasty module to use if all you need is CGI arguments.
>Using CGI.pm under mod_perl increases the size of your Apache processes
>by around 2 MB compared with something simpler like Apache::Request,
>which also provides a param() method.
>
This may be true if NONE of the pages on the site need CGI.pm stuff.
with mod_perl CGI.pm stays in memory between requests, so if you have to
use CGI.pm at all, you can as well use it in all cgi scripts.
gnari
------------------------------
Date: Mon, 18 Jun 2001 14:12:57 GMT
From: "Daniel Czajko" <czajko@ocas.on.ca>
Subject: Looking for DB Extension for Perl v5 to work with Oracle (ex OraPerl)
Message-Id: <GF4qB7.x4w@alfalfa.utcs.utoronto.ca>
I'm running some Perl programs that access INGRES DB. We are currently
switching to an Oracle DB, rendering my IngPerl code a little useless. I
need to be able to find some kind of a DB extension (like OraPerl) that
would help me access the new Oracle DB using Perl v5. I have been able to
find one, (OraPerl) but it will not work with Perl v.5, which is what I'm
running.
Or perhaps there is some other program what would help me access an Oracle
DB with Perl v5.
Does anyone know where I can find such an extension
Any help is much appreciated
------------------------------
Date: Mon, 18 Jun 2001 12:23:57 +0200
From: Philip Newton <pne-news-20010618@newton.digitalspace.net>
Subject: Re: more than one execution for wait?
Message-Id: <5llritst54sl5skogh6dnifa5ht3l0shja@4ax.com>
On Sun, 17 Jun 2001 14:19:27 +0900, "Lee Seung K." <vrman@sl2sys.co.kr>
wrote:
> Is there a way that I can get 5 or x number of processes simultaneously?
Fork 5 or x times and exec something else each time.
Cheers,
Philip
--
Philip Newton <nospam.newton@gmx.li>
Yes, that really is my address; no need to remove anything to reply.
If you're not part of the solution, you're part of the precipitate.
------------------------------
Date: Mon, 18 Jun 2001 14:26:44 -0000
From: Greg Bacon <gbacon@cs.uah.edu>
Subject: New posters to comp.lang.perl.misc
Message-Id: <tis3t4acgf1g7e@corp.supernews.com>
Following is a summary of articles from new posters spanning a 7 day
period, beginning at 11 Jun 2001 15:27:49 GMT and ending at
18 Jun 2001 14:16:20 GMT.
Notes
=====
- A line in the body of a post is considered to be original if it
does *not* match the regular expression /^\s{0,3}(?:>|:|\S+>|\+\+)/.
- All text after the last cut line (/^-- $/) in the body is
considered to be the author's signature.
- The scanner prefers the Reply-To: header over the From: header
in determining the "real" email address and name.
- Original Content Rating (OCR) is the ratio of the original content
volume to the total body volume.
- Find the News-Scan distribution on the CPAN!
<URL:http://www.perl.com/CPAN/modules/by-module/News/>
- Please send all comments to Greg Bacon <gbacon@cs.uah.edu>.
- Copyright (c) 2001 Greg Bacon.
Verbatim copying and redistribution is permitted without royalty;
alteration is not permitted. Redistribution and/or use for any
commercial purpose is prohibited.
Totals
======
Posters: 144 (42.5% of all posters)
Articles: 236 (22.1% of all articles)
Volume generated: 374.1 kb (20.4% of total volume)
- headers: 187.6 kb (3,830 lines)
- bodies: 182.2 kb (6,230 lines)
- original: 127.1 kb (4,514 lines)
- signatures: 4.1 kb (97 lines)
Original Content Rating: 0.697
Averages
========
Posts per poster: 1.6
median: 1.0 post
mode: 1 post - 95 posters
s: 1.5 posts
Message size: 1623.2 bytes
- header: 814.1 bytes (16.2 lines)
- body: 790.5 bytes (26.4 lines)
- original: 551.3 bytes (19.1 lines)
- signature: 17.6 bytes (0.4 lines)
Top 10 Posters by Number of Posts
=================================
(kb) (kb) (kb) (kb)
Posts Volume ( hdr/ body/ orig) Address
----- -------------------------- -------
9 18.2 ( 8.6/ 9.2/ 6.4) Rolf Krahl <rolf.krahl@gmx.net>
8 13.0 ( 8.1/ 4.9/ 2.4) "Brian Wakem" <no@email.at.all>
7 14.4 ( 5.6/ 8.7/ 4.3) Twan Kogels <twanGEENSPAM@twansoft.com>
7 11.1 ( 6.3/ 4.8/ 3.4) "alan@" <alan@headru.sh>
4 7.6 ( 3.6/ 4.0/ 2.0) Martin.Cassidy@Sun.COM
4 10.4 ( 3.1/ 7.3/ 6.1) Doug McGrath <doug.mcgrath@us.telegyr.com>
4 5.3 ( 3.4/ 1.9/ 0.5) karl@localhost.blorg
4 11.0 ( 3.0/ 8.0/ 3.6) Kyle Vinson <tangfan01@hotmail.com>
4 12.5 ( 3.2/ 9.2/ 7.8) "Antoine Beaupre (LMC)" <Antoine.Beaupre@lmc.ericsson.se>
4 5.5 ( 2.0/ 3.4/ 0.9) thinkit <thinkit8@lycos.com>
These posters accounted for 5.1% of all articles.
Top 10 Posters by Volume
========================
(kb) (kb) (kb) (kb)
Volume ( hdr/ body/ orig) Posts Address
-------------------------- ----- -------
18.2 ( 8.6/ 9.2/ 6.4) 9 Rolf Krahl <rolf.krahl@gmx.net>
14.4 ( 5.6/ 8.7/ 4.3) 7 Twan Kogels <twanGEENSPAM@twansoft.com>
13.0 ( 8.1/ 4.9/ 2.4) 8 "Brian Wakem" <no@email.at.all>
12.5 ( 3.2/ 9.2/ 7.8) 4 "Antoine Beaupre (LMC)" <Antoine.Beaupre@lmc.ericsson.se>
11.1 ( 6.3/ 4.8/ 3.4) 7 "alan@" <alan@headru.sh>
11.0 ( 3.0/ 8.0/ 3.6) 4 Kyle Vinson <tangfan01@hotmail.com>
10.4 ( 3.1/ 7.3/ 6.1) 4 Doug McGrath <doug.mcgrath@us.telegyr.com>
7.6 ( 3.6/ 4.0/ 2.0) 4 Martin.Cassidy@Sun.COM
7.4 ( 2.7/ 4.7/ 3.4) 3 "John Morais" <jmorais@rochester.rr.com>
7.3 ( 2.9/ 4.4/ 3.6) 3 "Eldorado" <none@this.net>
These posters accounted for 6.2% of the total volume.
Top 10 Posters by OCR (minimum of three posts)
==============================================
(kb) (kb)
OCR orig / body Posts Address
----- -------------- ----- -------
0.847 ( 7.8 / 9.2) 4 "Antoine Beaupre (LMC)" <Antoine.Beaupre@lmc.ericsson.se>
0.835 ( 6.1 / 7.3) 4 Doug McGrath <doug.mcgrath@us.telegyr.com>
0.812 ( 3.6 / 4.4) 3 "Eldorado" <none@this.net>
0.737 ( 3.4 / 4.7) 3 "John Morais" <jmorais@rochester.rr.com>
0.708 ( 3.4 / 4.8) 7 "alan@" <alan@headru.sh>
0.700 ( 6.4 / 9.2) 9 Rolf Krahl <rolf.krahl@gmx.net>
0.636 ( 2.8 / 4.4) 3 "Lee Seung K." <vrman@sl2sys.co.kr>
0.631 ( 1.6 / 2.5) 3 zero the hero <christopher_brien@hotmail.com>
0.613 ( 0.7 / 1.2) 3 Jason Blakey <jblakey@frogboy.net>
0.549 ( 0.8 / 1.4) 3 "IlIIllllI1" <iliilllli1@hotmail.com>
Bottom 10 Posters by OCR (minimum of three posts)
=================================================
(kb) (kb)
OCR orig / body Posts Address
----- -------------- ----- -------
0.613 ( 0.7 / 1.2) 3 Jason Blakey <jblakey@frogboy.net>
0.549 ( 0.8 / 1.4) 3 "IlIIllllI1" <iliilllli1@hotmail.com>
0.545 ( 1.6 / 2.9) 3 "Marc" <marc@hvc.rr.com>
0.514 ( 2.0 / 4.0) 4 Martin.Cassidy@Sun.COM
0.489 ( 4.3 / 8.7) 7 Twan Kogels <twanGEENSPAM@twansoft.com>
0.488 ( 2.4 / 4.9) 8 "Brian Wakem" <no@email.at.all>
0.448 ( 3.6 / 8.0) 4 Kyle Vinson <tangfan01@hotmail.com>
0.395 ( 1.2 / 2.9) 3 Korac <korac@dirig.com>
0.267 ( 0.9 / 3.4) 4 thinkit <thinkit8@lycos.com>
0.246 ( 0.5 / 1.9) 4 karl@localhost.blorg
18 posters (12%) had at least three posts.
Top 10 Targets for Crossposts
=============================
Articles Newsgroup
-------- ---------
53 alt.perl
25 comp.lang.perl.modules
11 comp.lang.perl.tk
10 comp.lang.perl
3 de.comp.lang.perl.cgi
3 alt.comp.perlcgi.freelance
3 alt.h2pcr2me.lang.perl
2 comp.object
1 alt.humor.best-of-usenet.d
1 comp.mail.sendmail
Top 10 Crossposters
===================
Articles Address
-------- -------
6 "Marc" <marc@hvc.rr.com>
4 "Pat Krz" <pmg@kroazhent.com>
2 Alan Arvesen <aarvesen@coldsmoke.com>
2 "Mark and Christine McCain" <sub235k@home.com>
2 ozette@ozette.net
2 steve <sam_i_am0011@yahoo.com>
2 Deneb.Pettersson@lmf.ericsson.se
2 "Richard A. Evans" <EvR@compuserve.com>
1 mark@zzo.com
1 Hugh Greene <q@tardis.ed.ac.maps.uk>
------------------------------
Date: Mon, 18 Jun 2001 13:50:38 +0200
From: Oliver Moser <o.moser@mobilkom.at>
Subject: Newbie: Problems with Unicode::String
Message-Id: <20qritsu0nmgh31hicg4d2tusq3frge02s@4ax.com>
Dear NG,
I was using the tr/// operator to convert Latin-1 characters
to UTF-8; It worked great for a while, but then odd things
happened and I looked around for some alternatives; I heared about a
module called Unicode::String and downloaded it. I tried to convert
things like "Müller" or "Trüffel", but all I got was something like
"Mller" and "Trffel", the umlauts disappeared. Could anybody be so
kind and send me some example how to convert correctly between Latin-1
and UTF-8 with that Unicode::String module? Or does anybody know some
other way to solve this problem?
I'm using version 2.06 of the Unicode module and Perl 5.6.0.
Thanks in advance,
Oliver
------------------------------
Oliver Moser
mobilkom austria AG & Co. KG
IT://mob.app
Mobil: +43-664-331-2544
mailto:o.moser@mobilkom.at
------------------------------
Date: Mon, 18 Jun 2001 14:03:48 +0200
From: Philip Newton <pne-news-20010618@newton.digitalspace.net>
Subject: Re: Newbie: Problems with Unicode::String
Message-Id: <ggrritseg5kb1iiquvp7o364ijnn8ljkuv@4ax.com>
On Mon, 18 Jun 2001 13:50:38 +0200, Oliver Moser <o.moser@mobilkom.at>
wrote:
> some example how to convert correctly between Latin-1 and UTF-8 with
> that Unicode::String module?
use Unicode::String qw(latin1);
print latin1("Müller ißt Trüffel")->utf8;
Or in two steps:
use Unicode::String qw(latin1);
$string = latin1("Müller ißt Trüffel");
# $string is now a Unicode::String object
$string_in_utf8 = $string->utf8;
print $string_in_utf8;
> I'm using version 2.06 of the Unicode module
It's the "Unicode::String" module, not the Unicode module.
> and Perl 5.6.0.
Above examples tested with Unicode::String version 2.06 and Perl 5.6.0,
so they should work for you.
Cheers,
Philip
--
Philip Newton <nospam.newton@gmx.li>
Yes, that really is my address; no need to remove anything to reply.
If you're not part of the solution, you're part of the precipitate.
------------------------------
Date: Mon, 18 Jun 2001 11:54:40 GMT
From: "Fred dubru" <f_dubru@yahoo.com>
Subject: Perl on Win32.
Message-Id: <4_lX6.95$ed4.29461616@news2.randori.com>
Hi,
I am new on MS Win32 and I am looking for tools and scripting tools to work
with it. Does Perl privide built in functions to mimic Unix commands (such
as grep, wc, ls etc...)
Thanks for the help.
Fred.
------------------------------
Date: Mon, 18 Jun 2001 14:07:23 +0200
From: Philip Newton <pne-news-20010618@newton.digitalspace.net>
Subject: Re: Perl on Win32.
Message-Id: <5jrritg3rninu0p5790or7sea9ir96oovo@4ax.com>
On Mon, 18 Jun 2001 11:54:40 GMT, "Fred dubru" <f_dubru@yahoo.com>
wrote:
> I am new on MS Win32 and I am looking for tools and scripting tools to work
> with it. Does Perl privide built in functions to mimic Unix commands (such
> as grep, wc, ls etc...)
Not directly, though you can write scripts in Perl that do similar
things. The Perl Power Tools project ( http://language.perl.com/ppt/ )
aims to produce pure-Perl replacements of such Unix tools; sadly, I
believe it is very slow to be updated.
According to http://language.perl.com/ppt/what.html , there are already
implementations for grep, wc, and ls.
Another option might be to download Cygwin, which provides ports of Unix
utilities to the Win32 environment, so you'd have a grep.exe, wc.exe,
and so on.
Cheers,
Philip
--
Philip Newton <nospam.newton@gmx.li>
Yes, that really is my address; no need to remove anything to reply.
If you're not part of the solution, you're part of the precipitate.
------------------------------
Date: Mon, 18 Jun 2001 12:23:00 GMT
From: "John W. Krahn" <krahnj@acm.org>
Subject: Re: Perl on Win32.
Message-Id: <3B2DF2D3.39E4443C@acm.org>
Fred dubru wrote:
>
> Hi,
>
> I am new on MS Win32 and I am looking for tools and scripting tools to work
> with it. Does Perl privide built in functions to mimic Unix commands (such
> as grep, wc, ls etc...)
http://language.perl.com/ppt/
John
--
use Perl;
program
fulfillment
------------------------------
Date: Mon, 18 Jun 2001 12:50:17 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: Perl on Win32.
Message-Id: <41uritorj43t2ageg967ritfnhapuv8bds@4ax.com>
Fred dubru wrote:
>I am new on MS Win32 and I am looking for tools and scripting tools to work
>with it. Does Perl privide built in functions to mimic Unix commands (such
>as grep, wc, ls etc...)
What a strange question. No, perl doesn't mimic Unix commands. Perl
built-in functions do behave roughly as they do on Unix, though.
If you want grep, tar, gzip, etc. command line utilities on Win32,
search for Cygwin. <http://www.cygwin.com/cygwin/>
--
Bart.
------------------------------
Date: Mon, 18 Jun 2001 13:00:28 GMT
From: helgi@NOSPAMdecode.is (Helgi Briem)
Subject: Re: PPM
Message-Id: <3b2dfaf5.1657143376@news.isholf.is>
On 16 Jun 2001 22:44:55 GMT, "Joel Fentin" <joel@cts.com>
wrote:
>If I use PPM with the commands: search, verify, & install;
>I get the following error:
>not well-formed at line 1, column 17, byte 17 at
>C:/Perl/site/lib/SOAP/Parser.pm line 73
>
>What does it want?
It wants a proxy server.
Go to Control Panel - System - Environment
and set the variable HTTP_proxy to
http://PROXY.DOMAIN.COM:PORT,
substituting the capitalised part as needed.
Regards,
Helgi Briem
------------------------------
Date: Mon, 18 Jun 2001 11:51:06 +0100
From: "John Imrie" <john.imrie@pa.press.net>
Subject: Re: Printing filenames that are in a directory
Message-Id: <_2lX6.1446$h45.8928@news.uk.colt.net>
John Imrie <john.imrie@pa.press.net> wrote in message
news:tWjX6.1442$h45.8975@news.uk.colt.net...
> <snip>
> > > close THISDIR;
> >
> > closedir THISDIR;
> >
> > (Question to the experts: Does it make a difference?)
> >
>
> This frees up the handel so it can be used again, IMHA allways a good
idea.
>
IMHA = IMHO
Dyslexia rools KO :-)
------------------------------
Date: Mon, 18 Jun 2001 08:46:44 -0500
From: Chris <cpryce@pryce.net>
Subject: Re: Problem with redirect (with IE and not with Netscape)
Message-Id: <B7537073.6EF1%cpryce@pryce.net>
in article 3B2DBACB.1D4F213C@plan.be, Dominique van der Wal at dvdw@plan.be
wrote on 06/18/2001 3:24 AM:
>
> It work fine with Netscape but with Microsoft IE, sometimes it works and
> sometimes it doesn't. In fact, the first time it works but after it
> doesen't.
>
> Any idea to solve the problem ?
Possibly IE caching the output of the script, and Netscape is not. From the
CGI.pm Documentation [1]:
print $query->header(-type=>'image/gif',
-status=>'402 Payment Required',
-expires=>'+3d',
-cookie=>$my_cookie,
-charset=>'UTF-7',
-attachment=>'foo.gif',
-Cost=>'$0.02');
-expires
Some browsers, such as Internet Explorer, cache the output of CGI scripts.
Others, such as Netscape Navigator do not. This leads to annoying and
inconsistent behavior when going from one browser to another. You can force
the behavior to be consistent by using the -expires parameter. When you
specify an absolute or relative expiration interval with this parameter,
browsers and proxy servers will cache the script's output until the
indicated expiration date. The following forms are all valid for the
-expires field:
+30s 30 seconds from now
+10m ten minutes from now
+1h one hour from now
-1d yesterday (i.e. "ASAP!")
now immediately
+3M in three months
+10y in ten years time
Thu, 25-Apr-1999 00:40:33 GMT at the indicated time & date
When you use -expires, the script also generates a correct time stamp for
the generated document to ensure that your clock and the browser's clock
agree. This allows you to create documents that are reliably cached for
short periods of time.
cp
[1] http://stein.cshl.org/WWW/CGI/#header
------------------------------
Date: Mon, 18 Jun 2001 08:49:35 -0500
From: Chris <cpryce@pryce.net>
Subject: Re: Server Side Includes on IIS
Message-Id: <B753711F.6EF2%cpryce@pryce.net>
in article 3B2B92B8.E74BB5D7@goldenapple.com, Michal T. Winter at
mwinter@goldenapple.com wrote on 06/16/2001 12:09 PM:
> Does anyone know if you can include a "PL" as a SSI on an IIS server and
> how to do it. It does not support it out of the box.
Maybe this article will point you in the right direction?
http://www.microsoft.com/technet/deploy/cgiis4.asp
------------------------------
Date: 18 Jun 2001 08:43:33 -0500
From: Ren Maddox <ren@tivoli.com>
Subject: Re: Sorting hash
Message-Id: <m3g0cxhpiy.fsf@dhcp9-173.support.tivoli.com>
On Mon, 18 Jun 2001, krahnj@acm.org wrote:
> Benjamin Goldberg wrote:
>>
>> Wouldn't a Schwartzian Transform or Guttman Roswieler Transform be
>> faster here?
>>
>> foreach (map {(unpack 'Z* a*')[1]} sort map {
> ^^^^^^^
> You didn't pass an expression to unpack (it doesn't default to $_) and
> in the template 'Z* a*' Z* grabs everything so the a* is superfluous.
Yeah... bummer on how "Z*" works on unpack, isn't it. This works
instead:
foreach (map {(split /\0/)[1]} sort map { # rest is the same
And, of course, unlike unpack, split *does* default to $_. :)
--
Ren Maddox
ren@tivoli.com
------------------------------
Date: 18 Jun 2001 14:43:49 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Sorting hash
Message-Id: <9gl435$ae6$1@mamenchi.zrz.TU-Berlin.DE>
According to Benjamin Goldberg <goldbb2@earthlink.net>:
> Wouldn't a Schwartzian Transform or Guttman Roswieler Transform be
^^^^^^^^^
s/Roswieler/Rosler/
Anno
------------------------------
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.
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 1152
***************************************