[7483] in Perl-Users-Digest
Perl-Users Digest, Issue: 1109 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Oct 1 11:17:10 1997
Date: Wed, 1 Oct 97 08:00:34 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Wed, 1 Oct 1997 Volume: 8 Number: 1109
Today's topics:
@ in formats denis@mathi.uni-heidelberg.de
Re: @ in formats (Lack Mr G M)
Re: @ in formats <eike.grote@theo.phy.uni-bayreuth.de>
[Q] I want GD.pm library <zzheng@fmarathon.com>
Re: accessing permissions (rwx) (Tom Grydeland)
Re: accessing permissions (rwx) <rootbeer@teleport.com>
Can't debug a perl script. <Pierre.Bergdolt@ansf.alcatel.fr>
How do I build a fast updating frame? <matthias.hellmund@nienburg-weser.de>
Re: How do I build a fast updating frame? (Jeremy D. Zawodny)
ICP through UDP - fails after a few connections (Matija Grabnar)
Re: MUD's in Perl? (Mick Farmer)
Re: MUD's in Perl? (Nigel Reed)
Re: Newbie ques: How to concatenate two strings? <rootbeer@teleport.com>
perl encryption function <ejammes@infogrames.fr>
Re: perl encryption function <seay@absyss.fr>
Re: perl encryption function <eike.grote@theo.phy.uni-bayreuth.de>
Re: Perl Interface to /etc/passwd <bryan@eai.com>
Re: Perl Questions <steve@prilnari.com>
Re: Perl to C convertor <rootbeer@teleport.com>
Pine --> Eudora Converter <chris_braiotta@harvard.edu>
Please help me with this?! (Andrew Collington)
Re: regex for one "two three" four (Mick Farmer)
test hallo@haal,.c.com
Re: Unix -> NT conversion (Jeremy D. Zawodny)
Re: Unix -> NT conversion (Erik Y. Adams)
using perl for win32 to send mail via mapi <jon.tracey@earthling.net>
Re: Webpage checksum <rootbeer@teleport.com>
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 01 Oct 1997 10:55:46 +0100
From: denis@mathi.uni-heidelberg.de
Subject: @ in formats
Message-Id: <34321E22.A2A@mathi.uni-heidelberg.de>
hi,
how can i use @ or ~ in a format. i tryd to escape it with \
but it doesn't work...
thanks
denis
------------------------------
Date: Wed, 01 Oct 1997 11:22:24 BST
From: gml4410@ggr.co.uk (Lack Mr G M)
Subject: Re: @ in formats
Message-Id: <1997Oct1.112224@ukwit01>
In article <34321E22.A2A@mathi.uni-heidelberg.de>, denis@mathi.uni-heidelberg.de writes:
|> hi,
|>
|> how can i use @ or ~ in a format. i tryd to escape it with \
|> but it doesn't work...
Use @ in the picture line and add the relevant constants on the
following line:
----------------------------------------
format =
This is a line with an @ and an @
'@' '~'
.
write;
----------------------------------------
--
----------- Gordon Lack ----------------- gml4410@ggr.co.uk ------------
The contents of this message *may* reflect my personal opinion. They are
*not* intended to reflect those of my employer, or anyone else.
------------------------------
Date: Wed, 01 Oct 1997 13:13:51 +0200
From: Eike Grote <eike.grote@theo.phy.uni-bayreuth.de>
Subject: Re: @ in formats
Message-Id: <3432306F.2781@theo.phy.uni-bayreuth.de>
Hallo !
denis@mathi.uni-heidelberg.de wrote:
>
> hi,
>
> how can i use @ or ~ in a format. i tryd to escape it with \
> but it doesn't work...
You should create a single character field and provide the special
character in the argument line, like this:
#!/usr/local/bin/perl -w
write;
format STDOUT =
Test 1: @ Test 2: @
'~', '@'
.
Bye, Eike
--
======================================================================
Eike Grote, Theoretical Physics IV, University of Bayreuth, Germany
----------------------------------------------------------------------
e-mail -> eike.grote@theo.phy.uni-bayreuth.de
WWW -> http://www.phy.uni-bayreuth.de/theo/tp4/members/grote.html
http://www.phy.uni-bayreuth.de/~btpa25/
======================================================================
------------------------------
Date: Wed, 01 Oct 1997 09:49:46 -0400
From: Double Z <zzheng@fmarathon.com>
Subject: [Q] I want GD.pm library
Message-Id: <343254FA.2743@fmarathon.com>
I want to use the GD.pm library but there is no C compiler on my
server machine. I download the GD.pm from MIT, but I need the cc
to "make" it... ( I don't want to install cc or gcc on my server
machine.)
Anybody can help me to get the GD.pm ? (not the GD.pm.tar.gz
format). My server machine is Unix, Sun Solaries 2.4. The perl
version on my machine is 5.002. Thank you!
--
zd
------------------------------
Date: 1 Oct 1997 11:50:30 GMT
From: Tom.Grydeland@phys.uit.no (Tom Grydeland)
Subject: Re: accessing permissions (rwx)
Message-Id: <slrn634e86.e17.Tom.Grydeland@mitra.phys.uit.no>
draj@chronologic.com (Dhiraj Raj) writes:
> > how do i access the permissions (rwx) of a file in perl
Martien Verbruggen <mgjv@mali.comdyn.com.au> wrote:
> perldoc -f stat
And of course there's also the (shellish) file test operators,
perldoc -f -X
> Martien Verbruggen |
--
//Tom Grydeland <Tom.Grydeland@phys.uit.no>
------------------------------
Date: Wed, 1 Oct 1997 06:51:05 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: Dhiraj Raj <draj@chronologic.com>
Subject: Re: accessing permissions (rwx)
Message-Id: <Pine.GSO.3.96.971001064830.20846E-100000@usertest.teleport.com>
On 30 Sep 1997, Dhiraj Raj wrote:
> how do i access the permissions (rwx) of a file in perl
Use the stat() function, documented in the perlfunc(1) manpage. This
returns a bitstring (instead of a symbolic permission) so you can do
logical bit tests on it, if that's what you need. Also, check the -X
filetests from the same manpage, since those might give you what you
want with even simpler code. Hope this helps!
--
Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
Ask me about Perl trainings!
------------------------------
Date: Wed, 01 Oct 1997 12:46:49 +0200
From: Pierre BERGDOLT <Pierre.Bergdolt@ansf.alcatel.fr>
Subject: Can't debug a perl script.
Message-Id: <34322A19.41C6@ansf.alcatel.fr>
Hi perl world!
I have a problem with a perl script called "cc_upvw".
If I run:
"perl cc_upvw" or "perl -w cc_upvw"
this works fine.
But if I run:
"perl -d cc_upvw"
I get the following message:
Stack dump during die enabled outside of evals.
Loading DB routines from perl5db.pl patch level 0.94
Emacs support available.
Enter h or `h h' for help.
Stack dump during die enabled outside of evals.
Loading DB routines from perl5db.pl patch level 0.94
Emacs support available.
Enter h or `h h' for help.
Got SEGV!
Signal SEGV: No such file or directory
Resources lost
Did anyone have an idea to help me so I can do debug on my perl scripts.
For information I'm working under Digital Unix V3.2g.
Thanks to answer by e-mail.
--
-----------------------------------------------------------
Pierre Bergdolt Pierre.Bergdolt@ansf.alcatel.fr
Alcatel TELECOM
1 a 7, rue Ampere tel: + 33 (0)1.69.81.12.79
91300 Massy - FRANCE fax: + 33 (0)1.69.81.17.23
-----------------------------------------------------------
------------------------------
Date: 1 Oct 1997 11:45:31 GMT
From: "Matthias Hellmund" <matthias.hellmund@nienburg-weser.de>
Subject: How do I build a fast updating frame?
Message-Id: <01bcce63$5af633e0$0100a8c0@o63hutef>
I am trying to program a small chat system. Now I need a fast way to update
the message-window. There should be a separate message-window for every
chat-participant to allow private messages.
I've thought about a message-file that contains all messages, and every
reader-script checks the file if it has been modified (open, read first
message, check if it's a new one, then update frame), but this would cause
a very intensive file-access and probably conflicts when a script writes
and another reads the same time.
Isn't there another way to solve my problem?
Example-script-codes and e-mail-replies appreciated
CU
Matthias
--
Matthias Hellmund
E-Mail: matthias.hellmund@nienburg-weser.de
Homepage (NEW!): http://www.nienburg-weser.de/~hellmund
------------------------------
Date: Wed, 01 Oct 1997 13:31:48 GMT
From: zawodny@hou.moc.com (Jeremy D. Zawodny)
Subject: Re: How do I build a fast updating frame?
Message-Id: <3433501c.161269232@igate.hst.moc.com>
[cc'd automagically to original author]
On 1 Oct 1997 11:45:31 GMT, "Matthias Hellmund"
<matthias.hellmund@nienburg-weser.de> wrote:
>I am trying to program a small chat system. Now I need a fast way to update
>the message-window. There should be a separate message-window for every
>chat-participant to allow private messages.
>I've thought about a message-file that contains all messages, and every
>reader-script checks the file if it has been modified (open, read first
>message, check if it's a new one, then update frame), but this would cause
>a very intensive file-access and probably conflicts when a script writes
>and another reads the same time.
So... what's this got to do with Perl? Sounds more like a program
design problem than something specific to Perl.
>Isn't there another way to solve my problem?
Probably. Tell us exactly what the problem is...
Is Perl the problem?
Can you not figure out how to make Perl do something?
Is Perl doing something other than what you'd expect?
Would the problem be any different if you were to use a language other
than Perl? (HINT: If not, it doesn't really qualify as a Perl
question.)
>Example-script-codes and e-mail-replies appreciated
You could post a sample of your code for us to look at.
Jeremy
--
Jeremy Zawodny
Internet Technology Group
Information Technology Services
Marathon Oil Company, Findlay Ohio
http://www.marathon.com/
Unless explicitly stated, these are my opinions only--not those of my employer.
------------------------------
Date: 1 Oct 1997 13:36:45 GMT
From: matija@arnes.si (Matija Grabnar)
Subject: ICP through UDP - fails after a few connections
Message-Id: <60tjld$cav$1@kanja.arnes.si>
I have two scripts which are supposed to talk to each other through
UDP. The code is more or less copied from the IPC section of the Turquise
Camel, with some help from Stevens' UNIX network programming.
The client fails with:
send: Operation not supported on transport endpoint at ./iclient line 12.
However, if I comment out the for loop and the assignment to $_, and uncomment
instead the line with the while (<>), the client fails with
send: Operation not supported on transport endpoint at ./iclient line 11, <> chunk 8.
but only if I feed new lines in quickly enough, like two per second.
What is going on? Surely I can't be overloading the server with the speed
of my typing, can I? I need this to implement a communication with a process
which will be sending data much quicker than I can type.
I chose UDP intentionaly: there is no harm if an individual packet gets
lost and I want as little overhead as possible. The ability to transparently
handle multiple connections is an added plus.
The server is this
#!/usr/bin/perl -w
use Socket;
my $port=1776;
my $iaddr=sockaddr_in($port,INADDR_ANY) or die "sockaddr: $!";
my $proto=getprotobyname('udp');
socket(Server,PF_INET,SOCK_DGRAM,$proto) or die "Socket: $!";
bind(Server,$iaddr) or die "bind:$!";
$rin="";
vec($rin,fileno(Server),1)=1;
$rtime="123";
while ($rtime || select($rout=$rin,undef,undef,undef)) {
$rtime="";
($hisppaddr=recv(Server,$rtime,100,0)) or die "recv:$!";
print "<$rtime>-<".join("><",sockaddr_in($hisppaddr)).">\n";
}
And this is the client:
#!/usr/bin/perl -w
use Socket;
my $port=1776;
my $proto=getprotobyname('udp');
socket(Server,PF_INET,SOCK_DGRAM,$proto) or die "Socket: $!";
$siaddr=sockaddr_in($port,INADDR_LOOPBACK);
#while (<>) {
for ($i=1;$i<100;$i++) {
$_="Line $i\n";
bind(Server,sockaddr_in(0,INADDR_LOOPBACK));
defined(send(Server,$_,length($_),$siaddr)) or die "send: $!";
# close(Server);
}
Summary of my perl5 (5.0 patchlevel 4 subversion 3) configuration:
Platform:
osname=solaris, osvers=2.5, archname=sun4-solaris
uname='sunos rzenik 5.5 generic_103093-13 sun4m sparc sunw,sparcstation-20 '
hint=recommended, useposix=true, d_sigaction=define
bincompat3=y useperlio=undef d_sfio=undef
Compiler:
cc='gcc', optimize='-O', gccversion=2.7.2.2
cppflags='-I/usr/local/include'
ccflags ='-I/usr/local/include'
stdchar='unsigned char', d_stdstdio=define, usevfork=false
voidflags=15, castflags=0, d_casti32=define, d_castneg=define
intsize=4, alignbytes=8, usemymalloc=y, randbits=15
Linker and Libraries:
ld='gcc', ldflags =' -L/usr/local/lib -L/opt/gnu/lib'
libpth=/usr/local/lib /opt/gnu/lib /lib /usr/lib /usr/ccs/lib
libs=-lsocket -lnsl -lgdbm -ldb -ldl -lm -lc -lcrypt
libc=/lib/libc.so, so=so
useshrplib=false, libperl=libperl.a
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
cccdlflags='-fpic', lddlflags='-G -L/usr/local/lib -L/opt/gnu/lib'
Characteristics of this binary (from libperl):
Built under solaris
Compiled at Sep 3 1997 08:39:08
@INC:
/opt/gnu/lib/perl5/sun4-solaris/5.00403
/opt/gnu/lib/perl5
/opt/gnu/lib/perl5/site_perl/sun4-solaris
/opt/gnu/lib/perl5/site_perl
/opt/gnu/lib/perl5/sun4-solaris
.
--
"My name is Not Important. Not to friends.
But you can call me mr. Important" - Not J. Important
Matija.Grabnar@arnes.si
------------------------------
Date: Wed, 1 Oct 1997 11:20:22 GMT
From: mick@picus.dcs.bbk.ac.uk (Mick Farmer)
Subject: Re: MUD's in Perl?
Message-Id: <EHDE5y.M6s@mail2.ccs.bbk.ac.uk>
Dear Nigel,
We use Boutell's PerlMUD with no problems. Check it out
on http://www.boutell.com/perlmud/.
Regards,
Mick
------------------------------
Date: 1 Oct 1997 11:46:29 GMT
From: nigelr@convex.hp.com (Nigel Reed)
Subject: Re: MUD's in Perl?
Message-Id: <60td6l$pag$1@news.rsn.hp.com>
Mick Farmer (mick@picus.dcs.bbk.ac.uk) wrote:
> Dear Nigel,
> We use Boutell's PerlMUD with no problems. Check it out
> on http://www.boutell.com/perlmud/.
Thanks for the tip, I've had suggestions via email too for this
site, I'll go check it out.
Regards
Nigel
------------------------------
Date: Wed, 1 Oct 1997 07:01:55 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: Faust Gertz <faust@wwa.com>
Subject: Re: Newbie ques: How to concatenate two strings?
Message-Id: <Pine.GSO.3.96.971001065602.20846G-100000@usertest.teleport.com>
On Tue, 30 Sep 1997, Faust Gertz wrote:
> Just for my own information, why is
> "$x = $y . $z;" a _better_ choice than
> "$x = join ('', $y, $z);"?
Less typing. :-)
Okay, that's not the _only_ critereon to use. But it's harder to make a
mistake with this shorter code, so it's easier to write and maintain. And
it's easy to read, too, IMHO.
All that said, I'd probably prefer this in almost every case.
$x = "$y$z";
It's even less typing, less to go wrong, even _easier_ to maintain (adding
a space between the items, for example, or putting on a trailing newline),
easier (IMHO) to read and understand. But, of course, TMTOWTDI.
Hope this helps!
--
Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
Ask me about Perl trainings!
------------------------------
Date: 1 Oct 1997 09:45:13 GMT
From: "Emmanuel Jammes" <ejammes@infogrames.fr>
Subject: perl encryption function
Message-Id: <01bcce4f$7f332dd0$4003420a@manu>
I'd like to find a perl function to encrypt a string (for example a
password).
For instance, under linux, there is a C function named 'crypt' which
permits do this.
Does it exist in perl?
--
------------------------------------------------------------------
Emmanuel Jammes ejammes@infogrames.fr
INFOGRAMES http://www.infogrames.fr
82-84, rue du 1er mars 1943 Tel: 04.72.65.50.73
69628 Villeurbanne
------------------------------------------------------------------
------------------------------
Date: Wed, 01 Oct 1997 13:16:33 +0200
From: Doug Seay <seay@absyss.fr>
To: Emmanuel Jammes <ejammes@infogrames.fr>
Subject: Re: perl encryption function
Message-Id: <34323111.526C142@absyss.fr>
[posted and mailed]
Emmanuel Jammes wrote:
>
> I'd like to find a perl function to encrypt a string (for example a
> password).
> For instance, under linux, there is a C function named 'crypt' which
> permits do this.
> Does it exist in perl?
Yes, and it is in the documentation. "perldoc -f crypt" for what you
want.
- doug
------------------------------
Date: Wed, 01 Oct 1997 13:04:39 +0200
From: Eike Grote <eike.grote@theo.phy.uni-bayreuth.de>
Subject: Re: perl encryption function
Message-Id: <34322E47.167E@theo.phy.uni-bayreuth.de>
Bonjour,
Emmanuel Jammes wrote:
>
> I'd like to find a perl function to encrypt a string (for example a
> password).
> For instance, under linux, there is a C function named 'crypt' which
> permits do this.
> Does it exist in perl?
Did you take a look at the 'perlfunc' manual page ? Guess what you
can find there ... (any similarity to C/UNIX functions is intentional
...)
Bye, Eike
--
======================================================================
Eike Grote, Theoretical Physics IV, University of Bayreuth, Germany
----------------------------------------------------------------------
e-mail -> eike.grote@theo.phy.uni-bayreuth.de
WWW -> http://www.phy.uni-bayreuth.de/theo/tp4/members/grote.html
http://www.phy.uni-bayreuth.de/~btpa25/
======================================================================
------------------------------
Date: Wed, 01 Oct 1997 09:35:54 -0500
From: Bryan Hart <bryan@eai.com>
Subject: Re: Perl Interface to /etc/passwd
Message-Id: <34325FCA.41C6@eai.com>
Dirge wrote:
>
> Creeping stealthily through the corridors of comp.lang.perl,
> I overheard Matthew Burnham say:
>
> : fozz@cray.com (Doran Barton) wrote:
>
> : [snip]
>
> : >Assuming you have crypt support, all you will need to do is utilize this
> : >Perl functions:
>
> : [snip]
>
> : >sub crypt_passwd {
> : > local($passwd) = @_;
> : > local($salt);
> : >
> : > srand(time());
> : > $salt = &to64(rand(32767),2);
> : >
> : > return(crypt($passwd,$salt));
> : >}
> : Since you know about using crypt properly, I can't get it to work
> : properly in a .htpasswd file.
>
> : Does it matter what salt I use?
> : ie. can I do crypt($passwd, 'aa');?
> : or can I do crypt($passwd, 'bb');
> : and either one will work when htaccess validates the password?
>
> It's generally a bad idea to use a set salt. I don't know about htaccess,
> but when I was looking at crypt, ISTR that its process was to take a key
> (the salt) and repeadtedly encrypt the password through use of that key,
> with modifications happening each time. The encypted password is then
> passed back with the initial salt tacked on the front so that the password
> can be checked in the future. It is exceptionally hard to decrypt the
> password, the only way a check can be made is by encrypting the passwd
> again. Using a set salt will reduce the effectiveness of crypt.
>
> : I can't see how it will manage to do this, since it would have to go up
> : to at least (depending on how many different characters are valid) 26^2
> : crypts to check for all the valid two-letter salts, etc.
>
> Its higher than that.... around about 62^2, cos a slat can have
> upper+lowercase and numbers. I don't think punctuation is used...
Actually I think it's 65^2 - it appears there are 3 valid punctuation
characters (see below).
>
> The point is that it is infeasible to try crakcing a passwd this way: you
> have to know the passwd and salt in order to compare the two.
>
> : Or, since I can't get htpasswd to work properly when I use perl's crypt
> : function, has a particular salt got to be used?
>
> I doubt it. The problem may well be that perl and htaccess do not use the
> same crypt function.
>
perl's crypt and htpasswd's crypt should be the same on a given system -
both compile against the same libraries on most UNIX platforms. I found
and modified a perl script to create htpasswd entries, so I know it's
possible. Here's the relevant portion of perl:
## Create the .htpasswd file entry
##############
srand($$|time); # random seed
@saltchars=(a..z,A..Z,0..9,'.','/'); # valid salt chars
$salt=$saltchars[int(rand($#saltchars+1))]; # first random salt char
$salt.=$saltchars[int(rand($#saltchars+1))]; # second salt char
$cpw = crypt($in{'passwd'},$salt);
To check if a password is valid, simply take the unencrypted password
and use crypt() as above, using the (old) encrypted password as a salt -
if it's valid the result will be the same as the (old) encrypted
password.
> : Will crypt yield the same results across platforms? ie. will I get the
> : same crypt from the same salt on my own win95 system as on a FreeBSD
> : system.
>
> Well, ideally it should. However... the version of Perl I have on my
> 95machine doesn't have crypt due to "excessive paranoia" so I can't check.
>
Can't help you there - I've never seen a crypt() implementation on
anything but UNIX.
Bryan
--
-------------------------------
| Bryan Hart
| Network Products Engineer
| Engineering Animation Inc.
| Phone: (515) 296-5979
| Fax: (515) 296-7025
| Email: bryan@eai.com
| Web: http://www.eai.com/
-------------------------------
"A conclusion is simply the place where you got tired of thinking"
------------------------------
Date: Wed, 01 Oct 1997 09:10:12 -0500
From: Steve Wells <steve@prilnari.com>
Subject: Re: Perl Questions
Message-Id: <343259C4.D80FE473@prilnari.com>
Arthur Merar wrote:
>
> I have a few questions about Perl:
>
> 1) Is there a way for me to execute a perl/CGI script from an HTML
> document without the user taking any action? Say for example I wanted
> to have a counter on how many times a certain page was hit or something
> like that. How would I execute the perl/CGI script? Can I just call
> it?
>
> Normally I am used to something related to a command button......
There are several ways to do this but three that come to mind are:
1) make the page itself a cgi script.
2) Use Server Side Includes to execute the outside script
or
3) Call the program as a graphic within your HTML. For example:
<IMG SRC="http://my.domain.com/cgi-bin/myscript.cgi">
In order not to have the display return a broken image you may want
to send a one pixel grapic along with it and have the content type
be image/gif or something of that nature.
print "Content-type image/gif\n\n";
When someone loads your page your outside script will run. If you want
to
use the script as a counter and you want to count numerous pages you can
add something from the command line to target that page for your counter
like this:
<IMG SRC="http://my.domain.com/cgi-bin/myscript.org?page1">
etc.
> 2) Does Perl support 2-dimentional arrays? If so, how do you declare
> them?
Yes, and personally I declare them quite well thank you.
@Array = ( ["1", "2"], ["3", "4", "5"],["6", "7", "2-dimentional"]);
die unless ($Array[2][2] eq "2-dimentional") or
print "I am 2-dimentional!\n";
RTFF
> 3) Has anyone heard of this new SQL databases on servers called msql,
> or
> mini SQL? Well, I am trying to find out if it compatible with Perl?
> And if so, how do you issue the SQL commands????
Check out the modules on CPAN.
http://www.perl.com/CPAN/modules/by-module/Msql/
Good Luck,
STEVE
------------------------------
Date: Wed, 1 Oct 1997 07:06:54 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: Eric Hwang <Eric_Hwang@hp.com>
Subject: Re: Perl to C convertor
Message-Id: <Pine.GSO.3.96.971001070423.20846H-100000@usertest.teleport.com>
On Mon, 29 Sep 1997, Eric Hwang wrote:
> Is there a Perl to C convertor available on the net?
Is there a FAQ? :-) (Check section three.)
http://www.perl.com/CPAN/doc/FAQs/FAQ/html/perlfaq.html
Hope this helps!
--
Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
Ask me about Perl trainings!
------------------------------
Date: Wed, 01 Oct 1997 09:47:35 -0500
From: Chris Braiotta <chris_braiotta@harvard.edu>
Subject: Pine --> Eudora Converter
Message-Id: <34326284.38A0AB3C@harvard.edu>
Does anyone know of a script that can convert a PINE folder into a
Eudora mailbox?
Thanks
Chris Braiotta
chris_braiotta@harvard.edu
------------------------------
Date: Wed, 1 Oct 1997 14:52:29 +0100
From: avert@dial.pipex.com (Andrew Collington)
Subject: Please help me with this?!
Message-Id: <MPG.e9c65f917bdda41989680@news.dial.pipex.com>
Hi.
I have just bought the book "Using Perl 5 for Web Programming" and I'm
having a little trouble with some of the code, although I have copied it
straight out of the book.
The bits of code I'm having porblems with go along the lines of:
$words=[td]s/[^\w-' ]//g;
if (!($dirs[$list]=[td]/temp/)) { do something... }
Now, I understand what these do, but what is the [td] bit meant to do? I
have tried running the code but it just gives me errors (it doesn't if I
remove the [td] though!)
Can anyone help with this?
I'm using perl 5.0001 (or is that .001? I cannot remember of the top of
my head, but it's version 5 anyways ;)
Thanks for any help!
Andy
------------------------------
Date: Wed, 1 Oct 1997 11:39:45 GMT
From: mick@picus.dcs.bbk.ac.uk (Mick Farmer)
Subject: Re: regex for one "two three" four
Message-Id: <EHDF2A.sD@mail2.ccs.bbk.ac.uk>
Dear Mark,
Here's a script that does what you require.
while (<>) {
while (/"([^"]*)"\s*|(\w+)\s*/g) {
print "$1\n" if $1;
print "$2\n" if $2;
}
}
Regards,
Mick
------------------------------
Date: 1 Oct 1997 14:23:35 GMT
From: hallo@haal,.c.com
Subject: test
Message-Id: <60tmd7$uq$5@news2.xs4all.nl>
test
------------------------------
Date: Wed, 01 Oct 1997 13:19:00 GMT
From: zawodny@hou.moc.com (Jeremy D. Zawodny)
Subject: Re: Unix -> NT conversion
Message-Id: <34324d71.160586070@igate.hst.moc.com>
[cc'd automagically to original author]
On 30 Sep 1997 21:37:00 GMT, "Aaron" <aaron@soltec.net> wrote:
>I know this has been beaten to death
Then why continue the beating?
>but I have some Perl scripts on Unix
>they use CGI.pm
>I want to move them over to NT
>because the people with the web server didn't ask me what I thought
Common "situation".
>Has anyone else out here attempted such a feat? What kind of problems did
>you find?
Since CGI.pm works on either platform, it has not been a problem.
>I know there are some crazy differences, but I am going to work a lot of
>this out on a 95 machine and then move it over to NT.
To which "crazy difference" to you refer? Perl is Perl, CGI.pm is
CGI.pm.
Jeremy
--
Jeremy Zawodny
Internet Technology Group
Information Technology Services
Marathon Oil Company, Findlay Ohio
http://www.marathon.com/
Unless explicitly stated, these are my opinions only--not those of my employer.
------------------------------
Date: Wed, 01 Oct 1997 06:35:33 -0800
From: erik@earthlink.net (Erik Y. Adams)
Subject: Re: Unix -> NT conversion
Message-Id: <erik-ya023180000110970635330001@news.earthlink.net>
In article <01bccde8$ffa15080$b5910a9f@aurora.cna.com>, "Aaron"
<aaron@soltec.net> wrote:
<snip>
> but I have some Perl scripts on Unix
> they use CGI.pm
CGI.pm works fine. No problems. Really. I use it all the time.
<snip>
> I know there are some crazy differences, but I am going to work a lot of
> this out on a 95 machine and then move it over to NT.
Actually, you'll find the differences between '95 and NT more and more
annoying than the differences between NT and Unix. The main things to look
out for are: there's a difference between binary files and text files
under NT, so set binmode when appropriate; backticks don't work the same
way (I say don't bother); shelling out to utilities doesn't work the same
way (you can system, but don't bother with open (UTIL, "|util.exe")).
Actually, most of this is pretty well documented in the Perl for Win32 FAQ.
Point your browser to www.activestate.com, the home page of ActiveState
(formerly ActiveWare, formerly Hip Communications). They've got links to
all the info you'll need.
One last thing - I recommend going with the standard distribution over
their port, if you can get away with it.
Erik
------------------------------
Date: Wed, 1 Oct 1997 13:27:45 +0100
From: "Jonathan Tracey" <jon.tracey@earthling.net>
Subject: using perl for win32 to send mail via mapi
Message-Id: <60tfk3$ddv$1@plug.news.pipex.net>
Hi
I am trying to adapt a script in the O Reilly book learning perl for win32
to use Mapi to send a message.
Does anyone know a way to force the mapi application to send the mail
instead of leaving it in the mail box until the application is started.
Could you Cc: me in any reply please
Thanks
Jonathan Tracey
------------------------------
Date: Wed, 1 Oct 1997 06:53:55 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: Henrik Gemal <gemal@dk.net>
Subject: Re: Webpage checksum
Message-Id: <Pine.GSO.3.96.971001065257.20846F-100000@usertest.teleport.com>
On Tue, 30 Sep 1997, Henrik Gemal wrote:
> Is there a perl program (module) out there that generates a checksum for
> a remote webpage?
Not one module, but two. :-) By artfully combining the LWP and MD5
modules, you should be able to do what you're asking with just a few lines
of code. Have fun with them!
--
Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
Ask me about Perl trainings!
------------------------------
Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 8 Mar 97)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". 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 1109
**************************************