[7173] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 798 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Jul 31 08:21:58 1997

Date: Thu, 31 Jul 97 05:00:51 -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           Thu, 31 Jul 1997     Volume: 8 Number: 798

Today's topics:
     !Capture who command results <lauri@samoilu.net>
     Re: [Q] Can you generate "page.html#bottom" in PERL? bowker@iNetWebInc.com
     Brainwave <rene.sorger@onlinemedia.de>
     Re: Brainwave <rene.sorger@onlinemedia.de>
     Re: CGI Perl script launches a C++ program xewj@odin.sunquest.com
     Dynamic memory allocation/deallocation (dave)
     easy Question (David Siebert)
     Re: easy Question ( Thomas Lachlan XMS x4206 )
     Re: easy Question <terjebr@pvv.ntnu.no>
     Re: file extensions <sfairey@adc.metrica.co.uk>
     Re: file locking - how does it act? (Tim  Smith)
     goto end of main code causes problem? (Peter Scott)
     Re: How can I change modification time of a link <kjl@infor.com>
     Re: is perl suitable as a first language? (Eric Bohlman)
     Re: Perl and MS Personal Web Server/Win 95 (Dirge )
     Perl for Windows (Michael Ching)
     Perl script won't work on AIX! <swarsi@zeus.nmp.com>
     Q:How to connect two sockets <thielmann@11.kblz1.telekom400.dbp.de>
     Re: Search a CSV database <sfairey@adc.metrica.co.uk>
     Re: Seeking object enlightenment (Steven W McDougall)
     Tech Writers/Publishers Discussion Group Online <xsitestaffx@studiob.com>
     Re: Too many people in this group are arrogant #*(@# (R <merlyn@stonehenge.com>
     Traverse <matts@webpromote.com>
     Re: Unix time, local time, year 2000 question. (I R A Aggie)
     Re: unpack suitability (Toru Shiono)
     Re: Why no SIGURG in POSIX? <jhi@alpha.hut.fi>
     Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: Wed, 30 Jul 1997 20:14:01 +0300
From: Lauri Laakso <lauri@samoilu.net>
Subject: !Capture who command results
Message-Id: <33DF7659.7639@samoilu.net>

When I type who I get...

paja:/lauri$ who
lauri    ttyp0    Jul 30 18:48 (paja.samoilu.net)
inkinen  ttyp3    Jul 30 16:39 (cypress.samoilu.)
paja:/lauri$ 

 ...how do i get those (2 in this example) lines?

 ................................................................
  Lauri Laakso - Nettipaja Ky  - GSM: 040-588 8889 [EMAIL2GSM]


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

Date: Wed, 30 Jul 1997 18:56:38 GMT
From: bowker@iNetWebInc.com
Subject: Re: [Q] Can you generate "page.html#bottom" in PERL?
Message-Id: <5ro2pl$2cq@ecuador.earthlink.net>

Seems I stated my question badly ... what I'm trying to do is not just
generate HTML code from a PERL script (thanks, Stefan, that IS
elementary), but to force the user's browser to display the code I
generate starting at the point half-way down the page (thanks, Tom, I
believe that IS a PERL question).  So using the (poor) example I gave,
I would like the words "Bye-bye" to appear at the top of the visitor's
display:

#/usr/bin/perl
$var = $full_screen_of_text;
print <<"END";
	<HTML><BODY>
	$var
	<a NAME="bottom">Bye-bye</a>
	</BODY></HTML>
END

I've tried every way I can think of, AND searched the FAQs (PERL and
HTML and CGI), AND skimmed my books, AND read the on-line manuals ...
and it still escapes me.  Any ideas ...?

Bob Bowker
bowker@iNetWebInc.com




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

Date: Wed, 30 Jul 1997 15:05:14 +0200
From: Rene Sorger <rene.sorger@onlinemedia.de>
Subject: Brainwave
Message-Id: <33DF3C0A.489582A7@onlinemedia.de>

Hallo,

peters@brainwave.net eingerichtet.

MfG,
Reni

-- 
---------------------------------------------------------------------
I  Rene Sorger                    I                                 I
I  Online Media Riedlbauer GmbH   I       Ich hab' Hunger !!        I
I  Xlink PoP Krefeld              I                                 I
---------------------------------------------------------------------


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

Date: Wed, 30 Jul 1997 15:19:06 +0200
From: Rene Sorger <rene.sorger@onlinemedia.de>
Subject: Re: Brainwave
Message-Id: <33DF3F4A.C00652F9@onlinemedia.de>

Rene Sorger wrote:
> 
> Hallo,
> 
> peters@brainwave.net eingerichtet.
> 
> MfG,
> Reni
> 
> --
> ---------------------------------------------------------------------
> I  Rene Sorger                    I                                 I
> I  Online Media Riedlbauer GmbH   I       Ich hab' Hunger !!        I
> I  Xlink PoP Krefeld              I                                 I
> ---------------------------------------------------------------------

Upps, sorry, wrong game !

-- 
---------------------------------------------------------------------
I  Rene Sorger                    I                                 I
I  Online Media Riedlbauer GmbH   I       Ich hab' Hunger !!        I
I  Xlink PoP Krefeld              I                                 I
---------------------------------------------------------------------


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

Date: 30 Jul 1997 19:39:40 GMT
From: xewj@odin.sunquest.com
Subject: Re: CGI Perl script launches a C++ program
Message-Id: <5ro59s$8t6$1@iggy.sunquest.com>

In article <33DDAA73.9C5B7160@nol2316.fh.zh.ubs.com>,
Christopher Green  <christopher.green@nol2316.fh.zh.ubs.com> wrote:
>Bob Fawcett wrote:
>> I have a question regarding a perl cgi script that launches a C++
>> program. The C++ program generates a bunch of flat files from a Sybase
>> backend. The problem is that I cannot get the perl script to launch the
>> C++ program when the cgi script is hit with a web browser.
>> I use the the system() function to call the C++ program. I have verified
>> that it works perfectly fine when the perl script is executed via the
>> UNIX command line. When I set the $| var to 1 then I get an error that
>> shows up on the web page stating that the file cannot be executed.
>
>Does the user under which the server is running have permission to execute the
>C++ program?

It's probably that he isn't specifying the full path to the program in the
script.



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

Date: Thu, 31 Jul 1997 03:51:19 GMT
From: over@the.net (dave)
Subject: Dynamic memory allocation/deallocation
Message-Id: <33e00890.5229409@news.one.net>


I'm keeping a global array of references to hashes.  Each hash is
created with its reference pushed on the array.  The hash is then
identified by the index of its reference in the array.  This provides
an ID that is a simple number.

I'm thinking I should periodically clean up the array, removing hashes
that are no longer used.  How do I insure the memory is deallocated?  


Thanks,
Dave
|
| Please visit me at http://w3.one.net/~dlripber
|
| For reply by email, use:
| dlripber@one.net
|________


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

Date: 30 Jul 1997 19:52:47 GMT
From: dsiebert@gate.net (David Siebert)
Subject: easy Question
Message-Id: <5ro62f$23u0$1@news.gate.net>

How do I read the first letter of a perl string? I don't want to extract it 
I just read it into a varable.
Thanks



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

Date: 31 Jul 1997 08:54:20 GMT
From: etltsln@etlxd30.ericsson.se ( Thomas Lachlan XMS x4206 )
Subject: Re: easy Question
Message-Id: <5rpjrs$51j@newstoo.ericsson.se>

David Siebert (dsiebert@gate.net) wrote:
: How do I read the first letter of a perl string? I don't want to extract it 
: I just read it into a varable.
: Thanks

Hi David,
	There are numerous ways of carrying out this task,
	here's one.

	$string="foo\n";
	$firstchar=substr($string,0,1);
	
	Buy the Camel book if you wish to get more exotic.

			Regards Tom




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

Date: 30 Jul 1997 23:48:52 +0200
From: Terje Br}ten <terjebr@pvv.ntnu.no>
Subject: Re: easy Question
Message-Id: <kbg90yorz23.fsf@otto.pvv.ntnu.no>

dsiebert@gate.net (David Siebert) writes:

> How do I read the first letter of a perl string? I don't want to extract it 
> I just read it into a varable.

$FirstLetter = substr($String,0,1);

-- 
******************************************************************************
Terje Breten                             |   "For God sent not his Son into
The Norwegian Institute of Technology  --+--  the world to condemn the world;
Faculty of Physics and Mathematics       |    but that the world through him
E-mail: terjebr@pvv.ntnu.no              |    might be saved" John 3:17
******************************************************************************



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

Date: Thu, 31 Jul 1997 10:23:58 +0100
From: Simon Fairey <sfairey@adc.metrica.co.uk>
To: Shaun O'Shea <lmisosa@eei.ericsson.se>
Subject: Re: file extensions
Message-Id: <33E059AD.611FEAB4@adc.metrica.co.uk>

Shaun O'Shea wrote:

> I have an array whose elements are all file paths E.G.
>
>         address/of/the/file/in/question/file1.Uen.A.fmk
>         address/of/the/file/in/question/file1.Uen.B.fmk
>         address/of/the/file/in/question/file2.Uen.A.fmk
>         address/of/the/file/in/question/file3.Uen.A.fmk
>
> I would like to use this array to create another array which just
> contains the file extensions i.e.
>                         .Uen.A.fmk
>                         .Uen.B.fmk
>                         .Uen.A.fmk
>                         .Uen.A.fmk
>
> I tried to find some way to substitute everything up as far as the
> first
> "." with nothing but I couldn't.
>
> Any offerings appreciated.
>
>                         Shaun..............:-)
> --
> **
> ********************************************************************
> Shaun O'Shea,
> lmisosa@eei.ericsson.se
> OR
> shaunos@orca.ucd.ie
> *******************
> ***************************************************

Try the following:

@files = ( 'address/of/the/file/in/question/file1.Uen.A.fmk',
           'address/of/the/file/in/question/file1.Uen.B.fmk',
           'address/of/the/file/in/question/file2.Uen.A.fmk',
           'address/of/the/file/in/question/file3.Uen.A.fmk' );

foreach( @files ) {
  /\/\w+([\w\.]+)$/;
  push @exts, $1;
}

print "\nExts are:\n", join "\n", @exts;

If you don't want the first dot then just change the regexp to:
  /\/\w+\.([\w\.]+)$/

Have fun

Simon



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

Date: 30 Jul 1997 12:19:23 -0700
From: trs@azstarnet.com (Tim  Smith)
Subject: Re: file locking - how does it act?
Message-Id: <5ro43r$p82@web.azstarnet.com>

In article <33DECDFF.C8BF50C9@nmia.com>,  <soki@nmia.com> wrote:
>Will the file "bar" still be locked until the script finishes?

No.

If you have access to a Unix machine, read the man page for flock and
it will give more info.  In short, though, when you close a file the
lock is dropped automatically, there's no need to unlock it explicitly.

>Also, how do shared locks work with exclusive locks?  Let's say I have
>a process with a shared lock on some file.  Then a second process
>requests an exclusive lock and a third process requests a shared lock. 
>Will the file lock go to the process requesting an exclusive lock before
>it goes to the third process?

The file lock goes to the process requesting a shared lock first.  When
all the shared locks are dropped, then the exclusive lock can go through.

Tim



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

Date: 30 Jul 1997 17:24:32 GMT
From: pjscott-remove-to-email@euclid.jpl.nasa.gov (Peter Scott)
Subject: goto end of main code causes problem?
Message-Id: <5rntcg$6u5@netline.jpl.nasa.gov>

Trying to understand why in the following code:

#!/usr/local/bin/perl
goto SKIP;
foo();
SKIP:
print "bar\n";		# ***

sub foo {
  print "foo\n";
}

removing the asterisked line causes the error:

	syntax error at /tmp/foo line 6, near "sub foo "

My way of looking at it is, it is jumping to the end of the main code,
and the next tokens (sub foo) are the same as what would get read if the
interpreter fell through to that point in code that didn't have a goto, 
so why doesn't it just ignore the sub foo?  Perhaps knowing the answer 
would give me greater insight into the way Perl works...

This Perl identifies itself with:

This is perl, version 5.003 with EMBED
        built under solaris at Oct  9 1996 13:44:34
        + suidperl security patch

-- 
This is news.  This is your      |  Peter Scott, NASA/JPL/Caltech
brain on news.  Any questions?   |  (Peter.J.Scott at jpl.nasa.gov)

(Sorry to force email respondents to edit the To: header; the spam
is just too bad otherwise.)

Disclaimer:  These comments are the personal opinions of the author, and 
have not been adopted, authorized, ratified, or approved by JPL.


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

Date: Wed, 30 Jul 1997 13:22:58 GMT
From: "Kurt J. Lanza" <kjl@infor.com>
Subject: Re: How can I change modification time of a link
Message-Id: <EE4vvK.139@nonexistent.com>

Jim Nance wrote:
> 
> I would like to be able to change the modification date/time of a
> symbolic link.
> touch or utime do this sort of thing but they both follow the link.  I
> cann't see
> a way to keep them from following link.
> 
> Does anyone have any ideas?
> 
> Thanks
> 
Remove the symbolic link and recreate it. Tada!
-- 
Kurt J. Lanza
kjl@infor.com


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

Date: Wed, 30 Jul 1997 19:17:45 GMT
From: ebohlman@netcom.com (Eric Bohlman)
Subject: Re: is perl suitable as a first language?
Message-Id: <ebohlmanEE5C9M.D48@netcom.com>

luvisi@andru.sonoma.edu wrote:

: question is in the title:
:   is perl suitable as a first language?

IMHO, no.

: the reason I'm asking is sort of a strange observation I've made.
: non-programmers (that I've known) who take up perl, tend to be quickly
: confused by all the special cases, default behaviors, and shortcuts.
: programmers, however, tend to find it heavenly, because all those
: special cases, defaults, and shortcuts do exactly what they want with
: fewer keystrokes.  I'm wondering if this pattern is emerging because
: the non-programmers are learning things in the wrong order, or if it's
: because people really need to understand another language and basic
: concepts before they can appreciate the complex strengths of perl, or
: if I'm just imagining it.

I'm pretty sure that Larry specifically designed Perl to be particularly 
friendly to people who had the fundamental programming concepts down and 
therefore had a good idea of when to take shortcuts and when not to.

IIRC, Larry's background is in (human) linguistics.  One of the 
fundamental characteristics of human languages is that they're based on 
the use of symbols to represent shared context.  I think this shows 
through in the design of Perl.  Its flexibility resembles that of human 
languages, in part because it can assume that there are a lot of details 
that don't have to be spelled out at a low level because both the 
programmer and the interpreter have a common understanding of what's 
being talked about.  It presumes a sort of "cultural background."

It's rather difficult for a very young child, or a new speaker from a 
completely different culture, to use a human language in its full 
flexibility.  A native speaker talking to <SPAN 
CLASS=gratuitously-insulting> a brat or a greenhorn</SPAN> will use a 
more precise and structured subset of his native tongue if he wants to be 
sure he'll be understood.  I think the novice programmer is in a similar 
situation.

: if perl really *isn't* suitable as a first language, that *could*
: explain the vast numbers of basic posts on comp.lang.perl.misc, which is one of
: the main reasons I haven't frequented this group much.  I will, of
: course, be checking in to read followups to this thread ;-)

I think that's part, but not all of it.  Another part is the influx of all
the "web page designers" who are jumping head first into programming
because there's a demand for it.  A lot of them don't seem to be willing
or able to take the time to actually learn a programming language; they
want their first program to be a working, non-trivial CGI application. 
Pressure to "get results *now* or I'll find someone else who can do it" is
not usually conducive to learning complex skills.  It's as if they're
expecting to be able to run without going through the steps of learning to
crawl and walk first.  You simply can't skip developmental steps and
expect to gain competence (there's actually a learning disability called
"hyperlexia" whose characteristic symptom is that the person develops
basic reading skills at an unusually early age, but then gets stuck at 
that reading level and eventually falls behind his peers.  It's as if 
he's skipped over some developmental phase in which most kids pick up 
some linguistic ability that only becomes important later in the 
development of reading skills).

To anyone reading this who's going through the rush I just described, my 
advice is to spend some time playing with Perl before trying to work with 
it.  You'll find that the extra "non-productive" time you spend up front 
will pay off handsomely later.



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

Date: 30 Jul 1997 13:11:32 GMT
From: mjw101@york.ac.uk (Dirge )
Subject: Re: Perl and MS Personal Web Server/Win 95
Message-Id: <5rnei4$t11$1@netty.york.ac.uk>


--
Michael
"May all your dreams - bar one - be fulfilled"
	A Sathuli blessing from the Drenai novels by David Gemmel.


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

Date: Thu, 31 Jul 1997 06:12:51 GMT
From: MChing@POBoxes.com (Michael Ching)
Subject: Perl for Windows
Message-Id: <33e02c48.15685786@194.6.201.102>

I wrote a VB progra to do that,  you give it your perl path and then
compiling, debugging, etc is run via menus.  It is rather buggy
because I heaven't touched it in a while It checks for  semi colons,
and has a goto line.

I haven't touched it because I found something better....
I use a text editor called   EditPad.  MDI, goto, find, word wrap,
etc.  I made another VB program, it reads where  perl is, you specify
the filename, and with one click, it executes.

This is  a  real  time-saver...and it's small and free
email me if you are interested.  MChing@POBoxes.com


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

Date: Wed, 30 Jul 1997 21:39:06 -0400
From: Suhail Warsi <swarsi@zeus.nmp.com>
Subject: Perl script won't work on AIX!
Message-Id: <33DFECBA.BC512728@zeus.nmp.com>

This script works in linux for writing to a text file, but it doesn't
work in AIX. Anybody see something in the syntax that might cause this?

open (FILE,">>$dbfile");
print FILE "$dbentry\n";
close (FILE);



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

Date: Wed, 30 Jul 1997 19:54:19 +0200
From: Marcus Thielmann <thielmann@11.kblz1.telekom400.dbp.de>
Subject: Q:How to connect two sockets
Message-Id: <33DF7FCB.22AB06CE@11.kblz1.telekom400.dbp.de>

Hello folks,
I've written a mini Perl Server that listen on one socket. 


|----------------        ------------------      --------------
|               |      S| Perl Server on   |T    | Remote     |
|telnet IP 8000 +-------+ Port 8000        +-----+ Machine    |
|               |       |                  |     |            |
|----------------        ------------------      --------------
  Workstation               Server                 Target

I connect via telnet ip 8000 from the Workstation to the Server and can
then enter some commands on a prompt.
One of these commands is used to connect to the Target machine, so that
I can work with my telnet from the Workstation on the Target.

Now my problem:
I have the two open sockets, one to the Workstation and one to the
Target. Now I need a possibility to connect the two sockets.
All the telnet negotiations should be made from the telnet client on the
workstation machine, I only want to bypass the data.

The two open socket have the handle names S and T as shown in the
'picture'.
How can I get the two sockets connected, that all datas are transferred
without buffering?

I have tried to use two 'tees' to connect the STDIN and STDOUT:
So one tee cpoies from 
       S -> T 
and the other tee copies from 
       T -> S
but it doesn't work.

   if (open_socket($ip,23)) {
      if (($child1=fork)==0) { # Child 1
         open(STDIN,"<&S")||die "dup failed\n";
         select(STDIN);$|=1;
         open(STDOUT,">&T")||die "dup failed\n";
         select(STDOUT);$|=1;
         open(STDERR,">&T")||die "dup failed\n";
         select(STDERR);$|=1;
         exec("tee"); # Copy STDIN to STDOUT S -> T
       }
       elsif (($child2=fork)==0) { # Child 2
         open(STDIN,"<&T")||die "dup failed\n";
         select(STDIN);$|=1;
         open(STDOUT,">&S")||die "dup failed\n";
         select(STDOUT);$|=1;
         open(STDERR,">&S")||die "dup failed\n";
         select(STDERR);$|=1;
         exec("tee"); # Copy STDIN to STDOUT T -> S
       }
                             
  
Any hints ??

Thanks in advance


Marcus


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

Date: Wed, 30 Jul 1997 14:59:44 +0100
From: Simon Fairey <sfairey@adc.metrica.co.uk>
To: Liam Bateman <liam@dircon.co.uk>
Subject: Re: Search a CSV database
Message-Id: <33DF48CF.4BCF5975@adc.metrica.co.uk>

Liam Bateman wrote:

> Hi All,
>
>         I have a database file, 500 records each record has about 10
> fields!
>
> The file is saved as CSV (Comma Delimited)
>
> How do I, using one search, search three 'address' fields for a given
> string.
>
> i.e. house, street, county
> Any help would be appreciated, as this is for a web page.
> I have two years Pascal experience, I am just learning PERL and was
> wondering if there is a built in module to do this, a library/unit/any
>
> thing.
>
> Or if anyone has a script to do this that I may play with and adjust!
>
> Please email any replies liam@dircon.co.uk
>
> Thanks,
>
> Liam
> --
> liam@dircon.co.uk <Liam Bateman>

  OK how about the following:

open( DB, "some_file" ) or die "Unable to open DB file: $!";
$match = 'something';
while( <DB> ) {
  chomp;
  printi( "I found a match" ) if grep( /$match/o, (split /,/ )[ 1,3,5 ]
);
}
close DB;

NB: This assumes you are interested in looking at fields 1, 3 and 5. If
the 3 fields you want to look at are different ( remember they will
start from 0 ) then just change the list. If you don't know what the
field numbers are then this will have to be looked at rather
differently. Also in the grep() I have used the //o modifier to speed up
the match, now if the match variable is likely to change during the
course of the script and you need to check a file again you will have to
lose the 'o' modifier ( see the perlop man page for a better explanation
). If this is the case there are other ways of optimising things but I
won't try and go into them now.

Hope this gives you some ideas.

Simon



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

Date: Wed, 30 Jul 1997 14:08:40 GMT
From: swmcd@world.std.com (Steven W McDougall)
Subject: Re: Seeking object enlightenment
Message-Id: <EE4xyH.CzM@world.std.com>

neil@domingo.concordia.ca (Neil Kandalgaonkar) writes:

>I'm a reasonably smart person, and have programmed perl for $, but I
>am having difficulty understanding objects.

http://world.std.com/~swmcd/steven/Programming/paradigms.html

gives some of the motivation for OOP.

- SWM


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

Date: Wed, 30 Jul 1997 09:10:50 -0400
From: Site Staff <xsitestaffx@studiob.com>
Subject: Tech Writers/Publishers Discussion Group Online
Message-Id: <33DF3D5A.3DDE@studiob.com>

The following may be of note to those in this newsgroup who are
interested in books about computer technology, either as a writer,
publisher or consumer. If you'd like further information and want to
contact me directly, take out the x's before and after "sitestaff" in
the return address.

Thanks.
----------------------------

Find out why the New York Times calls Studio B's Computer Book
Publisher's Mailing List "A virtual salon for digital age writers."
(Mary Tudor, 05/03/97):

http://www.nytimes.com/library/cyber/week/050397books-agent.html

If you haven't got time to go there now, here's a quote from the New
York Times article:

"Like a virtual water cooler, the Computer Book Cafe's mailing list hums
with the conversations of writers working at home..." 

If you're a technician, writer, publisher, journalist, editor or buyer
with an interest in computer books, the Computer Book Publisher's
Mailing List is a great source of daily information, interviews,
articles, and essays about all aspects of the computer book industry.
Authors and publishers often talk about what's coming out weeks before
it hits the shelves. 

Joining the list is easy and totally free. Just mail a new message to
list@studiob.com with the word "subscribe" in the subject box, with no
text in the message body. Lurk for a couple of days and see if the
discussion interests you. Jump into the discussion if it moves you. To
get off the list, just follow the instructions above, but substitute the
word "unsubscribe" for the word "subscribe." Subscribers receive one
clearly marked ads post each weekday, usually seeking work-for-hire
writers and tech-editors, which may be of further interest to many on
the list.

For more information, feel free to contact me directly at
sitestaff@studiob.com. Otherwise, I hope to see you on the list soon.
Again, there are no charges of any kind to join this mailing list, and
you will not be sent any additional non-list-generated Email if you
choose to subscribe.

-sitestaff@studiob.com

Sherry Rogelberg                           Studio B Productions, Inc.
                                               sitestaff@studiob.com
Literary Agency                             <http://www.studiob.com>
Custom Publishing                      317-577-2875 FAX 317-578-2567
Computer Book Cafe                9949 Aegean Road, Fishers IN 46038
____________________________________________________________________


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

Date: 30 Jul 1997 15:57:42 -0700
From: Randal Schwartz <merlyn@stonehenge.com>
To: abigail@fnx.com
Subject: Re: Too many people in this group are arrogant #*(@# (Re: Checking for valid Email...)
Message-Id: <8cen8g172x.fsf@gadget.cscaper.com>

>>>>> "Abigail" == Abigail  <abigail@fnx.com> writes:

Abigail> ++                Providers don't teach people
Abigail> ++ to go to news.answers before starting to use USENET.

Abigail> Because that isn't a providers task.

In the old days, it was.  And Usenet was a much nicer place.
Newsreaders (not all-singing, all-dancing, web-news-mail-clock
browsers) came presubscribed with news.announce.newusers, and most (if
not all) were told to read *every* article in there before posting
*anything*.

Nowadays... no such luck.  Most people haven't even heard of
news.announce.newusers.

The start of the most recent downfall was the day Netscape put
a "POST" button on their web browser.  Ugh.

print "Just another Perl hacker," # but not what the media calls "hacker!" :-)
## legal fund: $20,495.69 collected, $182,159.85 spent; just 397 more days
## before I go to *prison* for 90 days; email fund@stonehenge.com for details

-- 
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@ora.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me


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

Date: Wed, 30 Jul 1997 14:03:11 -0500
From: Matt Spaid <matts@webpromote.com>
Subject: Traverse
Message-Id: <33DF8FEF.1BF4EE23@webpromote.com>


If anyone out there has gotten Traverse to work with LWP out there
please drop me a   line.  The example that they give in the doc's doesnt
work.. <weird eh?>.   Thanks!!

Please email me:
matts@webpromote.com

Matt Spaid

 .............................................................
 . Matthew Spaid                          WebPromote(tm)     .
 . Software Engineer              1580 S. Milwaukee Ave, #320.
 . matts@webpromote.com              Libertyville, IL. 60048 .
 . http://www.WebPromote.com             Phone #847.918.9292 .
 . Intelligent Internet Marketing          Fax #847.918.9296 .
 .............................................................






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

Date: Wed, 30 Jul 1997 09:58:17 -0500
From: fl_aggie@hotmail.com (I R A Aggie)
Subject: Re: Unix time, local time, year 2000 question.
Message-Id: <fl_aggie-ya02408000R3007970958170001@news.fsu.edu>

In article <slrn45tt1sv.iok.mist@aurora.cc.monash.edu.au>,
mist@yoyo.cc.monash.edu.au (Michael Stillwell) wrote:

+ As other posts in this thread have stated, it will return 100.  I'm
+ interested, though, if all versions of perl will return 100, or if

They should, but that's dependent on who did the port to the particular
platform. Differences *should* be documented, tho.

+ this was a backwards-compatible change to deal with the Y2K problem.
+ There doesn't seem to be any good reason to return year - 1900 instead
+ of just year.

Sure there is. Got access to a unix machine? type 'man localtime' and
see what it sez. Perl's localtime() is a call to the system libraries
and are depended on that implementation. Here's a snippet from the
man page in question:

     Declarations of all the functions and externals, and the tm structure,
     are in the time.h header file.  The structure declaration is:

          struct    tm {
               int  tm_sec;   /* seconds after the minute - [0, 61] */
                                   /* for leap seconds */
               int  tm_min;   /* minutes after the hour - [0, 59] */
               int  tm_hour;  /* hour since midnight - [0, 23] */
               int  tm_mday;  /* day of the month - [1, 31] */
               int  tm_mon;   /* months since January - [0, 11] */
               int  tm_year;  /* years since 1900 */
               int  tm_wday;  /* days since Sunday - [0, 6] */
               int  tm_yday;  /* days since January 1 - [0, 365] */
               int  tm_isdst; /* flag for alternate daylight */
                                   /* savings time */
          };

Granted, years since 1900 *is* arbritrary. But no more or less arbritrary
than specifying the complete year.

Or even in someone specifying that this is 1997. Allegedly, today is
30 July 1997. It's also:

 Mayan date: Long count = 12.19.4.6.15; tzolkin = 8 Men; haab = 13 Xul
 Decade II, Duodi de Thermidor de l'Anne'e 205 de la Revolution
 Islamic date (until sunset): Rabi I 24, 1418
 Hebrew date (until sunset): Tammuz 25, 5757
 Astronomical (Julian) day number after noon UTC: 2450660
 Julian date: July 17, 1997
 ISO date: Day 3 of week 31 of 1997.

according to the calendar mode in emacs... :)

James

-- 
Consulting Minister for Consultants, DNRC
Support the anti-Spam amendment <url:http://www.cauce.org/>
To cure your perl CGI problems, please look at:
<url:http://www.perl.com/perl/faq/idiots-guide.html>


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

Date: 30 Jul 97 10:04:17 GMT
From: tshiono@cv.sony.co.jp (Toru Shiono)
Subject: Re: unpack suitability
Message-Id: <TSHIONO.97Jul30100417@aquarius.cv.sony.co.jp>

In article <33D6AE89.1DB43F59@dimensional.com>
	bking@dimensional.com (bob king) writes:

:Can someone help me to understand if unpack is the way i want to
:go here, and if so, how. In the back of Programming Perl i read 
:something that seems to indicate that use of unpack may be preferable
:to repeated calls to substr. I am attempting to read a string of 450 hex
:chars of length 4 and get the decimal numbers. Currently i am using
:substr + hex. Here is a test script with output.
:
:#!/usr/bin/perl -w
:
:$test1 = "007E004000870043";
:$test2 = substr($test1,0,4);
:$test2 = hex($test2);
:$test3 = substr($test1,4,4);
:$test3 = hex($test3);

Try something like:

    ($test2, $test3) = unpack('a4a4', $test1);
    $test2 = hex($test2);
    $test3 = hex($test3);

If your string is lengthy as noted above, you may want to say:

    $t = 'a4' x 450;
    @ary = map(hex, unpack($t, $your_string));

Hope this helps.
--
Toru Shiono          Sony Corporation, JAPAN


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

Date: 30 Jul 1997 10:55:45 +0300
From: Jarkko Hietaniemi <jhi@alpha.hut.fi>
Subject: Re: Why no SIGURG in POSIX?
Message-Id: <oeeen8hvuri.fsf@alpha.hut.fi>


garthc@compass-da.com (Garth Corral) writes:

> Is there some technical reason why SIGURG is not exported by POSIX or
> is this simply not yet implemented?   While I'm on the subject, I

SIGURG c'est ne pas POSIX, that's why it is not exported by POSIX.

Come to think of it, why do you need POSIX to export it?  If your
system has it should be in %SIG already:

perl -le 'print "@{[sort keys %SIG]}"'

gives in my system:

ABRT AIO ALRM BUS CHLD CLD CONT EMT FPE HUP ILL INFO INT IO IOINT IOT KILL LOST MAX NUM34 NUM35 NUM36 NUM37 NUM38 NUM39 NUM40 NUM41 NUM42 NUM43 NUM44 NUM45 NUM46 NUM47 PIPE POLL PROF PTY PWR QUIT RESV RTMAX RTMIN SEGV STOP SYS TERM TRAP TSTP TTIN TTOU URG USR1 USR2 VTALRM WINCH XCPU XFSZ

> noticed that (at least in 5.003) F_SETOWN is not exported by Fcntl either.

Stand by for 5.004_02:

     F_DUPFD F_GETFD F_GETLK F_SETFD F_GETFL F_SETFL F_SETLK F_SETLKW
     FD_CLOEXEC F_RDLCK F_UNLCK F_WRLCK F_POSIX
     O_CREAT O_EXCL O_NOCTTY O_TRUNC
     O_APPEND O_NONBLOCK
     O_NDELAY O_DEFER
     O_RDONLY O_RDWR O_WRONLY
     O_BINARY O_TEXT
     O_EXLOCK O_SHLOCK O_ASYNC O_DSYNC O_RSYNC O_SYNC
     F_SETOWN F_GETOWN

(Of course your system must support all these for you to really get all these)

-- 
$jhi++; # http://www.iki.fi/~jhi/
        # There is this special biologist word we use for 'stable'.
        # It is 'dead'. -- Jack Cohen


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

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

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