[7005] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 630 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Jun 18 10:27:39 1997

Date: Wed, 18 Jun 97 07:00:29 -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, 18 Jun 1997     Volume: 8 Number: 630

Today's topics:
     [HELP] PERL/Shell scripting project (Scott R. Ehrlich)
     Re: [HELP] PERL/Shell scripting project (Nathan V. Patwardhan)
     Re: a perl mode in emacs that does a better job with qu <pdcawley@aladdin.net>
     Re: A perl routine to fetch an url (Magnus Bodin)
     Re: Another try (Michael Fuhr)
     Can't find loadable object for module GD (Peter J. Schoenster)
     Re: Content Type <perlprogrammer@hotmail.com>
     DBM question <wood@ziplink.net>
     Re: getpwnam breaks sockets-- why? (Lack Mr G M)
     HELP:compiling perl on a linux i686... (Bruno Boettcher)
     how can I write a long array? (kEQNql)
     Re: how can I write a long array? <sfairey@metrica.co.uk>
     Re: how can I write a long array? (kEQNql)
     how could I print or whatever a character one by one fr (kEQNql)
     Re: how could I print or whatever a character one by on <sfairey@metrica.co.uk>
     Re: How to get browser window size? <rra@stanford.edu>
     Re: HTML Doc Tags Missing? (Brian Orpin)
     Is there an easy way to send email in perl ? Using vers <stein@seas.ucla.edu>
     Re: Major perl problem <jhoglund@mirage.skypoint.com>
     Re: Reference guide updated to 5.004 ? (Johan Vromans)
     Re: Script to verify email addresses? (Jim Esten)
     Re: Sending e-mail using Perl for NT - don't wanna... g <stein@seas.ucla.edu>
     Re: Sockets <clark@s3i.com>
     to use flock, sysopen or open? (Pui Ming WONG)
     unix mail in CGI-Script ? <patrick@mucsun.sps.mot.com>
     Re: What does "UNIX" stand for.. (Don Yuniskis)
     what module to use for sysopen? (Pui Ming WONG)
     Re: what module to use for sysopen? (Michael Fuhr)
     Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: 15 Jun 1997 15:09:49 -0400
From: sehrlich@shore.net (Scott R. Ehrlich)
Subject: [HELP] PERL/Shell scripting project
Message-Id: <5o1elt$il9@shell2.shore.net>

Here's my project -

I would like to send weather pages to myself from data which I am
anonymously FTPing from a weather site. All are ASCII files.

Part one will be to get the files. Part two will be to compare sizes
(newly transfered files from existing copy). If the sizes are the same,
don't do anything. If they are different (meaning there is a change in
the data), process them. Part three will be to send them to my pager. 

Here is the breakdown:

- FTP one of each file (hourly update, zone forecast, and alert) manually
to set the foundation.  Since a couple of the files have the same name, I
will name the hourly update one 'hourly', the zone forecast one 'zone',
and the alert 'alert'.

- FTP (via ncftp?) files on a regular basis and compare the new files to
the existing ones.  To prevent file overwrites, I'll rename these new
files hourly-new, zone-new, and alert-new.  If the new and old copies are
the same, do nothing.  But, if there is a difference, meaning something
has changed...

- extract just the rows and columns I want each from the hourly, zone, and
alert files, and pipe the results to a new files (i.e. hourly-extract,
zone-extract, alert-extract)

- Once the final extracted files have been created, since the e-mail ->
pager gateway of the paging service truncates at 230 characters, the final
step will be to extract every 230 characters from hourly-extract,
zone-extract, and alert-extract, to a new file (hourly.1, hourly.2,
zone.1, zone.2, etc), with hourly.1 containing the first 230 chars,
hourly.2 containing the next 230 chars, etc, until the full message has
been broken down.  Finally, sending each multi-part file to the gateway to
cirumvent their 230 character restriction, permitting me to get the whole
message in multiple parts. 

- run a cron job to automate the above script.

Thanks for any help, guidance, assistance, etc.

-- 
Scott Ehrlich				sehrlich@shore.net
Scott Ehrlich Consulting		Amateur Radio Callsign: wy1z



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

Date: 15 Jun 1997 20:10:43 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: [HELP] PERL/Shell scripting project
Message-Id: <5o1i83$5su@fridge-nf0.shore.net>

Scott R. Ehrlich (sehrlich@shore.net) wrote:
: Here's my project -

Woah oh.  Hope somebody isn't getting us to do his homework.  :-)

: Part one will be to get the files. 

If you're familiar with Perl, and don't mind using it, you'll probably
have desirable results with Net::FTP.  Net::FTP is included with the
Net modules distribution.  It is well-documented internally.

: Part two will be to compare sizes

Get the file from the remote file so that it is output to your
filesystem as a filename.new (or whatever).  Diff the two files
original vs. original.new; if diff returns nothing, they are the same,
so remove (unlink()) original.new.  If they are different, rename
original.new to original, and process original, parsing it the way
you want it.

: Part three will be to send them to my pager. 

Open each file and send it to your pager.  Don't send any pages longer
than 230 characters; Perl has length(), and substr() function which
will be very helpful to you.

Hope this helps!

--
Nathan V. Patwardhan
nvp@shore.net



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

Date: 18 Jun 1997 11:05:00 +0100
From: Piers Cawley <pdcawley@aladdin.net>
Subject: Re: a perl mode in emacs that does a better job with quotes?
Message-Id: <54zpsody5v.fsf@gunnar.aladdin.net>

Shimpei Yamashita <shimpei@socrates.caltech.edu> writes:

> Both the perl-mode that comes with emacs 19.34b and cperl-mode included
> in perl 5.004 are not terribly smart about syntax-highlighting lines with
> unbalanced quotes, like, say,
> 
> s/'/'"'"'/g;  
>
> (this is an actual line from the "gsh" script in perl 5.004
> distribution)
> 
> I'm not too sure how the modes are parsing this line, but it thinks
> the last ' opens a quoted string, and most everything after it are
> greyed out. Not cool.

My usual kluge in this situation is something like:

s/'/'"'"'/g; #';#emacs hack

which leaves emacs back in a sensible state, and me in a slightly more
aggravated state, but not quite aggravated enough to do the lazy thing
and fix cperl-mode. (Mainly 'cos doing the lazy thing would involve
spending far more time learning emacs lisp than I have available...)

> In a more pedestrian example, using the single quote as an
> apostrophe in comments also trigger this behavior, like
> 
> unlink("/var/mail/$USER");    # we don't like this person

Just checked this in cperl-mode and it doesn't seem to be a problem...

-- 
Piers Cawley -- Systems Genie for Aladdin
If a `religion' is defined to be a system of ideas that contains
unprovable statements, then Godel taught us that mathematics is not
only a religion, it is the only religion that can prove itself to be
one. -- John Barrow


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

Date: Wed, 18 Jun 1997 09:21:51 GMT
From: Magnus.Bodin@tychonides.se (Magnus Bodin)
Subject: Re: A perl routine to fetch an url
Message-Id: <33a9a818.61202764@news1.telenordia.se>

silent-warrior@msn.com (silent-warrior) wrote:

>could you repost the original question and the answers.  or email me
>at david@mindbendr.com
>
>
>thanks
>
>
>On 22 May 1997 18:10:51 GMT, mara@cc.hut.fi (Martti Rahkila) wrote:
>
>>Thanks everyone for your help. The 'HEAD' method was indeed what I wanted.
>>
>>My reply address in my previous articles was wrong due to misconfiguration of my
>>news client. Hopefully this is now fixed.
>>-- 
>>
>>/Mara  
>>	Internet: Martti.Rahkila@hut.fi
>>	X.400: G=Martti;S=Rahkila;O=hut;PRMD=inet;ADMD=fumail;C=fi
>>	URL http://www.hut.fi/~mara/index.html
>

Here is at least an answer:


--- cut here ---

#! /usr/bin/perl
#
# htest.pl
#
# usage e.g.
#
# htest.pl www.perl.com
#
# prints the header.
#
#
require "head.pl";


$host=shift;
@L=&http_head($host);
foreach $l (@L) { print "$l\n"; }

--- cut here ---
use IO::Socket;
#
# head.pl
#
# either use @array=&http_head('www.linux.org');
#     or use @array=&http_head('www.ssc.com','/Resell/lj/nonus.html');
#
# quick and dirty hack by magnus bodin june-1997
# 
# Returns globals $HTTP_HEADER{} with header e.g. 
#                          $HTTP_HEADER{'last_modified'}
#                 $HTTP_STATUS_LINE is first line returned, e.g.
#                          HTTP/1.1 200 OK
#                 and sets $HTTP_STATUS to 200 
#                 and      $HTTP_STATUS_STR to OK or Bad Request
#                          or whatever is return after code
#
# document is returned in a @array. 
# Join it to a string with join('',@array);
#
sub http_head {
        ($http_host,$http_url) = @_;
        if ($http_url !~ /^\/(.*)/) { $http_url = "/$http_url"; }
        $http_port='http(80)'; $http_proto='tcp';

        $http_sock = IO::Socket::INET->new(PeerAddr=>$http_host,
                                                PeerPort =>$http_port,
                                                Proto=>$http_proto);
        if ($http_sock) {
                die "$!" unless $http_sock;
                $http_sock->autoflush();
                $http_sock->print("HEAD $http_url HTTP/1.0\n\n");
                @http_doc = $http_sock->getlines();
                $HTTP_STATUS_LINE=shift(@http_doc);
chop($HTTP_STATUS_LINE);
                if ($HTTP_STATUS_LINE =~
/HTTP\/\d+.\d+\s+(\d+)\s+(.*)/i) {
                        $HTTP_STATUS = $1; $HTTP_STATUS_STR = $2;
                }
                $head=1;
                while ($head) { 
                        $http_line = shift(@http_doc);
                        if (length($http_line) < 3) { 
                                $head--; 
                        } else {
                                chop($http_line);
                                if ($http_line =~ /^([A-Za-z0-9\-]+):
(.*)/) {
                                        $http_key=$1; $http_val=$2;

$HTTP_HEADER{$http_key}=$http_val;
                                        push @HTTP_HEADER,$http_line;
                                }
                        }
                }
        }
        @HTTP_HEADER;
}

1;
--- cut here ---



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

Date: 18 Jun 1997 07:05:21 -0600
From: mfuhr@dimensional.com (Michael Fuhr)
Subject: Re: Another try
Message-Id: <5o8meh$slc@flatland.dimensional.com>

Andreas Sliwka <goff@bee.de> writes:

> Im trying to find an elegant way to combine HTML and Perl, i.e. mixing
> it up. I took a look at EmbedPerl and CGI.pm but both have drawbacks,
> the later is not intuitive enough for not-perl-hackers (p-- || !p), the
> other is (imho) to limited. So I tried to write a simple CGI-script,
> that gets the filename of a (so called) PetH file. 

Have you looked at ePerl?

    http://www.engelschall.com/sw/eperl/

Also, your question borders on CGI, so you may want to ask future
questions in comp.infosystems.www.authoring.cgi.

-- 
Michael Fuhr
http://www.dimensional.com/~mfuhr/


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

Date: Wed, 18 Jun 1997 06:09:13 GMT
From: pschon@rede.com (Peter J. Schoenster)
Subject: Can't find loadable object for module GD
Message-Id: <33a77ac8.0@chaos.magibox.net>

Hello,

I have a virtual server running on BSDi.

I am not that familiar with @INC.  I use Perl5.003 in many other
scripts.  Only when I try to use GD do I run into trouble.

This is perl, version 5.003 with EMBED
        built under bsdos at Mar 11 1997 13:36:32
        + suidperl security patch

Copyright 1987-1996, Larry Wall

Line 50 of GD is: bootstrap GD;

I noticed that GD wanted to use Perl5.002 (I just changed it to
5.003).

The script I am using is run in /www/htdocs/... (not in cgi-bin but
GD.pm does not work in any script anywhere).

I have been doing the old try everyting approach
use lib '/usr/local/etc/httpd/cgi-bin';

thought I would even try this (where I have GD.pm as well as in my
cgi-bin - am I causing trouble here?  I don't know):
use lib '/usr/local/lib/perl5';

>From searching that I have done I would think that I somehow did not
load GD.pm properly or my version of Perl (Perl5.003) is not installed
properly, but it works for all else.


bash$ perl5 trade.cgi
Can't find loadable object for module GD in @INC (/usr/local/lib/perl5
/usr/loca
l/etc/httpd/cgi-bin /usr/local/lib/perl5/i386-bsdos/5.003
/usr/local/lib/perl5 /
usr/local/lib/perl5/site_perl/i386-bsdos
/usr/local/lib/perl5/site_perl .) at GD
 .pm line 50
BEGIN failed--compilation aborted at chart.pl line 22.

Line 22 is where GD is called.

Help appreciated.

Peter





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

Date: Wed, 18 Jun 1997 03:08:56 -0700
From: perl guy <perlprogrammer@hotmail.com>
Subject: Re: Content Type
Message-Id: <33A7B3B8.5468@hotmail.com>

Andrew Starr wrote:
> 
> In article <33A7672C.A84@unsu.com>, Arthur Merar <amerar@unsu.com> wrote:
> 
> > I cannot seem to get this to work.  In order the for HTML to show up, I
> > need 'Content-type: text/html'.  To get the gif to show up, I need
> > 'Content-type: image/gif'.
> >
> > When I try and use both, the image does not come out.  I just get a
> > bunch of crap.
> >
> > How can I output different content types within the same page?
> 
> Unless I'm missing something: (and this is rough, as I'm a beginner, so
> don't copy this literally.)
> 
> #!user/bin/perl (or whatever for your system)
> 
> print "Content-type: text/html"
> print "<HTML><HEAD><TITLE>Test</TITLE></HEAD>\n";
> print "<BODY><IMG SRC = \"images/picture.gif\"></BODY>\n";
> print "</HTML>\n";
> exit;
> 
> I imagine that instead of picture.gif you could have images/makepic.cgi
> which would generate the gif?
> 
> But if the same perl script producing the html is also going to produce
> the image, I don't see how it can be done other than having the perl
> script save the .gif to file and referring to that file. And whether it is
> safe to delete the file after the </HTML> line, I don't know. Perhaps each
> time the script is run, it can at least overwrite the gif from the
> previous run? (Or will this cause problems if two people access the script
> close enough in time?
> 
> Good luck.
> 
> -Andrew
> 
> --
> Andrew Starr  <mailto:atspublic@bigfoot.com>
> http://www.amherst.edu/~atstarr/eudora has my unoff. Eudora Site
> http://www.amherst.edu/~atstarr/eudora/faq.html by Hank Zimmerman
> I have no connection to Qualcomm other than being a happy customer!
> If I am answering a question: please post followup questions to the newsgroup as well as mailing me a copy. For new questions, please just post to the newsgroup. Thank you.

to begin with.. a mistype in the prior post by someone.. should have a
simicolon as well..

print "Content-type: text/html";

perhaps 
print "Content-type: text/html\n\n";

Did you upload the gif in binary?. Sorry.. I hate to ask.. but I have
to..


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

Date: Wed, 18 Jun 1997 08:47:37 -0400
From: Bob Wood <wood@ziplink.net>
Subject: DBM question
Message-Id: <33A7D8E9.41C67EA6@ziplink.net>

I have a question about DBM access in Perl.  I have a structure that I'd
like to maintain in some kind of database file.  I thought the structure
was simple (because I've been using Perl 5 for so long, I guess), but it
contains hashes of hashes, hashes of arrays, etc.

I first tried tying a variable to an SDBM_File, and then discovered that
my hashes weren't preserved.  So I'm wondering how to handle this.  I've
seen MLDBM on CPAN, which sounds like it does what I want.  Is this a
good package to use?  Or should I flatten my keys and try to stick with
SDBM_File?

BTW, I don't really care about access speed for this program.

--
bob wood
wood@ziplink.net                            http://www.ziplink.net/~wood


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

Date: Wed, 18 Jun 1997 12:06:28 BST
From: gml4410@ggr.co.uk (Lack Mr G M)
Subject: Re: getpwnam breaks sockets-- why?
Message-Id: <1997Jun18.120628@ukwit01>

In article <866622207.27326@dejanews.com>, kessler@dfacades.com writes:
|> Hello Socket Gurus,
|> 
|> I've discovered on solaris 2.5.1, perl 5.003, that my perl-based web
|> server can't read from a socket connection, if the socket
|> is established after a call to getpwnam. (It works fine otherwise...these
|> are internet domain sockets ala Camel p353)
|> 
|> According to man pages on solaris, that's because getpwname is
|> non-reentrant (my guess here), and messes up multithreading. However, the
|> same program WORKS when I run it from perl -d!!  Anyhow, Perl isn't
|> multithreading yet anyhow, right?
|> 
|> What gives?  Is there any other way to getpwnam that won't mess
|> up sockets?  There's apparently a reentrant getpwname_r, but I can't
|> see how to cleanly call that from perl, and maybe that's not an answer
|> anyhow.
|> 
|> Any body have a solution?

   No, but it sounds similar to a problem  I encountered with super on
Irix.  The problem there seemed to be that the call to get??? resulted
in a UDP socket(?) being left open for further NIS queries (guessing here
from the symptoms).  super then closed all fd's from 3 up and teh code
then failed on the next get??? call.

   The cure there was to use CLOSE_ON_EXEC to get things shut at the
latest possible moment.  This wouldn't help you, but it might be a
pointer. "perl -d" would have different file-descriptors in use (it has
the source open...) which might mean that you no longer have a clash.


-- 
----------- 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: 18 Jun 1997 09:28:25 GMT
From: bboett@yoda.u-strasbg.fr (Bruno Boettcher)
Subject: HELP:compiling perl on a linux i686...
Message-Id: <5o89np$22n@news.u-strasbg.fr>

hello,
i tried to compile perl-5.003 and perl-5.004 on my linux 2.1.42 Ppro box
but hit the same problem:

make[1]: Entering directory `/usr/local/src/perl5.004/ext/ODBM_File'
cc -c  -Dbool=char -DHAS_BOOL -I/usr/local/include -O2
-DVERSION=\"1.00\" -DXS_VERSION=\"1.00\" -fpic -I../..  ODBM_File.c
ODBM_File.xs: In function `XS_ODBM_File_FETCH':
ODBM_File.xs:90: incompatible types in assignment
ODBM_File.xs: In function `XS_ODBM_File_FIRSTKEY':
ODBM_File.xs:113: incompatible types in assignment
ODBM_File.xs: In function `XS_ODBM_File_NEXTKEY':
ODBM_File.xs:118: incompatible types in assignment
make[1]: *** [ODBM_File.o] Error 1
make[1]: Leaving directory `/usr/local/src/perl5.004/ext/ODBM_File'
make: *** [lib/auto/ODBM_File/ODBM_File.so] Error 2


can somebody please help me out here?
-- 
ciao
bboett@erm1.u-strasbg.fr
==============================================================
bboett@erm1.u-strasbg.fr


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

Date: Wed, 18 Jun 1997 13:04:25 GMT
From: mingtian@hotmail.com (kEQNql)
Subject: how can I write a long array?
Message-Id: <33abdc5b.11526867@usenet.kornet.nm.kr>

question:

@a=('a','b',...................
'c','d',.......,
'k','l',.........);

that maybe wrong, right? what should I do then?


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

Date: Wed, 18 Jun 1997 14:18:06 +0100
From: Simon Fairey <sfairey@metrica.co.uk>
To: mingtian@hotmail.com
Subject: Re: how can I write a long array?
Message-Id: <33A7E00D.7566@metrica.co.uk>

kEQNql wrote:
> 
> question:
> 
> @a=('a','b',...................
> 'c','d',.......,
> 'k','l',.........);
> 
> that maybe wrong, right? what should I do then?

Not sure if its just me but I don't have a clue what you are asking.
Try providing a bit more detail in your question pls a snippet of the
code in question is always a good idea. Otherwise go to www.perl.com and
follow the various links for documentation.

Simon


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

Date: Wed, 18 Jun 1997 13:58:46 GMT
From: mingtian@hotmail.com (kEQNql)
Subject: Re: how can I write a long array?
Message-Id: <33ace906.14770213@usenet.kornet.nm.kr>

>kEQNql wrote:
>> 
>> question:
>> 
>> @a=('a','b',...................
>> 'c','d',.......,
>> 'k','l',.........);
>> 
>> that maybe wrong, right? what should I do then?
>
>Not sure if its just me but I don't have a clue what you are asking.
>Try providing a bit more detail in your question pls a snippet of the
>code in question is always a good idea. Otherwise go to www.perl.com and
>follow the various links for documentation.

Dear Simon

Thanks! what I want to do is to implement a Chinese code converting
betweeb Big5 and GB or vice versa, I get the C source so I need to know
how should I convert it inot Perl style, as you might know Chinese characters
are more than 13000(for Big5) so the array might be that long.

Gil


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

Date: Wed, 18 Jun 1997 12:56:15 GMT
From: mingtian@hotmail.com (kEQNql)
Subject: how could I print or whatever a character one by one from $string, not from @array?
Message-Id: <33aad945.10735970@usenet.kornet.nm.kr>

I would like to implement the following C routine into Perl.

ch[] = "abcd....";
for (i=1;i<=size;i++)
{
	c1 = ch[i];
	if ( (c1 & 0x80 ) == 0x80 )
	{
		c2 = ch[i++];
		printf("%c%c", c1 & 0x7F, c2 & 0x7F );
	{
	else
	{
		printf("%c", c1);
	}

Gil


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

Date: Wed, 18 Jun 1997 14:11:34 +0100
From: Simon Fairey <sfairey@metrica.co.uk>
To: mingtian@hotmail.com
Subject: Re: how could I print or whatever a character one by one from $string, not from @array?
Message-Id: <33A7DE86.2C67@metrica.co.uk>

kEQNql wrote:
> 
> I would like to implement the following C routine into Perl.
> 
> ch[] = "abcd....";
> for (i=1;i<=size;i++)
> {
>         c1 = ch[i];
>         if ( (c1 & 0x80 ) == 0x80 )
>         {
>                 c2 = ch[i++];
>                 printf("%c%c", c1 & 0x7F, c2 & 0x7F );
>         {
>         else
>         {
>                 printf("%c", c1);
>         }
> 
> Gil

Not sure what you are doing with the hex values ( I am assuming its to
do with handling the extended character set ) but the following will
print $string one char at a time:

  $string = 'Simon says hows this?';
  print join( "\n", split( //, $string ) );

Just split the string on nothing '//' and then do whatever
you want with the resulting chars.

Have fun

Simon


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

Date: 18 Jun 1997 01:55:39 -0700
From: Russ Allbery <rra@stanford.edu>
To: zonycat@flash.net
Subject: Re: How to get browser window size?
Message-Id: <m3pvtkb88k.fsf@windlord.Stanford.EDU>

[ Posted and mailed. ]

Zonycat <zonycat@flash.net> writes:

> I am trying to get the size of my browser window or anybody's browser
> window that displays my WEB page.  Is there an environmental variable or
> cookie I could look at to see the window size?

I'm afraid this isn't a Perl question; you really wanted to post this
question to:

        comp.infosystems.www.authoring.cgi

(since this is a question of what information the CGI protocol will give
you), or possibly to one of:

        comp.infosystems.www.browsers.mac
        comp.infosystems.www.browsers.misc
        comp.infosystems.www.browsers.ms-windows
        comp.infosystems.www.browsers.x

(since this is also a question about what information the browser will
send).  The answer will be the same regardless of what programming
language you use.

Since I happen to know the answer, though, I can tell you:  You can't get
this information because the browser doesn't send it.  HTML and the web
aren't designed to make that sort of information available to the server
side because all rendering decisions that require knowledge of that kind
of detailed information about the output device should be made at the
client side.

-- 
#!/usr/bin/perl -- Russ Allbery, Just Another Perl Hacker
$^=q;@!>~|{>krw>yn{u<$$<[~||<Juukn{=,<S~|}<Jwx}qn{<Yn{u<Qjltn{ > 0gFzD gD,
 00Fz, 0,,( 0hF 0g)F/=, 0> "L$/GEIFewe{,$/ 0C$~> "@=,m,|,(e 0.), 01,pnn,y{
rw} >;,$0=q,$,,($_=$^)=~y,$/ C-~><@=\n\r,-~$:-u/ #y,d,s,(\$.),$1,gee,print


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

Date: Wed, 18 Jun 1997 09:28:53 GMT
From: brian.orpin@gecmX.com (Brian Orpin)
Subject: Re: HTML Doc Tags Missing?
Message-Id: <33a7a919.8584100@news.geccs.gecm.com>

On 17 Jun 1997 21:33:14 GMT, lparillo@newshost.li.net (Parillo) wrote:

>I just downloaded the latest Perl from Activeware.
>The HTML formatted docs no longer seem to have links from the perl.html 
>page. Is that the case in all docs? If not, can I download documentation 
>from another release without stepping on my Win32-specific docs?

You will find the perl HTML docs are broken and no one seems interested
in fixing them.  The reference file comes as a tar.gz file.  

If you use winzip to extract the HTML docs rename the file from
blah_tar.gz to blah.tar.gz.  Winzip then understands it.  This will then
expand the pages into a number of directories and you can mod the URL in
the Win32 file.  

As I find the pages that are broken I get them from the web and add them
to my local copy.  You will also find some of the files in the wrong
directory.

Enjoy and perhaps one day they will be fixed.


-- 
Brian Orpin    (These thoughts are my own ......... for once!)
brian.orpin@gecmX.com or BrianOrpin@BigfootX.com  
http://www.borpin.demon.co.uk/  **Anti-spam reply-to remove X**


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

Date: 16 Jun 1997 21:03:05 GMT
From: "John L. Stein" <stein@seas.ucla.edu>
Subject: Is there an easy way to send email in perl ? Using version 4
Message-Id: <5o49m9$18dm@uni.library.ucla.edu>

Is there an easy way to send email in perl ? Using version 4

Thanks
-js



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

Date: 18 Jun 1997 11:42:35 GMT
From: Jamie Hoglund <jhoglund@mirage.skypoint.com>
Subject: Re: Major perl problem
Message-Id: <5o8hjb$2qq$1@shadow.skypoint.net>

Negative Creep <gcyriac@internetMCI.com> wrote:
: open(FILE,">>/mnt/web/guide/mav/nc/dvdepot/emails.txt");                   

You should probably check for an error, When doing CGI work, 
I usually write a subroutine called 'bail' that does what die would do,
except that it writes it to another terminal instead.

Typically: open(FILE,"file") || &bail("File: $!");

(I'll leave you to write your own version of bail)

This is useful if your script has the ability to work around an access problems.


: I didn't use the end/begin script in the real file.  The is a legitameant
: perl script.  It should work on any server after naming it .cgi and modding
: the file to 755.  WHAT IS WRONG, I AM SO FRUSTRATED.!

Off the top of my head, I'd say that your server is probably running as user 'nobody'
or 'www' or some such. This is a real pain. Try using cgiwrap or (carefully) setuid.

Alternatively, you might make your file world writable.

Jamie
--
http://www.skypoint.com/~jhoglund  my spam policy & a few other things.


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

Date: 18 Jun 1997 11:15:28 +0200
From: JVromans@Squirrel.NL (Johan Vromans)
Subject: Re: Reference guide updated to 5.004 ?
Message-Id: <wl3oh94e0gf.fsf@plume.nl.compuware.com>

jarausch@numa1.igpm.rwth-aachen.de (Helmut Jarausch) writes:

> I very much like the Perl reference guide by Johan Vromans
> (perlref-5.001.2.tar.gz).
> Has anybody checked it if it's still up-to-date and if not, is there
> an updated version or a list of suggested changes?

An updated version will appear soon. Stay tuned.

------------------------------------------------------------------------------
Johan Vromans                                             jvromans@squirrel.nl
Squirrel Consultancy                                  Haarlem, the Netherlands
http://www.squirrel.nl                          http://www.xs4all.nl/~jvromans
PGP key fingerprint     =     7C F8 BD 5C 25 7F 47 A6  CB 87 32 0B E3 50 EF 04 
------------------------ "Arms are made for hugging" -------------------------


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

Date: 17 Jun 1997 13:03:14 -0500
From: jesten@earth.execpc.com (Jim Esten)
Subject: Re: Script to verify email addresses?
Message-Id: <5o6jh2$nrn$1@earth.execpc.com>

Atif Ahmad Khan (aak2@Ra.MsState.Edu) wrote:

: I know from searching the dejanews archive and altavista that this
: is a rather frequently asked question.  However I have not been able
: to find a good solution to the problem yet.

: I know that I can telnet to port 25 on a sever and verify the email
: address of (most users) and if the server isn't the mail handler then
: find the mail handler and telnet there.  I would like to automate this
: process so that I can use it a cgi script.

: If my perl was any good I would write the script myself but it isn't
: so I ask for help.

: Thanks a million.

: Atif Khan
: aak2@ra.msstate.edu


Tom Christiansen wrote one called addrcheck earlier this year...
 I hung onto that one... mail me direct if you can't find it...

Jim
-- 
Jim Esten
(temporarily between .sigs)


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

Date: 16 Jun 1997 20:51:15 GMT
From: "John L. Stein" <stein@seas.ucla.edu>
To: jesten@earth.execpc.com
Subject: Re: Sending e-mail using Perl for NT - don't wanna... gotta
Message-Id: <5o4903$18dm@uni.library.ucla.edu>

How? I tried the following but can't get it to work - please help.

thanks
-js


#! /usr/local/bin/perl -w

open (FIL, "/w/staff.3/cs/stein/risc/ll/DD");
open (FILE, $ARGV[0]);

foreach (<FILE>) {
   print "to mail", $_, "\n";
   #system ("mail -s \"JKL -OM\" -dinNv $_ < ../ll/DD");
   system ("mail -s \"Seeking internet employments\" $_ < $FIL");
   print "mailed", "\n";
   }

close (FILE);



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

Date: 18 Jun 1997 08:37:03 -0400
From: Clark Dorman <clark@s3i.com>
Subject: Re: Sockets
Message-Id: <d7mfsgk9c.fsf@s3i.com>


hjs@Cadence.COM (Henry Salvia) writes:
> In article 5D7D@inta.net.au, Anil Gupta <anil@inta.net.au> () writes:
> > Hello there..
> > 
> > Does anyone know where I can find a good socket tutorial?
> > I tried perlipc but it was a bit advanced

Sorry for the piggyback, but I didn't see the original.

I would recommend that you look at: 

http://www.cs.uno.edu/~golden/teach.html

Basically, these are close to the same socket programs that are presented in
perlipc, but they are very heavily documented.  Each line is explained in 
more detail than perlipc, thus making it much more clear what is going on.
If you don't know sockets, this will help.

-- 
Clark Dorman				"Evolution is cleverer than you are."
http://cns-web.bu.edu/pub/dorman/D.html                -Francis Crick


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

Date: 18 Jun 1997 08:34:28 GMT
From: s11976@net2.hkbu.edu.hk (Pui Ming WONG)
Subject: to use flock, sysopen or open?
Message-Id: <5o86ik$beq$2@power42t.hkbu.edu.hk>

I've been reading most other people's codes (incl those listed
in the perl FAQ) to learn different methods of locking a file
for updating.
The FAQ example opens the file using the sysopen statement.
Yet i notice someone simply use  open (FH,......);
statment before they call the flock(FH,2)
Now are there any difference in using them in the flock context?
Do both ways work ? But which is better?
--
        __
   / \_/  )             __   Pui Ming WONG (E-mail: pm@hkbu.edu.hk) 
  /      ( -------------  }  System Support Programmer
 (  =l=ll===============__}  Computing & Telecomm. Services Centre
  \   _  (                   Hong Kong Baptist University 
   \_/ \__)                  224 Warerloo Road, Hong Kong 


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

Date: Wed, 18 Jun 1997 12:59:04 +0200
From: Patrick Schuster <patrick@mucsun.sps.mot.com>
Subject: unix mail in CGI-Script ?
Message-Id: <33A7BF78.41C67EA6@mucsun.sps.mot.com>

Hi Folks !

I want to use the unix mail command in a CGI script, and
my problem is, that the line below does his work, but I get no
Subject line, if I start this in Netscape. The rest of the mail is
really okay. 
Started in the csh Shell directly there are no problems with this line !


system("mail -s TestSubject patrick < /dev/null");


I've tried this with another line

open(FOUT,"|mail -s TestSubject patrick");
 ...
close(FOUT)

but it's the same problem.

What's wrong with me ?
Do anyone of you can give me a solution for this problem ?
Please post in this group !

Bye
Patrick

-- 
Patrick Schuster


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

Date: 18 Jun 1997 13:31:19 GMT
From: dgy@rtd.com (Don Yuniskis)
Subject: Re: What does "UNIX" stand for..
Message-Id: <5o8nv7$dps@baygull.rtd.com>

In article <5nuet7$p7u@bcrkh13.bnr.ca>,
Kaz Kylheku <kaz@vision.crest.nt.com> wrote:
>In article <339c789b.35848461@news.mindspring.com>,
>Robert Munck <munck@acm.org> wrote:

[huge snip]

>>MULTICS -- a tremendous improvement on all of its successors.
>
>Today, UNIX has a lot of MULTICS like features, such as memory mapped files.
>A modern UNIX behaves a lot like MULTICS. The code image of a process
>is a memory mapped region that's demand paged. So are shared libraries.
>
>Also, if you look at kernels like Mach or Chorus, it's clear that MULTICS has
>had it.

Ahem...  Do you see a "promising future for Mach"?  Have you visited
comp.os.mach recently to see what a hotbed of activity it is?  ;-)
Didn't IBM abandon the Workplace OS (Mach based)?  The folks in Utah
abandoned Mach for their Flux project.  We'll see how Apple fares with
it next...

I haven't seen any real inroads from the folks at Chorus, either...

Unfortunate as the *concept* is quite appealing...

But, I'd still prefer bulky old Mutt-Licks to the choices today...

--don


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

Date: 18 Jun 1997 08:29:34 GMT
From: s11976@net2.hkbu.edu.hk (Pui Ming WONG)
Subject: what module to use for sysopen?
Message-Id: <5o869e$beq$1@power42t.hkbu.edu.hk>

I'm a newbie in perl. When i tried some examples listed in the Perl FAQ
on files related topics, i couldn't make the sysopen statment work.
What modules must i use ?
(I typed in one example that have:
use Fcntl;
but still didn't work, and then i also tried use Filehandle; still noluck)
P.S. I use perl 5.001m , is this good enough for sysopen to work ?
--
        __
   / \_/  )             __   Pui Ming WONG (E-mail: pm@hkbu.edu.hk) 
  /      ( -------------  }  System Support Programmer
 (  =l=ll===============__}  Computing & Telecomm. Services Centre
  \   _  (                   Hong Kong Baptist University 
   \_/ \__)                  224 Warerloo Road, Hong Kong 


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

Date: 18 Jun 1997 07:09:24 -0600
From: mfuhr@dimensional.com (Michael Fuhr)
Subject: Re: what module to use for sysopen?
Message-Id: <5o8mm4$snj@flatland.dimensional.com>

s11976@net2.hkbu.edu.hk (Pui Ming WONG) writes:

> I'm a newbie in perl. When i tried some examples listed in the Perl FAQ
> on files related topics, i couldn't make the sysopen statment work.
> What modules must i use ?
> (I typed in one example that have:
> use Fcntl;
> but still didn't work, and then i also tried use Filehandle; still noluck)
> P.S. I use perl 5.001m , is this good enough for sysopen to work ?

Could you post a simple, but complete example of your code?  We
can't help much unless we see exactly what you're trying to do.

Also, exactly what do you mean by "i couldn't make the sysopen
statment work"?  Did you get an error?  If so, what was it?
Did the program not behave the way you thought it would?  If so,
what did you expect, and what did it do?

-- 
Michael Fuhr
http://www.dimensional.com/~mfuhr/


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

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

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