[10637] in Perl-Users-Digest
Perl-Users Digest, Issue: 4229 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Nov 16 12:07:22 1998
Date: Mon, 16 Nov 98 09:00:21 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Mon, 16 Nov 1998 Volume: 8 Number: 4229
Today's topics:
Re: A Newbie Pattern Match Question dave@mag-sol.com
Re: a RE for email addresses? <jdporter@min.net>
Re: BUILDING BLOWFISH IN PERL <jeromeo@atrieva.com>
Re: compiling modules under Win95 problems (Greg L. Chapman)
Convert to Perl? <jakoubek@mozilla.net>
Re: Convert to Perl? <zenin@bawdycaste.org>
expect <michaelr@lndn.tensor.pgs.com>
file attachment <michaelr@lndn.tensor.pgs.com>
Re: file attachment dave@mag-sol.com
help with grep (Cesar Romani)
Re: help with grep (Sean McAfee)
Re: Holy Abounding Books, Batman! ()
Re: Holy Abounding Books, Batman! ()
htaccess and perl <lammie_pie@hotmail.com>
Re: htaccess and perl (Doran L. Barton)
Re: iis 4 problem with perl .... <a.s.webster@larc.nasa.gov>
is embedded Perl thread-safe ? <Peter.McLaughlin@gssec.bt.co.uk>
Re: manipulating dates (Steffen Beyer)
Re: NT/Unix <perlguy@technologist.com>
Re: Perl vs C <perlguy@technologist.com>
Re: Perl_for_Win32_FAQ <ludlow@us.ibm.com>
Problem with $O, need help <ibelgaufts@gfc-net.de>
Re: Q: how to sort reference designators? dave@mag-sol.com
substitute <kempf.todd@student.uni-tuebingen.de>
Unix to Win32 conversion <killer@ath.forthnet.gr>
Re: Unix to Win32 conversion (I R A Aggie)
Re: Unix to Win32 conversion <killer@ath.forthnet.gr>
upper to lowercase (_cim_)
Use of Shell commands - Help!!! <mark.c.hamlin@bt.com>
Re: Win32::NetAdmin::GetServers() cenkersoy@my-dejanews.com
Win32::TieRegistry and EventLog keydet89@yahoo.com
Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 16 Nov 1998 13:17:07 GMT
From: dave@mag-sol.com
Subject: Re: A Newbie Pattern Match Question
Message-Id: <72p8kj$as4$1@nnrp1.dejanews.com>
In article <72oqik$vvo$1@nnrp1.dejanews.com>,
dean_at_brand@my-dejanews.com wrote:
> Apologise for the most of simplest questions. I have a file which contains
> several lines of text. Each line is made up of a number of fields, delimited
> by commas, like so:
>
> 67677,some text,897.9869
> 64378,some more text,8654.87
>
> How do I extract each filed from a line with the following:
>
> ($value, $desc, $score) = / WHATS IN HERE /;
>
> Its the 'WHATS IN HERE' bit I am seriously stuck with, I have tried various
> bits and pieces and am now banging my head agains Larry's Wall!
I'd be interested in hearing what the 'various bits and pieces' that you tried
were, and whether any of them included reading some of the fine manual.
Try:
perldoc -f open
to open your file,
perldoc perlop
and look for the IO operators to read data from your file and
perldoc -f split
to get your data in the format that you need.
hth,
Dave...
--
Magnum Solutions Ltd: <http://www.mag-sol.com/>
London Perl M[ou]ngers: <http://london.pm.org/>
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Mon, 16 Nov 1998 11:15:26 -0500
From: John Porter <jdporter@min.net>
Subject: Re: a RE for email addresses?
Message-Id: <36504F9E.2FF015B1@min.net>
sara starre wrote:
>
> Anyow, One question- you said that
> good: m1ymail@my1place2.mystate. (space) com3
>
> is a *good* email address? That seems odd doesn't it?
> I don't recall seeing a space in an email address before.
Oh, I think you have and you just didn't realize it.
Don't go by what you think you've seen, go by
the standards documents (the RFC's).
John Porter
------------------------------
Date: Mon, 16 Nov 1998 08:03:21 -0800
From: Jerome O'Neil <jeromeo@atrieva.com>
To: fantastic2@my-dejanews.com
Subject: Re: BUILDING BLOWFISH IN PERL
Message-Id: <36504CC9.A400849E@atrieva.com>
fantastic2@my-dejanews.com wrote:
> Has anyone actually built the Blowfish decryption into a single script? I
> checked CPAN and all I can find are modules.
I remember back in the day there was an RSA one-liner floating arround
the newsgroup as someone's sig. Perhaps the same could be built for
blowfish.
Everything I tell you could be wrong. ;->
--
Jerome O'Neil, Operations and Information Services
Atrieva Corporation, 600 University St., Ste. 911, Seattle, WA 98101
jeromeo@atrieva.com - Voice:206/749-2947
The Atrieva Service: Safe and Easy Online Backup http://www.atrieva.com
------------------------------
Date: 16 Nov 1998 14:55:42 GMT
From: glc@well.com (Greg L. Chapman)
Subject: Re: compiling modules under Win95 problems
Message-Id: <36503347.85707514@netnews.worldnet.att.net>
The exitstatus warning is generated by this command:
D:\PERL\BIN\perl D:\perl\lib\ExtUtils\xsubpp temp000 2>&1
^^^^
4DOS doesn't support this redirection syntax (though 4NT, TakeCommand, CMD.EXE,
and, of course, all the Unix shells do). I think it is OK to ignore this
warning if everything else builds correctly. However, something is obviously
breaking for you. The most obvious (and probably best) solution is to get the
ActiveState version of perl from www.activestate.com and use the precompiled
binary distributions of the modules you can get with it.
On 14 Nov 1998 17:57:00 +0200, haert@wharp.rhein-main.de (Michael Haertfelder)
wrote:
>Every time I type in the following at the command prompt (4DOS) of
>Windows95:
>perl Makefile.PL
>I got the error:
>
>Running 'D:\PERL\BIN\perl D:\perl\lib\ExtUtils\xsubpp temp000 2>&1' exits
>with status 0 at (eval 18) line 41.
>Writing Makefile for Term::Size
>
>This message results for different modules so I assume it's a general
>problem.
>
>Yes, I installed V500402 of perl for Windows.
>Yes, perl is running fine otherwise.
>Yes, the module components are complete.
>
>So what's the problem ?
>
>Performing nmake regardless of the given error message results in a
>message:
>
>D:\PERL\BIN\perl -Id:\perl\lib -Id:\perl\lib
>D:\perl\lib\ExtUtils/xsubpp -typemap D:\perl\lib\ExtUtils\typemap Size.xs
>>Size.tc && D:\PERL\BIN\perl -Id:\perl\lib -Id:\perl\lib
>-MExtUtils::Command -e mv Size.tc Size.c
>Usage2: xsubpp [-v] [-C++] [-except] [-prototypes] [-noversioncheck] [-
>nolinenumbers]
>[-s pattern] [-typemap typemap]... file.xs
>NMAKE : fatal error U1077: 'D:\PERL\BIN\perl.exe' : return code '0x2'
>Stop.
>
>Any help appreciated
>
>Michael
>
>
>------------- Michael Haertfelder Frankfurt/Main, Germany ----------------
>------------- http://odb.rhein-main.de/people/haertfelder/ ----------------
------------------------------
Date: Mon, 16 Nov 1998 08:29:12 +0100
From: Stephan Jakoubek <jakoubek@mozilla.net>
Subject: Convert to Perl?
Message-Id: <364FD448.2BE14D46@mozilla.net>
Hi!
I have the following source-code. (It's a passwort-encryption)
Is it possible to convert it to perl?
Thanks for your help!
-Stephan
-------[CUT HERE]-------
char* CreatePassword(char *passwd) //plain text password as parameter
{
unsigned long crc_32_tab[] = { /* CRC polynomial 0xedb88320 */
0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f,
0xe963a535, 0x9e6495a3,
0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd,
0xe7b82d07, 0x90bf1d91,
0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de, 0x1adad47d, 0x6ddde4eb,
0xf4d4b551, 0x83d385c7,
0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9,
0xfa0f3d63, 0x8d080df5,
0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172, 0x3c03e4d1, 0x4b04d447,
0xd20d85fd, 0xa50ab56b,
0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, 0x45df5c75,
0xdcd60dcf, 0xabd13d59,
0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423,
0xcfba9599, 0xb8bda50f,
0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924, 0x2f6f7c87, 0x58684c11,
0xc1611dab, 0xb6662d3d,
0x76dc4190, 0x01db7106, 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f,
0x9fbfe4a5, 0xe8b8d433,
0x7807c9a2, 0x0f00f934, 0x9609a88e, 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d,
0x91646c97, 0xe6635c01,
0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, 0x6c0695ed, 0x1b01a57b,
0x8208f4c1, 0xf50fc457,
0x65b0d9c6, 0x12b7e950, 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49,
0x8cd37cf3, 0xfbd44c65,
0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, 0x4adfa541, 0x3dd895d7,
0xa4d1c46d, 0xd3d6f4fb,
0x4369e96a, 0x346ed9fc, 0xad678846, 0xda60b8d0, 0x44042d73, 0x33031de5,
0xaa0a4c5f, 0xdd0d7cc9,
0x5005713c, 0x270241aa, 0xbe0b1010, 0xc90c2086, 0x5768b525, 0x206f85b3,
0xb966d409, 0xce61e49f,
0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, 0x2eb40d81,
0xb7bd5c3b, 0xc0ba6cad,
0xedb88320, 0x9abfb3b6, 0x03b6e20c, 0x74b1d29a, 0xead54739, 0x9dd277af,
0x04db2615, 0x73dc1683,
0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8, 0xe40ecf0b, 0x9309ff9d,
0x0a00ae27, 0x7d079eb1,
0xf00f9344, 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb,
0x196c3671, 0x6e6b06e7,
0xfed41b76, 0x89d32be0, 0x10da7a5a, 0x67dd4acc, 0xf9b9df6f, 0x8ebeeff9,
0x17b7be43, 0x60b08ed5,
0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, 0xa6bc5767,
0x3fb506dd, 0x48b2364b,
0xd80d2bda, 0xaf0a1b4c, 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55,
0x316e8eef, 0x4669be79,
0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236, 0xcc0c7795, 0xbb0b4703,
0x220216b9, 0x5505262f,
0xc5ba3bbe, 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31,
0x2cd99e8b, 0x5bdeae1d,
0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x026d930a, 0x9c0906a9, 0xeb0e363f,
0x72076785, 0x05005713,
0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, 0x92d28e9b, 0xe5d5be0d,
0x7cdcefb7, 0x0bdbdf21,
0x86d3d2d4, 0xf1d4e242, 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b,
0x6fb077e1, 0x18b74777,
0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, 0x8f659eff, 0xf862ae69,
0x616bffd3, 0x166ccf45,
0xa00ae278, 0xd70dd2ee, 0x4e048354, 0x3903b3c2, 0xa7672661, 0xd06016f7,
0x4969474d, 0x3e6e77db,
0xaed16a4a, 0xd9d65adc, 0x40df0b66, 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5,
0x47b2cf7f, 0x30b5ffe9,
0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, 0xcdd70693,
0x54de5729, 0x23d967bf,
0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1,
0x5a05df1b, 0x2d02ef8d
};
char *tempstr;
tempstr = (char *) HeapAlloc( GetProcessHeap(),HEAP_ZERO_MEMORY,255);
char name[255];
sprintf(name,"InetServ%sInetServ",passwd);
unsigned long crc;
unsigned bytes_read = strlen(name);
crc = 0xfffffffa;
char *p=name;
for(; bytes_read--; )
crc = crc_32_tab[(crc^*p++) &0xff] ^ crc>>8;
sprintf(tempstr,"%08lX", ~crc);
strlwr(tempstr);
return tempstr;
}
-------[//CUT HERE]-------
------------------------------
Date: 16 Nov 1998 14:43:57 GMT
From: Zenin <zenin@bawdycaste.org>
Subject: Re: Convert to Perl?
Message-Id: <911227309.112026@thrush.omix.com>
Stephan Jakoubek <jakoubek@mozilla.net> wrote:
: I have the following source-code. (It's a passwort-encryption)
: Is it possible to convert it to perl?
Yes, almost a direct port actually. If you really want it
fast though, you might want to do it in XS.
--
-Zenin (zenin@archive.rhps.org) From The Blue Camel we learn:
BSD: A psychoactive drug, popular in the 80s, probably developed at UC
Berkeley or thereabouts. Similar in many ways to the prescription-only
medication called "System V", but infinitely more useful. (Or, at least,
more fun.) The full chemical name is "Berkeley Standard Distribution".
------------------------------
Date: Mon, 16 Nov 1998 15:18:53 +0000
From: Michael Renshaw <michaelr@lndn.tensor.pgs.com>
Subject: expect
Message-Id: <3650425D.24DD@lndn.tensor.pgs.com>
has anoyone out there managed to spawn two processes such as telnet
one after the other in a perl expect script. My script times after
the 2nd spawn to telnet and does not get the username
prompt. i know i can do it all interactively, maybe its something
to do with where the ouptut is being sent, its obviously not
coming back to my terminal for sure.
any ideas .....
Mike
------------------------------
Date: Mon, 16 Nov 1998 08:21:47 +0000
From: Michael Renshaw <michaelr@lndn.tensor.pgs.com>
Subject: file attachment
Message-Id: <364FE09B.21BE@lndn.tensor.pgs.com>
does anyone know how to send a file as an attachment in a perl
script as i normally just open the file and print to the mail
filehandle !!!!!
cheers
Mike
------------------------------
Date: Mon, 16 Nov 1998 14:40:24 GMT
From: dave@mag-sol.com
Subject: Re: file attachment
Message-Id: <72pdgo$f6g$1@nnrp1.dejanews.com>
In article <364FE09B.21BE@lndn.tensor.pgs.com>,
Michael Renshaw <michaelr@lndn.tensor.pgs.com> wrote:
> does anyone know how to send a file as an attachment in a perl
> script as i normally just open the file and print to the mail
> filehandle !!!!!
You should look at the MIMETools bundle on CPAN <www.perl.com/CPAN/>.
hth,
Dave...
--
Magnum Solutions Ltd: <http://www.mag-sol.com/>
London Perl M[ou]ngers: <http://london.pm.org/>
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: 16 Nov 1998 15:40:52 GMT
From: romani_c@mailcity.com (Cesar Romani)
Subject: help with grep
Message-Id: <slrn750hs3.ip4.romani_c@rzaix06.rrz.uni-hamburg.de>
How can I do the following but in perl: grep -n pattern files... ?
I want to have all the numbered lines with the corresponding files, which
contain exactly pattern.
Many thanks in advance.
--
Cesar Romani
Hamburg, Germany
------------------------------
Date: Mon, 16 Nov 1998 16:05:28 GMT
From: mcafee@waits.facilities.med.umich.edu (Sean McAfee)
Subject: Re: help with grep
Message-Id: <c3Y32.146$CY1.660536@news.itd.umich.edu>
In article <slrn750hs3.ip4.romani_c@rzaix06.rrz.uni-hamburg.de>,
Cesar Romani <romani_c@mailcity.com> wrote:
>How can I do the following but in perl: grep -n pattern files... ?
>I want to have all the numbered lines with the corresponding files, which
>contain exactly pattern.
perl -ne 'BEGIN { $re=shift } print "$ARGV:$.:$_" if /$re/o; close ARGV if eof'
It differs from "grep -n" only in that it will print the file name even if
only one input file is given.
--
Sean McAfee | GS d->-- s+++: a26 C++ US+++$ P+++ L++ E- W+ N++ |
| K w--- O? M V-- PS+ PE Y+ PGP?>++ t+() 5++ X+ R+ | mcafee@
| tv+ b++ DI++ D+ G e++>++++ h- r y+>++** | umich.edu
------------------------------
Date: 16 Nov 1998 15:46:18 GMT
From: hdiwan@diwanh.stu.rpi.edu ()
Subject: Re: Holy Abounding Books, Batman!
Message-Id: <slrn750ifd.h7m.hdiwan@diwanh.stu.rpi.edu>
In article <72igi6$33f$1@nnrp1.dejanews.com>, vikkki@my-dejanews.com wrote:
>Mastering Regular Expressions - Friedl (I feel is a must have)
One of the few computer books I have actually read and reference on an
increasing basis.
--
Hasan Diwan
------------------------------
Date: 16 Nov 1998 15:44:12 GMT
From: hdiwan@diwanh.stu.rpi.edu ()
Subject: Re: Holy Abounding Books, Batman!
Message-Id: <slrn750ibf.h7m.hdiwan@diwanh.stu.rpi.edu>
I never read any books on perl. I learned by looking at source, tweaking it
and RTFM. :) Good luck!
--
Hasan Diwan
------------------------------
Date: Mon, 16 Nov 1998 13:07:49 -0000
From: "Chris Lee" <lammie_pie@hotmail.com>
Subject: htaccess and perl
Message-Id: <72p57m$erl$1@newsreader4.core.theplanet.net>
I have seen many web sites allow you to enter a user name and password, then
you are able to access the secure area of that site.
I am new to perl, I know nothing...
Is it possible to modify your htaccess or htpasswd file through perl so that
it automatically update so the user can enter right away? I would then like
the users to be able to change there password once within the secure
area.... ?
Does anyone have any code that I could use.... ?
it is a right pain adding each user as they submit ther details to
me........ help
------------------------------
Date: 16 Nov 1998 08:03:10 -0700
From: fozz@xmission.xmission.com (Doran L. Barton)
Subject: Re: htaccess and perl
Message-Id: <72pere$opn$1@xmission.xmission.com>
"Chris Lee" <lammie_pie@hotmail.com> writes:
>I have seen many web sites allow you to enter a user name and password, then
>you are able to access the secure area of that site.
>I am new to perl, I know nothing...
>Is it possible to modify your htaccess or htpasswd file through perl so that
>it automatically update so the user can enter right away? I would then like
>the users to be able to change there password once within the secure
>area.... ?
>Does anyone have any code that I could use.... ?
>it is a right pain adding each user as they submit ther details to
>me........ help
I have written a Perl library to provide the same functionality as the
'htpasswd' program:
<URL: ftp://ftp.iodynamics.com/pub/htpasswd/HTPasswd.pm >
-=Fozz
--
Doran L. Barton = fozz@xmission.com && http://www.xmission.com/~fozz/;
"Where do you want Microsoft to go today?" --Ron Barry <ronb@cc.usu.edu>
"This may seem a bit weird, but that's okay, because it is weird."
-- Larry Wall <lwall@sems.com> in the Perl v5 man page
------------------------------
Date: Mon, 16 Nov 1998 09:08:59 -0500
From: Adam Webster <a.s.webster@larc.nasa.gov>
To: George Statis <REMOVETHIS.statis@nettaxi.org>
Subject: Re: iis 4 problem with perl ....
Message-Id: <365031FB.CDF7A00A@larc.nasa.gov>
did you add the extension in the console manager?
Executable
c:\perl\bin\perl.exe %s %s
Extension
.pl
------------------------------
Date: Mon, 16 Nov 1998 14:24:20 +0000
From: Peter McLaughlin <Peter.McLaughlin@gssec.bt.co.uk>
Subject: is embedded Perl thread-safe ?
Message-Id: <36503594.FF408BF5@gssec.bt.co.uk>
Hello.
I notice that Perl has some language support for multi-threading.
I'm interested in embedding Perl into a multi-threaded C/C++ server.
Is this possible ? Is the interpreter thread-safe ? I'd like
to call a Perl subroutine with a character string input parameter
and somehow get a character string output back in a thread-safe
manner (there would be many threads in the program calling the
same, or different, chunks of embedded Perl at the same time).
Unfortunately, I have no Perl experience so it'd be good
to find out if this is even possible before I go down this route.
Thanks,
Peter...
------------------------------
Date: 16 Nov 1998 11:31:18 GMT
From: sb@engelschall.com (Steffen Beyer)
Subject: Re: manipulating dates
Message-Id: <72p2e6$gct$1@en1.engelschall.com>
Esther Odekirk <eodekirk@inprise.com> wrote:
> How does one go about manipulating dates? For example, I would like to
> read in the current date/time and subtract 24 hours from it ensuring
> that possible changes in the month and year as well as time changes and
> leap year are taken into consideration. Is there a way I can do this?
> Thank you for your help!
> Esther
Perl modules are you friend. :-)
See either Date::Calc or Date::Manip on CPAN at
http://www.perl.com/CPAN/modules/by-module/Date/
HTH.
Yours,
--
Steffen Beyer <sb@engelschall.com>
Free Perl and C Software for Download:
http://www.engelschall.com/u/sb/download/
New: Build'n'Play 2.1.0 (all-purpose Unix batch installation tool)
------------------------------
Date: Mon, 16 Nov 1998 13:31:25 GMT
From: Brent Michalski <perlguy@technologist.com>
Subject: Re: NT/Unix
Message-Id: <3650292D.4906025E@technologist.com>
Ben Walker wrote:
>
> My script works on Unix.
> When changed to an NT server, the unix perl statement
> require 'myfile.cfg';
> causes error not found in @INC.
>
> What is the correct statement to require a config file for the script
> in NT.
Use the FULL path on NT, like so:
require "c:/inetpub/scripts/myfile.cfg" or die "Could not open file
$!\n";
Good luck!
Brent
--
Java? I've heard of it, it is what I drink when I am hacking Perl. -me
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
$ Brent Michalski $
$ -- Perl Evangelist -- $
$ E-Mail: perlguy@technologist.com $
$ Resume: http://www.inlink.com/~perlguy $
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
------------------------------
Date: Mon, 16 Nov 1998 13:19:57 GMT
From: Brent Michalski <perlguy@technologist.com>
Subject: Re: Perl vs C
Message-Id: <3650267D.AFDC4DB@technologist.com>
Paul Davies wrote:
>
> Hi There
>
> Can anyone give me some information as to the relative speeds of perl and C
> programs?
>
> thanks
>
> Paul
Speed:
<-----------|------|---->
Perl C
Development Time:
<---|-----------------|->
C Perl
Coolness Factor: ;-)
<-|--------|------------|> (Note, Java was too low and didn't make
it.)
Python C Perl
Note: These scales are all "relative". The methods used to testing are
known only to me and highly classified.
alt.perl?
What's next alt.binaries.erotica.perl?
Brent
--
Java? I've heard of it, it is what I drink when I am hacking Perl. -me
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
$ Brent Michalski $
$ -- Perl Evangelist -- $
$ E-Mail: perlguy@technologist.com $
$ Resume: http://www.inlink.com/~perlguy $
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
------------------------------
Date: Mon, 16 Nov 1998 09:54:28 -0600
From: James Ludlow <ludlow@us.ibm.com>
Subject: Re: Perl_for_Win32_FAQ
Message-Id: <36504AB4.F56E71B2@us.ibm.com>
George C. Hetrick wrote:
> Can anyone tell me where Perl_for_Win32_FAQ.html has gone to?
[snip]
It looks like the old faq is gone (although someone must have a copy).
The new one can be found at http://www.activestate.com .
--
James Ludlow (ludlow@us.ibm.com)
(Any opinions expressed are my own, not necessarily those of IBM)
------------------------------
Date: Mon, 16 Nov 1998 16:16:00 +0100
From: "J|rgen Ibelgaufts" <ibelgaufts@gfc-net.de>
Subject: Problem with $O, need help
Message-Id: <365041B0.F0CADEEE@gfc-net.de>
Hi,
I want my perl script find out from where (drive and directory) it has been called
(under windows nt or 95/98). I need a function answering something like
"c:/windows/blah/myscript.pl" or "a:/myscript.pl" . The documentation says that
the variable $O contains this information, but it does not seem to work under
windows. I get
Name "main::O" used only once: possible typo at .\lwtest.pl line 2.
Use of uninitialized value at .\lwtest.pl line 2.
(I tried both the capital letter O and zero).
Thanks in advance
Juergen Ibelgaufts
------------------------------
Date: Mon, 16 Nov 1998 14:03:30 GMT
From: dave@mag-sol.com
To: erik_lembke@my-dejanews.com
Subject: Re: Q: how to sort reference designators?
Message-Id: <72pbbi$dff$1@nnrp1.dejanews.com>
[email cc of usenet post sent to cited author]
In article <72otqs$2j3$1@nnrp1.dejanews.com>,
erik_lembke@my-dejanews.com wrote:
> i have to sort reference designators.
> They have following Syntax:
> <alphabetic description><number of occurance>
>
> example: R1, R10, CBL1, CBL2, CBL10
>
> if i sort them i got following order:
> CBL1, CBL10, CBL2, R1, R10
>
> I can't sort them numerically (because of the alphabetic description)
>
> are there any modules/functions available which would solve this problem??
Using Perl's sort function you can build your own custom sort routine. It
would look something like this:
my @ref_des = qw(R1 R10 CBL1 CBL2 CBL10);
my @sorted_ref_des;
@sorted_ref_def = sort ref_des_sort_function @ref_des;
print "@sorted_ref_des\n";
sub ref_des_sort_function
{
# Here you get passed to parameters
# $a and $b which are elements of the
# list. You can carry out any tests you
# want on them. You must return -1, 0 or 1
# depending on how they sort relative to
# each other. See perldoc -f sort for more
# details.
# In this case you might split $a and $b
# into the alpha and numeric portions
# and compare the alpha section using
# cmp and the numeric portion using <=>
# but only if the alpha sections are
# the same. The code might look a bit like this:
my ($a_alpha, $a_num, $b_alpha, $b_num);
$a =~ /(^[a-zA-z]+)(\d)+$/;
($a_alpha, $a_num) = ($1, $2);
$b =~ /(^[a-zA-z]+)(\d)+$/;
($b_alpha, $b_num) = ($1, $2);
return ($a_alpha cmp $b_alpha) || ($a_num <=> $b_num)
}
hth,
Dave...
--
Magnum Solutions Ltd: <http://www.mag-sol.com/>
London Perl M[ou]ngers: <http://london.pm.org/>
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Mon, 16 Nov 1998 16:17:22 -0500
From: Todd Kempf <kempf.todd@student.uni-tuebingen.de>
Subject: substitute
Message-Id: <36509662.3A9A2B65@student.uni-tuebingen.de>
Hi,
I'm trying to change a list of characters into their hex counterparts.
For example, to make a valid filename I have tried something like:
$vfn =~ s/\*\?\\\//%[A..F]/g;
and so on. I know, the above is just chicken scratch of what I've been
trying to do. So the question is, how does one take a string such as
"f*len?me" and turn it into something such as "f%3Elen%17me"? Any help
is appreciated.
Todd
------------------------------
Date: Mon, 16 Nov 1998 17:21:40 +0200
From: Basile Laderchi <killer@ath.forthnet.gr>
Subject: Unix to Win32 conversion
Message-Id: <36504303.CE0B4018@ath.forthnet.gr>
--------------8F72F4443EC26568AF12CEA9
Content-Type: text/plain; charset=iso-8859-7
Content-Transfer-Encoding: 7bit
i have a small script that i gotta convert from Unix to WinNT/95
it uses the sendmail and date external proggies of Unix
for the sendmail i have found several but i have some probs on finding
something for the date one. any ideas?
TIA
--
__ __ ____
| |/ /'|| _ ,_ / () \ ,_ _ _ | Killer@ath.forthnet.gr
|__|\__\|||(/_| /__/\__\| |(_|(/_| ICQ 2870180
,_|
--------------8F72F4443EC26568AF12CEA9
Content-Type: text/html; charset=iso-8859-7
Content-Transfer-Encoding: 7bit
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
i have a small script that i gotta convert from Unix to WinNT/95
<br>it uses the sendmail and date external proggies of Unix
<br>for the sendmail i have found several but i have some probs on finding
something for the date one. any ideas?
<p>TIA
<p><tt>--</tt>
<br><tt> __ __
____</tt>
<br><tt>| |/ /'|| _ ,_ / () \ ,_ _
_ | Killer@ath.forthnet.gr</tt>
<br><tt>|__|\__\|||(/_| /__/\__\| |(_|(/_| ICQ
2870180</tt>
<br><tt>
,_|</tt>
<br> </html>
--------------8F72F4443EC26568AF12CEA9--
------------------------------
Date: Mon, 16 Nov 1998 10:55:38 -0500
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: Unix to Win32 conversion
Message-Id: <fl_aggie-1611981055380001@aggie.coaps.fsu.edu>
In article <36504303.CE0B4018@ath.forthnet.gr>, Basile Laderchi
<killer@ath.forthnet.gr> wrote:
+ i have a small script that i gotta convert from Unix to WinNT/95
+ it uses the sendmail and date external proggies of Unix
+ for the sendmail i have found several but i have some probs on finding
+ something for the date one. any ideas?
You mean something like:
$current_date=localtime;
print $current_date,"\n";
result: Mon Nov 16 10:55:08 1998
James
------------------------------
Date: Mon, 16 Nov 1998 18:18:08 +0200
From: Basile Laderchi <killer@ath.forthnet.gr>
Subject: Re: Unix to Win32 conversion
Message-Id: <36505040.79924A62@ath.forthnet.gr>
--------------BF98ABADFF166BF037310C65
Content-Type: text/plain; charset=iso-8859-7
Content-Transfer-Encoding: 7bit
actually it has this:
$date = `$date_command +"%D"`;
$date =~ s/\n*$//;
where $date_command = "/bin/date"
--
__ __ ____
| |/ /'|| _ ,_ / () \ ,_ _ _ | Killer@ath.forthnet.gr
|__|\__\|||(/_| /__/\__\| |(_|(/_| ICQ 2870180
,_|
--------------BF98ABADFF166BF037310C65
Content-Type: text/html; charset=iso-8859-7
Content-Transfer-Encoding: 7bit
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
actually it has this:
<p>$date = `$date_command +"%D"`;
<br>$date =~ s/\n*$//;
<p>where $date_command = "/bin/date"
<p><tt>--</tt>
<br><tt> __ __
____</tt>
<br><tt>| |/ /'|| _ ,_ / () \ ,_ _
_ | Killer@ath.forthnet.gr</tt>
<br><tt>|__|\__\|||(/_| /__/\__\| |(_|(/_| ICQ
2870180</tt>
<br><tt>
,_|</tt>
<br> </html>
--------------BF98ABADFF166BF037310C65--
------------------------------
Date: Mon, 16 Nov 1998 16:28:32 GMT
From: cim@online.ee (_cim_)
Subject: upper to lowercase
Message-Id: <3650510f.15423434@news.online.ee>
I use this:
$text =~ tr/A-Z/a-z/;
to make the text lowercase, but it doesn't work with v d u | (and some
other strange ones) - leaves them as they are.
help!
------------------------------
Date: Mon, 16 Nov 1998 13:51:41 +0000
From: Mark Hamlin <mark.c.hamlin@bt.com>
Subject: Use of Shell commands - Help!!!
Message-Id: <36502DED.CD84A2DC@bt.com>
--------------A545EE5BF1C32C4FDFEE6476
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Hi,
I'm using perl for some 'simple' CGIs. The tasks involves kicking off
scripts on other
boxes (HP-UX / Sun) copying files to the web server for local
processing.
I'm having problems with the shell side of things. I am familiar with
the ksh 'r'
commands rcp, rsh, rlogin etc. What is the easiest way getting this
functionality. I
need various other simple o/s functions e.g ls etc, which I am currently
doing by using a korn shell (cgi called from
www) to prepare all the data, ie copy over the files from remote
location, save list to file - late perl lists file - very
silly !!!!!!!!!
This is what I got from Perl in a Nutshell
use Shell qw(date cp ps); # list shell commands you want to use
$date = date(); # put the output of the date(1) command into $date
cp("-p" "/etc/passwd", "/tmp/passwd"); # copy password file to a tmp
file
print ps("-ww"); # print the results of a "ps -ww" command
All looks nice and simple but a tad more difficult in reality.
Couldn't get it to work in CGI script, started trying to test the syntax
in a little script. When I run the following or
any variation I get a message from the interpreter 'Segmentation Fault
(Coredump)' ...not very friendly.
#!/usr/local/bin/perl
use qw(rcp ls cat)
ls; # also tried cat("filename"); & others
Please can you help me!!
Many Thanks,
Mark Hamlin
--
Work: mailto:mark.c.hamlin@bt.com 01473 646703
Personal: mailto:mark@dimitrinet.demon.co.uk
___....-----'---'-----....___
=========================================
___'---..._______...---'___
(___) _|_|_|_ (___)
\\____.-'_.---._'-.____//
~~~~'.__'---'__.'~~~~
~~~~~~~
'More speed'
Sisco
Please use you auto reply where possible to distribute to both
mailboxes.
--------------A545EE5BF1C32C4FDFEE6476
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
<HTML>
Hi,
<P>I'm using perl for some 'simple' CGIs. The tasks involves kicking off
scripts on other
<BR>boxes (HP-UX / Sun) copying files to the web server for local processing.
<P>I'm having problems with the shell side of things. I am familiar
with the ksh 'r'
<BR>commands rcp, rsh, rlogin etc. What is the easiest way getting
this functionality. I
<BR>need various other simple o/s functions e.g ls etc, which I am currently
doing by using a korn shell (cgi called from
<BR>www) to prepare all the data, ie copy over the files from remote location,
save list to file - late perl lists file - very
<BR>silly !!!!!!!!!
<P>This is what I got from Perl in a Nutshell
<P>use Shell qw(date cp ps); # list shell commands you want to use
<BR>$date = date(); # put the output of the date(1) command
into $date
<BR>cp("-p" "/etc/passwd", "/tmp/passwd"); # copy password file to
a tmp file
<BR>print ps("-ww"); # print the results of a "ps -ww" command
<P>All looks nice and simple but a tad more difficult in reality.
<P>Couldn't get it to work in CGI script, started trying to test the syntax
in a little script. When I run the following or
<BR>any variation I get a message from the interpreter 'Segmentation Fault
(Coredump)' ...not very friendly.
<P>#!/usr/local/bin/perl
<BR>use qw(rcp ls cat)
<BR>ls; # also tried cat("filename");
& others
<P>Please can you help me!!
<P>Many Thanks,
<BR>Mark Hamlin
<P><TT>--</TT>
<BR><TT>Work: <A HREF="mailto:mark.c.hamlin@bt.com">mailto:mark.c.hamlin@bt.com</A> 01473 646703</TT>
<BR><TT>Personal: <A HREF="mailto:mark@dimitrinet.demon.co.uk">mailto:mark@dimitrinet.demon.co.uk</A></TT><TT></TT>
<P><TT> ___....-----'---'-----....___</TT>
<BR><TT> =========================================</TT>
<BR><TT> ___'---..._______...---'___</TT>
<BR><TT> (___)
_|_|_|_ (___)</TT>
<BR><TT> \\____.-'_.---._'-.____//</TT>
<BR><TT>
~~~~'.__'---'__.'~~~~</TT>
<BR><TT>
~~~~~~~</TT>
<BR><TT> 'More speed'</TT>
<BR><TT> Sisco</TT><TT></TT>
<P><TT>Please use you auto reply where possible to distribute to both mailboxes.</TT>
<BR><TT></TT> </HTML>
--------------A545EE5BF1C32C4FDFEE6476--
------------------------------
Date: Mon, 16 Nov 1998 14:13:34 GMT
From: cenkersoy@my-dejanews.com
Subject: Re: Win32::NetAdmin::GetServers()
Message-Id: <72pbue$dvr$1@nnrp1.dejanews.com>
Check http://www.roth.net
These guys make a superset of NetAdmin called AdminMisc and the reference
material on their site is very good.
Cheers,
In article <72i8cl$s31$1@nnrp1.dejanews.com>,
odinjon@my-dejanews.com wrote:
> Hi,
>
> I'm looking for someone who has used the Win32::NetAdmin::GetServers()
> function. I'm trying to use it, but seem to only be getting a subset
> of the computers on our domain.
>
> Have you had any success or problems with this function or module?
>
> TIA,
>
> Odin
> --
> Odin.Anderson@TDSTelecom.Com
>
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
>
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Mon, 16 Nov 1998 16:27:51 GMT
From: keydet89@yahoo.com
Subject: Win32::TieRegistry and EventLog
Message-Id: <72pjq7$l4l$1@nnrp1.dejanews.com>
Does anyone have working examples of scripts that use
Win32::TieRegistry? I have NT 4.0 w/ ActivePerl build 506.
Also, does anyone have any simple, working examples of the
EventLog package?
Thanks...
Keydet
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: 12 Jul 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Special: Digest Administrivia (Last modified: 12 Mar 98)
Message-Id: <null>
Administrivia:
Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.
If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu.
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". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". 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". It appears twice
weekly in the group, but is not distributed in the digest.
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 V8 Issue 4229
**************************************