[6424] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 49 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Mar 4 18:17:39 1997

Date: Tue, 4 Mar 97 15:00:24 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Tue, 4 Mar 1997     Volume: 8 Number: 49

Today's topics:
     @ interpolation in string context (Ken Williams)
     Re: @ interpolation in string context <nachtigall@edcserver1.cr.usgs.gov>
     Re: @hash{@fields} = @values; <zenin@best.com>
     Re: [Q] Perl in win3.11? (Ric Harwood)
     Re: automatic testing <rootbeer@teleport.com>
     Re: Beginner - simple problem <lclapp@intnet.net>
     BUG? Please explain this behavior <jhg@austx.tandem.com>
     Re: College Students need help with perl script (0/1) <rootbeer@teleport.com>
     Examples/Documentation on "Chat.pm" ?? (Milan Saini)
     fork and alarm problem (Yew Yap)
     Re: fork and alarm <zenin@best.com>
     how do I call out whois ?  Im using BSD and Perl 5 (Cyberosity)
     Re: How to make perl scripts appear locally on the brow <Paul.deWerk@MCI.Com>
     Image sending paolo.p@oasi.asti.it
     Re: looking for undump (Alligator Descartes)
     Mail an attatchment with Perl (Cheng Tyh Lin)
     pattern matching question <lj25+@andrew.cmu.edu>
     Re: PERl (via www) Databases from the ground up (Andru Luvisi)
     Perl Filehandle Reading Behaviour for a Dynamicly Growi <kym@t-rex.materials.unsw.edu.au>
     perl man pages <ss51@columbia.edu>
     perl tcp server for mac to unix <christopher_eltervoog@qmail.newbridge.com>
     Re: Perl timing questions: (Anthony Bucci III)
     Please help me understand!! <ng19@dial.pipex.com>
     Re: Public domain DES and other crypto code in Perl? <rootbeer@teleport.com>
     Re: Public domain DES and other crypto code in Perl? <charlej9@idt.net>
     Redirecting output <Brandon@byu.edu>
     Repost: Cookie question (Administration)
     utime() on Win95/NT (build 303) doesn't work... help! <ron.aaron@joe-bob.worldnet.att.net>
     Re: Variables in array-names <lclapp@intnet.net>
     Re: What's wrong with this Perl? <tchrist@mox.perl.com>
     Re: Where is FAQ? (John Stanley)
     Re: Win32/NT problems with ARGVand .pl association (The next Pele)
     Win32::NetAdmin::UserGetAttributes <jrtietsort@micron.com>
     Re: X at a time search engine routine problem <rootbeer@teleport.com>
     zerodivide errors mackey@cse.ucsc.edu
     Digest Administrivia (Last modified: 8 Jan 97) (Perl-Users-Digest Admin)

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

Date: Tue, 04 Mar 1997 16:34:12 -0500
From: ken@forum.swarthmore.edu (Ken Williams)
Subject: @ interpolation in string context
Message-Id: <ken-0403971634120001@news.swarthmore.edu>

Hi-

I found myself kind of upset when this compiled:

 %hash = &subr;
 @POSTED = ('hiya', 'friya');
 print("POSTED: @POSTED\n");

 sub subr {
    return (One => 1);
 }

But this didn't:

 %hash = &subr;
 print("POSTED: @POSTED\n");

 sub subr {
    @POSTED = ('hiya', 'friya');
    return (One => 1);
 }

It gave me this error message:

 Literal @POSTED now requires backslash at arrays.pl line 4, within string
 Execution of arrays.pl aborted due to compilation errors.

Now, I understand this error message, but it's wrong.  I don't want
@POSTED to be a literal, I want it to be a list.  And I want it to be a
list that's created inside another subroutine.  Should this really be a
problem?  Why?

-Ken Williams
 ken@forum.swarthmore.edu


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

Date: Tue, 4 Mar 1997 22:48:43 GMT
From: Neal Nachtigall <nachtigall@edcserver1.cr.usgs.gov>
To: Ken Williams <ken@forum.swarthmore.edu>
Subject: Re: @ interpolation in string context
Message-Id: <331CA6CB.15A9@edcserver1.cr.usgs.gov>

Ken Williams wrote:
[clip]

> But this didn't:
> 
>  %hash = &subr;
>  print("POSTED: @POSTED\n");
> 
>  sub subr {
>     @POSTED = ('hiya', 'friya');
>     return (One => 1);
>  }
> It gave me this error message:
> 
>  Literal @POSTED now requires backslash at arrays.pl line 4, within string
>  Execution of arrays.pl aborted due to compilation errors.

First, off you can get the preceding to work if you include one of the
following lines before the &subr call:

  my @POSTED;  #OR
  @POSTED = ();

and even:
  my @POSTED;  #after the &subr call

Second, even though I can help fix it I have know idea why you 
are getting the error to begin with.  Before the fix that I suggested
I would have expected a possible:
  Uninitialized variable @POSTED warning also but got none.

Hopefully someone else can shed some light on this problem: (bug,
enhancement, ....)

> [clip]  Should this really be a
> problem?  Why?

--
Neal L. Nachtigall * nealnach@dlgef.cr.usgs.gov 
Hughes STX (EROS Data Center)

No wonder nobody comes here--it's too crowded. -Yogi Berra


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

Date: 4 Mar 1997 21:36:40 GMT
From: Zenin <zenin@best.com>
Subject: Re: @hash{@fields} = @values;
Message-Id: <5fi4l8$pdd$2@nntp2.ba.best.com>

Ken Stevens <kstevens@theglobeandmail.com> wrote:
: Say, I've always wondered about this one.  Why does the following work?

: @fields = ('a', 'b', 'c');
: @values = (4, 7, 9);
: @hash{@fields} = @values;
: print $hash{'b'}; 		# will print "7"

: I've read all the perl docs, and I can't find any reference to this very
: useful syntax.  Is this an undocumented goodie?

	It's kind'a documented, but not directly:

	Blue Camel p37:
	"@days{'Jan', 'Feb'}	Same as ($days{'Jan'}, $days{'Feb'})"

	The syntax "'Jan', 'Feb'" is a list constant, and as such can be
	replaced with a list var as your example does.  Not magic, it just
	"Works the way you'd expect it to". :)
-- 
Zenin                                                    Programing Consultant
  Zenin @ Best . com                    Perl, JavaScript, Web Graphic Design
    http://www.best.com/~zenin/                   Just another Perl hacker
     Spelling mistakes? Their couldn't be. -My modem is error correcting.


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

Date: Tue, 04 Mar 1997 20:29:14 GMT
From: ric@discoveryinternational.com (Ric Harwood)
Subject: Re: [Q] Perl in win3.11?
Message-Id: <331c7d6f.3085576@news.demon.co.uk>

In comp.lang.perl.misc, on 3 Mar 1997 21:16:31 GMT
ilya@math.ohio-state.edu (Ilya Zakharevich), wrote:

>> >Go to the c:\perl\bin directory and use emxbind to extract the a.out
>> >module from perl_.exe, something like:
>> >
>> >        emx emxbind.exe -x perl_.exe perl.out
>> >
>> >Use emxbind to bind the a.out module with the emxl.exe stub:
>> >
>> >        emx emxbind.exe emxl.exe perl.out perl.exe
>> >
>> >Assuming that worked, you can now delete the following files:
>> 
>> All seemed to go well.
>
>Note that it should be enough to put rsx.exe on your path, and run
>perl_.exe. The best way should be to bind rsx.exe (or is it csx.exe in
>newest RSX?) to perl_.exe.
>
>> When I try to run perl5003.exe I just get:
>
>Do not. Run either perl_, or the executable you created above.

>From the bit I snipped above:
In comp.lang.perl.misc, on 18 Feb 1997 18:27:55 -0500 Dean Pentcheff
<dean@tbone.biol.sc.edu>, wrote:

>
>Assuming that worked, you can now delete the following files:
>
>        emxbind.exe
>        emxl.exe
>        perl.out
>        perl_.exe
>        perl5_00.exe

So now I don't have perl_.exe

>Do not forget to get
>	a) Newest rsx (5.10) (I got it from LEO) - long-file-names on W95;

Yes.

>	b) sh_dos.zip from 
>		ftp://ftp.math.ohio-state.edu/pub/users/ilya/os2
>	   - backticks and pipes working

Yes.

>	c) set PERL_SH_DIR to directory part of sh.exe WITH FORWARD
>	   SLASHES. 

Yes.
Ric.

-- 
"Big whorls have little whorls that feed on their velocity, 
and little whorls have lesser whorls and so on to viscosity."
                                          -- L.F.Richardson
PGP id:0766ABE5  http://www.discoveryinternational.com/ric/


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

Date: Tue, 4 Mar 1997 14:30:30 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Detlef Huettemann <detman@berlin.snafu.de>
Subject: Re: automatic testing
Message-Id: <Pine.GSO.3.95q.970304142932.29749K-100000@kelly.teleport.com>

On Tue, 4 Mar 1997, Detlef Huettemann wrote:

> We just had started a larger perl development project, and want to
> automate the testing of perl subroutines, modules and applications.

Have you seen the test suite which comes with Perl? It's in the t
directory in the Perl distribution. Hope this helps!

-- Tom Phoenix        http://www.teleport.com/~rootbeer/
rootbeer@teleport.com   PGP  Skribu al mi per Esperanto!
Randal Schwartz Case:     http://www.lightlink.com/fors/



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

Date: Mon, 03 Mar 1997 23:24:13 -0800
From: Larry Clapp <lclapp@intnet.net>
To: turnerm@cs.man.ac.uk
Subject: Re: Beginner - simple problem
Message-Id: <331BCE1D.706@intnet.net>

Mark Turner wrote:

> In my program I need the directory path.

Try:

$original_dir = `pwd`;
                ^   ^
                Note backticks, not forward ticks.

See also the cwd.pm module in the perl library.

If you're using a DOS or Windows-based perl, you would
of course have to use `cd` instead of `pwd`.

-- 
Larry
lclapp@intnet.net




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

Date: Tue, 04 Mar 1997 14:51:10 -0600
From: Jim Garrison <jhg@austx.tandem.com>
Subject: BUG? Please explain this behavior
Message-Id: <331C8B3E.28D9@austx.tandem.com>

I understand all the results up to the last one.
I expect the string "key1val1key2val2", not what is 
obviously a decimal interpretation of a pointer.

Is this a bug?

  DB<1> $aref = [0,1,2,3];

  DB<2> $href = {"key1" => "val1", "key2" => "val2"};

  DB<3> p $aref->[0]
0
  DB<4> p $href->{"key1"}
val1
  DB<5> p join(' ',@$aref)
0 1 2 3
  DB<6> p join(' ',%$href)
key1 val1 key2 val2
  DB<7> p @$aref
0123
  DB<8> p %$href
268671480

-- 
James Garrison			mailto:jhg@mpd.tandem.com
Tandem Computers, Inc
14231 Tandem Blvd, Rm 2346	Phone: (512) 432-8455
Austin, TX 78728-6699		Fax:   (512) 432-2118


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

Date: Tue, 4 Mar 1997 14:23:20 -0800
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: College Students need help with perl script (0/1)
Message-Id: <Pine.GSO.3.95q.970304141949.29749I-100000@kelly.teleport.com>

On Tue, 4 Mar 1997 Bozo@Chicago.land wrote:

> From: Bozo@Chicago.land
> Newsgroups: comp.lang.perl.misc
> Subject: College Students need help with perl script (0/1)
> 
> I am a student at a public college in Tennessee 

That's nice. I'm sure that several of us would like to help you with your
trouble. Before you post again, could you please fix your newsreader to
use your proper e-mail address? Also, it would be good of you to read the
frequent postings in this newsgroup about choosing good subject lines and
where to find answers to your questions. Also, it's not a good idea to
post binaries to a non-binary group like c.l.p.misc. Thanks.

-- Tom Phoenix        http://www.teleport.com/~rootbeer/
rootbeer@teleport.com   PGP  Skribu al mi per Esperanto!
Randal Schwartz Case:     http://www.lightlink.com/fors/



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

Date: 4 Mar 1997 18:58:19 GMT
From: milan@xilinx.com (Milan Saini)
Subject: Examples/Documentation on "Chat.pm" ??
Message-Id: <5fhrcb$dtu@mailman.xilinx>

HI

Can anybody point me to Examples and/or Documentation
on the Chat module.

Thanks
Milan
-- 
  / 7\'7 Milan Saini (milan@xilinx.com)
  \ \ `  Xilinx                              Telephone: 408-559-7778
  / /    2100 Logic Drive                    Direct:    408-879-5300
  \_\/.\ San Jose, California 95124-3450     FAX:       408-879-4676


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

Date: 4 Mar 1997 20:32:19 GMT
From: gohyewya@iscs.nus.sg (Yew Yap)
Subject: fork and alarm problem
Message-Id: <5fi0sj$g64@nuscc.nus.sg>

Can somebody kindly help me please? TIA!

Below is my algo

What I try to do is fork a child which do a time consuming jobs, and the
parent will need to try to wait a 
specific period of time. If the child finishes the job before the alarm
rings, then parent will process the data, else parent will exit and left
the child continues processing.

When I run this code at command prompt the parent exit immediately and
init handle the child, however
when I run this as CGI, the CGI keep waiting there until child exits.
And alarm dont work here.

TIA for ur help!

Below is my code
#!/usr/local/bin/perl -wT

print "Content-type: text/html\n\n";
$SIG{CHLD} = \&killZombie;

if ($pid = fork)
{
	print "parent:";
	$SIG{'ALRM'} = \&time_out;
	alarm 1;


}
elsif (defined($pid)) {

	sleep 1000;

	exit;
}

sub killZombie
{

	$SIG{CHLD} = \&killZombie;
	$waitpid = wait ;
	print $waitpid, "<br>";

#print "kill Zombie child<br>\n";
#print @_;
}

sub time_out
{
	print "Get alarm";
	exit(1);

--
Goh Yew Yap  ~{Nbe6ZK~}
Home Page : http://www.iscs.nus.sg/~gohyewya/
E-mail    : gohyewya@iscs.nus.sg, isc40330@nus.sg, gohyy@post1.com
            gohyy@scicblc.nus.sg



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

Date: 4 Mar 1997 21:40:25 GMT
From: Zenin <zenin@best.com>
Subject: Re: fork and alarm
Message-Id: <5fi4s9$pdd$3@nntp2.ba.best.com>

Yew Yap <gohyewya@iscs.nus.sg> wrote:
: Hi thanks for reading my posting, and please kindly mail me if u are 
: willing to help.

: Why after forking a child, alarm wont work any more?
	Does it not work in the parent, or the child?  -I don't think it
	should work in the child as the kernel hasn't been told to send the
	alarm sig to that pid (if you set the alarm in the parent before
	forking).

: And after forking how to let the parent exit without waiting for the child?

	fork && exit;
	print "Parent dead, child alive\n";

	-Although you might want more error checking then that. :)
-- 
Zenin                                                    Programing Consultant
  Zenin @ Best . com                    Perl, JavaScript, Web Graphic Design
    http://www.best.com/~zenin/                   Just another Perl hacker
     Spelling mistakes? Their couldn't be. -My modem is error correcting.


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

Date: Tue, 04 Mar 1997 19:02:38 GMT
From: web@cyberosity.com (Cyberosity)
Subject: how do I call out whois ?  Im using BSD and Perl 5
Message-Id: <331c71af.4270011@news.dhc.net>

Im very new to useing perl,  and if someone could point me in the
right direction.

Thank you for your time and help




#!/usr/bin/perl
##############################################################################
# whois                         Version .7b


$date_command = "//bin/date";
$whois = "/usr/bin/whois -h";

# Get the Date for Entry
$date = `$date_command +"%A, %B %d, %Y at %T (%Z)"`; chop($date);
$shortdate = `$date_command +"%D %T %Z"`; chop($shortdate);
 
# Get the input
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});

# Split the name-value pairs
@pairs = split(/&/, $buffer);

foreach $pair (@pairs) {
   ($name, $value) = split(/=/, $pair);

   # Un-Webify plus signs and %-encoding
   $value =~ tr/+/ /;
   $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
   $value =~ s/<!--(.|\n)*-->//g;

   }

#  Print Beginning of HTML
   print "Content-Type: text/html\n\n";
   print "<html><head><title>todays date</title></head>\n";
   print "<body background='/guestbook/good1.jpg'><h1>Requested Whois
Information</h1>\n";
   # Print Response
   print "The following is some information about the domain name and
its owner: \n";
   print "<hr>\n";
   print "Here is what you submitted:<p>\n";
   print " - $date<p>\n";
   print "$ENV{'REMOTE_HOST'} - [$shortdate]<br>\n";
   print "$whois cyberosity.com\n";



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

Date: Tue, 04 Mar 1997 11:06:41 -0800
From: Paul-Joseph de Werk <Paul.deWerk@MCI.Com>
To: herryh@xs4all.nl
Subject: Re: How to make perl scripts appear locally on the browser
Message-Id: <331C72C1.2384@MCI.Com>

This is a multi-part message in MIME format.
------------4D76D4246060
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=us-ascii

herryh@xs4all.nl wrote:
> 
> Hi,
> 
> I have a problem getting my perl-scripts to output to my browser.
> presently I test my scripts by copying them to the perl\bin dir. and
> run
> perl myfile.pl > myfile.html
> and then have my browser read myfile.html.
> 
> But what I really want is having my browser read the perl script
> directly. But all that happens is a unreadably quick appearing
> and disappearing dos-box saying Bad Command or Filename.
> I want the same output as when I run it manually at the dosprompt
> and I want the output being directed to my browser.
> 
> I installed O'reilly's Website, Netscape 3.01 and Win32 Perl.

Have you tried placing the perl scripts in WebSite's cgi-bin directory,
and using the cgi-bin URL through WebSite to run it?  (Make sure you
have .pl extensions associated with perl.exe)  I have this on my comp
for my own development and it wrks fine for me.

-Paul

-- 
#include <std/disclaimer.h>             | Quote:
Paul-Joseph de Werk, BSCS               | 
Sr. Systems Programmer                  | Every accomplishment
MCI Telecommunications Corporation      | starts with the decision
State Government and University Markets | to try.
mailto:Paul.deWerk@MCI.Com              |
http://www.campus.mci.net/~pdewerk/     |    --Unknown
------------4D76D4246060
Content-Transfer-Encoding: 7bit
Content-Description: Card for Paul-Joseph de Werk
Content-Disposition: attachment; filename="nsmailH2.TMP"
Content-Type: text/x-vcard; charset=us-ascii; name="nsmailH2.TMP"

BEGIN:VCARD
FN:Paul-Joseph de Werk
N:de Werk;Paul-Joseph
ORG:MCI Telecommunications
ADR:;;2485 Natomas Park Drive, Suite 450;Sacramento;CA;95833
EMAIL;INTERNET:Paul.deWerk@MCI.Com
TITLE:Senior Systems Programmer
TEL;WORK:(916) 649-6028
TEL;FAX:(916) 649-6200
X-MOZILLA-HTML:F
END:VCARD


------------4D76D4246060--



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

Date: Tue, 04 Mar 1997 22:01:54 +0100
From: paolo.p@oasi.asti.it
Subject: Image sending
Message-Id: <331C8DC2.6E65@oasi.asti.it>

How can I send image through the server with a perl 5 script but without
uuencoded them?
I would like to send them in mime format as file attach in the mail.
How can I do?
Help me!! :(


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

Date: 4 Mar 1997 19:29:33 GMT
From: descarte@mole.dimensionx.com (Alligator Descartes)
Subject: Re: looking for undump
Message-Id: <5fht6t$k0d$1@nntp2.ba.best.com>

In article <5ffggh$6n8@oldfart.ecl.wustl.edu>,
D. Cameron Mauch <cam@ecl.wustl.edu> wrote:
>Hello all.  Has any written an undump program sometime this decade?
>Especially one I might be able to compile under Sun Solaris?  Thanks!

See:

    http://www.hermetica.com/technologia/perl/unexec

for details on undumping under Solaris.

A.

-- 
Alligator Descartes       |
descarte@dimensionx.com   |   "Vinegar's wee, but he's gemme!" -- Bud Neill
http://www.hermetica.com  |


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

Date: 4 Mar 1997 02:08:36 GMT
From: a00lcj00@elc012.nchc.gov.tw (Cheng Tyh Lin)
Subject: Mail an attatchment with Perl
Message-Id: <5fg075$g85@cyrene.nchc.gov.tw>
Keywords: cgi, attatchment

Hi,
  How can I do that if I want to attatch a file(not an plain text, such as 
tgz, zip...) after an mail? This may be useful if the file is too large 
to download or the network speed is so slow. By using this method, it may 
save much time to download from abroad on the web! Is there somebody could
tell me how to do that or how to find the tools.
  Thanks in advance.

Lin.


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

Date: Tue,  4 Mar 1997 16:09:37 -0500
From: Lee William Jones <lj25+@andrew.cmu.edu>
Subject: pattern matching question
Message-Id: <4n78yF200YUq0cP3M0@andrew.cmu.edu>


Hi, I was wondering if someone could help me out with this.

I'm trying to do a relaxed pattern match -- i.e. given a string
sequence, return position(s) where it matches at least x characters in
the string.

I checked the camel book, but didn't see any operators or syntax for
something of this sort (perhaps I'm just blind).  Short of enumerating
the possibilities with wildcards filled in (a VERY ugly option) or
writing another short program to enumerate them for me (still looks very
ugly), I'm not sure what to do.  Call me lazy, but I thought there was
some built in way to do this.

thanks for any help or direction
lee

----------------------------------
Lee Jones
Carnegie-Mellon University
computational Biology
lj25@andrew.cmu.edu 



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

Date: 4 Mar 1997 19:00:26 GMT
From: luvisi@andru.sonoma.edu (Andru Luvisi)
Subject: Re: PERl (via www) Databases from the ground up
Message-Id: <5fhrga$ajr$1@nuke.csu.net>

Marten Mickos (marten.mickos@solidtech.com) wrote:
: Aveek Datta wrote:
[snip]
: > looking for a simple, easy, and free relational database that I can use
                                    ^^^^
[snip]
: Try out SOLID Server at http://www.solidtech.com

>From the web page:
> download a free evaluation copy
                  ^^^^^^^^^^

somehow I don't think that's what he was after.

andru



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

Date: Wed, 05 Mar 1997 08:00:18 +1000
From: Kym Farrell <kym@t-rex.materials.unsw.edu.au>
Subject: Perl Filehandle Reading Behaviour for a Dynamicly Growing file
Message-Id: <331C9B71.1533@t-rex.materials.unsw.edu.au>

Hi,

    I have been experimenting with writing a log file processor in perl,
but one which dynamically processes the live (and growing) log-file. In
the course of this I have been woundering just what is the official
behaviour defined for perl when reading to the end of a file which
suddenly starts growing again.
    Under Linux the (from memory) code below works ok, but can I expect
the same when under NT/perl?

    I also need some way of detecting that the file handle becomes
detached from the file I'm interested in, such as if another process
backs up/removes the log file I working on. I thought of checking the
file size each time through the loop & restarting myself when
new_file_size < old_file_size but this seems a bit brutal (& possibly
time consuming).

Any comments apreciated.

open(LOG,"LogfileName");

$displayed=0;
while(){
    $gotline=<LOG>;
    if ($gotline) { print "Got the Line with Value
[$gotline]\n";$displayed=0;next;}
    unless($displayed) {print "Waiting for next line\n"; $displayed=1;}
}





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

Date: Tue, 04 Mar 1997 17:31:57 -0500
From: SRI <ss51@columbia.edu>
Subject: perl man pages
Message-Id: <331CA2DD.446B@columbia.edu>

I installed perl5.003 on a HP 9000/712. I did a 'man perl' and it shows

PERL(1)                                                            
PERL(1)
                          Release 4.0 Patchlevel 36
 .......

This seems to be for the 4.0 version. But I checked /usr/local/man/man1
and /usr/local/lib/perl5/man/man3 and they all are brand new. Where are
the old man pages hiding? Also there are two executables 'perl' and
'perl5.003' in /usr/local/bin. Are they the same?

thanks
SS


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

Date: Tue, 04 Mar 1997 14:53:44 -0500
From: Chris Eltervoog <christopher_eltervoog@qmail.newbridge.com>
Subject: perl tcp server for mac to unix
Message-Id: <331C7DC8.4A64@qmail.newbridge.com>

I am looking for a perl script or piece of software that can be used 
in unix to trigger applications on a mac.  Does anyone have any ideas 
about where I can find some information about this?


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

Date: 4 Mar 1997 21:30:27 GMT
From: axb21@po.CWRU.Edu (Anthony Bucci III)
Subject: Re: Perl timing questions:
Message-Id: <5fi49j$doh@alexander.INS.CWRU.Edu>


In a previous article, albury@csee.usf.edu (Innuendo) says:

>Can anyone clue me in as to a way to time operations in perl witha
>granularity of less than 1 sec? 
>
>I'm writing some socket based code to send packets around the internet
>and i'd liek to be able to measure packet response time in milliseconds;
>however the time module only supports increments as fine as 1 second.
>
>Is it neccessary to somehow use syome type of system event of interupt
>to count in milliseconds??
>
>I'm at a loss here for the moment and i'd appreciate any pointers anyone
>might have,

How about repeating the command 1,000 times, timing how long this takes,
timing an empty loop, and doing the math?  If the command (repeated 1,000
times) takes X seconds, and the empty loop (repeated 1,000 times) takes E
seconds, then

	(X - E) / 1000

will give you a rough idea of the execution time of the command.

Or, better yet, how about getting the Benchmark module from CPAN, since it
does all this for you.

Anthony

-- 


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

Date: Tue, 04 Mar 1997 21:06:41 -0800
From: Glenn Johnson <ng19@dial.pipex.com>
Subject: Please help me understand!!
Message-Id: <331CFF61.15F4@dial.pipex.com>

I know that I must be very stupid, but please explain to me why I can't 
get the simple task of running a very short perl script code to run on my 
server.  I am using a NOVELL 4.10 server with NOVELL WEBSERVER 2.5 on it. 
 I have loaded the PERL.NLM, but I can't seem to get any of the scripts 
running!  What am I doing wrong.

I understand the concept of the script that has been created, I just 
can't get it to process!!

Pleeeeaaaasssseeeee help as soon as you can.  I will be forever your 
best friend (honest!!)

Many thanks in advance,

Stupid bloke (er, Glenn) 8-}



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

Date: Tue, 4 Mar 1997 14:11:59 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Aviel Rubin <rubin@quip.eecs.umich.edu>
Subject: Re: Public domain DES and other crypto code in Perl?
Message-Id: <Pine.GSO.3.95q.970304140905.29749G-100000@kelly.teleport.com>

On 3 Mar 1997, Aviel Rubin wrote:

> Is there a public domain implementation of DES, MD5 and other crypto
> algorithms? I have seen ones that are C modules that people can link
> into their programs. One problem with such schemes is that usually they
> are installed in a central place by a system administrator, so the
> entire security of the system relies on trusting that you are linking to
> the right functions. 

If you trust your admin to install Perl, you can trust your admin to
install modules. (Right?) If you don't trust your admin, set up your own
system - you shouldn't do anything security-related on a system where you
can't trust the admin! 

You'll find an assortment of cool stuff in CPAN. If you don't find what
you need, you're welcome to code it up and submit it. Hope this helps!

    http://www.perl.org/CPAN/
    http://www.perl.com/CPAN/

-- Tom Phoenix        http://www.teleport.com/~rootbeer/
rootbeer@teleport.com   PGP  Skribu al mi per Esperanto!
Randal Schwartz Case:     http://www.lightlink.com/fors/



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

Date: 4 Mar 1997 22:43:27 GMT
From: "Charles N. Johnson" <charlej9@idt.net>
Subject: Re: Public domain DES and other crypto code in Perl?
Message-Id: <01bc28ed$5d4cb680$09c10c26@i-charlej9.interramp.com>

[ ...snip... ]

Paul Rubin <phr@netcom.com> wrote in article <phrE6J5M3.5Dz@netcom.com>...
> In article <5fh0sm$lrc$2@korai.cygnus.co.uk>,
> Andrew Haley <aph@cygnus.co.uk> wrote:
> 
> Not everyone has Perl either though!  Personally I think it's time
> for a Lisp revival...
> 
> 
That thounds thwell to me!

Cheerths...
Charlesths...


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

Date: Tue, 04 Mar 1997 13:04:12 -0700
From: Brandon Pulsipher <Brandon@byu.edu>
Subject: Redirecting output
Message-Id: <331C803C.42EC@byu.edu>

I am having problems with the "system()" method.  It actually works fine
but command I am running returns some information and it gets displayed.
I have tried in vain to hide the output, but it just won't work for me.
Anyone have a way I can turn off/redirect the output while this system()
call does its thing, then return output to normal?  The line of code is
below( I am using NT Perl):

  if (system("ftp -s:source.ftp")  {print LOG "Error: blah blah";die}

THANK YOU!


-- 
__________________________________________________
Brandon Pulsipher    Marriott School of Management
Network Consultant        Brigham Young University
Brandon@byu.edu			      801-378-4434


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

Date: 4 Mar 1997 21:40:22 GMT
From: admin@vci.net (Administration)
Subject: Repost: Cookie question
Message-Id: <5fi4s6$1on@apple.telalink.net>

  I know how to do cookies easily from a perl script or C program but I
haven't been able to send a cookie when another document is being loaded.
I've been trying to call a perl script or C program from a server side
include. The SSI runs the CGI but instead of doing a traditional cookie the
whole "Set-cookie: expires=...path=..." header gets put into the document
as regular text.
  I'm sure there's a way something like this can be done. It seems that the
LinkExchange does something like this with those banners you see
everywhere.
        Can anyone help?
        I'd appreciate an email. Thanks.

	Bill Dunn



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

Date: 4 Mar 1997 18:36:13 GMT
From: "Ron Aaron" <ron.aaron@joe-bob.worldnet.att.net>
Subject: utime() on Win95/NT (build 303) doesn't work... help!
Message-Id: <01bc28ca$c36719b0$8425379d@v-ronaar2>

Does anyone know how to get the 'utime' function working on NT/Win95?

The following doesn't work (ever, at all):

	utime ($now, $now, @ARGV) or
		warn "cannot utime: $!\n";

Any ideas why?

Thanks,
Ron
-- 
Note: excise 'joe-bob' from my address in order to respond via email,
thanks!

The opinions expressed in this message are my own personal views 
and do not reflect the official views of Microsoft Corporation


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

Date: Mon, 03 Mar 1997 22:55:32 -0800
From: Larry Clapp <lclapp@intnet.net>
To: Arnold Andersson <arnold@otto.mpimf-heidelberg.mpg.de>
Subject: Re: Variables in array-names
Message-Id: <331BC764.7916@intnet.net>

Arnold Andersson wrote:
> Im trying to write a subrutine that process several
> arrays. I would like to be able to refere to the
> array-name by adding the calling variable to the name.
> I could use a temporary variable like:
> 
>    $temp = IP.$no._SORTED;
> 
> and then refere to the array-name by:
> 
>    print @$temp;
> 
> But can't you do something like this (well, not exactly
> like this since that dosn't work ;-))? A one liner?
> 
> ------------------------------------------------------
> @IP24_SORTED = (1..5);
> 
> sub ProcessArray
> {
>   local($no) = @_;
> 
>   print @IP.$no._SORTED;
>   print "\n";
> }
> 
> ProcessArray(24);
> ------------------------------------------------------

Arnold,

I wrote this:

--------------- try.pl ---------------
@ip24_sorted = (1..5);

$no = 24;

eval "print \@ip" . $no . "_sorted";
--------------------------------------

Ran this:

perl -w try.pl

And got this:

Identifier "main::ip24_sorted" used only once: possible typo at try.pl
line 1.
12345

I think that's about what you wanted.  If you used @ip24_sorted
elsewhere in the program, you probably wouldn't get the "Ident. only
used once" warning.

Good luck.

--
Larry Clapp
lclapp@intnet.net



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

Date: 4 Mar 1997 22:28:46 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: What's wrong with this Perl?
Message-Id: <5fi7mu$jf2$1@csnews.cs.colorado.edu>

 [courtesy cc of this posting sent to cited author via email]

In comp.lang.perl.misc, ron@farmworks.com (Ronald L. Parker) writes:
:Does your signature change itself, or did you do this deliberately?

It changes itself, as it were.

--tom
-- 
	Tom Christiansen	tchrist@jhereg.perl.com
    "The usability of a computer language is inversely proportional to the
    number of theoretical axes the language designer tries to grind."
    	--Larry Wall


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

Date: 4 Mar 1997 19:27:27 GMT
From: stanley@skyking.OCE.ORST.EDU (John Stanley)
Subject: Re: Where is FAQ?
Message-Id: <5fht2v$ah4@news.orst.edu>

In article <E6J3pJ.CE8@nonexistent.com>, Abigail <abigail@ny.fnx.com> wrote:
>True, but people who have Usenet access and no Internet access are
>rare.  

That is not an excuse to ignore them, nor a reason to claim that USENET
is a part of the Internet. Those who don't have Internet or USENET
access don't think they are "rare".

I fail to see why there is such a need to make assumptions about what
people have access to, or to dismiss those without Internet access. USENET
is not part of the Internet. Lots of Internet sites do not allow any
USENET access -- it's a waste of corporate resources, according to
management. Others don't have it because there is nobody paid to set it
up. Lots of non-Internet sites, OTOH, get comp.lang.perl.misc. 

>Pointing to an ftp site is at least understandable.
>Furthermore, there is ftp-by-mail. I've yet to meet someone who has
>Usenet access and no mail access. Maybe someone could set up an
>autoreplyer, sending the faq? (faq@perl.org?)

USENET is not email.

If you provide a newsgroup FAQ in the same medium as the newsgroup, you
need make no assumptions about what people have access to and can ask
them without hesitation whether they have read the FAQ or not. And when
people come to the group looking for the FAQ, like they are supposed to,
they might actually find it.

On a related note, the last time I saw the Meta-FAQ come through the
group was July 6, 1995. I can't find a copy using either altavista or
dejanews. 



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

Date: 4 Mar 1997 19:36:15 GMT
From: gt1535b@acmey.gatech.edu (The next Pele)
Subject: Re: Win32/NT problems with ARGVand .pl association
Message-Id: <5fhtjf$34d@catapult.gatech.edu>

There is another option, though, if the installer doesn't do what it's
supposed to.  I have a batch file that converts a perl script to a batch
file.  I've used it for a while now and the arguments come in fine.  I can't
remember where i got it, but I can e-mail it to anyone who wants it.  It
isn't very long.

Daryl

Steve Tarver (tarver@sky.net) wrote:
: I am running ActiveWare's port - the installer makes this for you. It
: is pretty easy to do yourself - just associate the extension with perl
: and make a default action that runs it. The problem is specifying
: command line args for running an arbitrary script. I've made a couple
: of batch files and put them on my desktop so I can drag and drop files
: from the explorer onto them. the batch file looks like

: 	<foo>.pl %1 %2

: My ARGV is working well. At Oakland, I noted that there were two
: versions of perl. I think one came on the NT 3.51 SDK and the other
: came from http://www.ActiveWare.com. I am using the latter.


: "Trond Ruud" <troruud@online.no> wrote:

: >Hi Perl experts,
: >Im an old C and Unix programmer who has just installed Perl5 under WinNT
: >4.0
: >on my Intel PC, and I am intrigued by the very close similarities between
: >Perl
: >and C. However I'm having some problems with running my Perl scripts.
: >
: >First, my connecting the .pl extension to perl exe only results in
: >NT opening a DOS window for a fraction of a second on doubleclicking the
: >pl
: >script in an NT window.So I have to manually open a DOS window and 
: >run the script by explicitly starting Perl, i.e
: >as: $perl script.pl, which destroys most of the fun!
: >
: >second, Perl doesn't detect my command line arguments. i.e.:argv is always
: >empty. I suspect that this problem's connected to my way of explicitly
: >running perl, (as described above.)
: >Any advice will be highly appreciated!
: >regards
: >Trond Ruud troruud@online


--
<>< Daryl Bowen	<><
Georgia Institute of Technology
Internet: gt1535b@prism.gatech.edu
Siemens Stromberg-Carlson Co-op


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

Date: 4 Mar 1997 16:59:42 GMT
From: "JR Tietsort" <jrtietsort@micron.com>
Subject: Win32::NetAdmin::UserGetAttributes
Message-Id: <01bc28bd$a0d90b40$9b6ac989@jrtietsort>

Can anyone shed some light on the meaning of the value returned in the
$flags variable?
I get the value 66049 when I run it on my personal account.  

What I am hoping to do is maninpulate the Dial-In checkbox in user manager
with this so that I can do mass accounts.

Thanks in advance,

JR Tietsort
Micron Technology, Inc
jrtietsort@micron.com


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

Date: Tue, 4 Mar 1997 14:26:32 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Eric Harley <erich@powerwareintl.com>
Subject: Re: X at a time search engine routine problem
Message-Id: <Pine.GSO.3.95q.970304142407.29749J-100000@kelly.teleport.com>

On Mon, 3 Mar 1997, Eric Harley wrote:

> now, what I want to do is only print out X number of hits at a time and
> provide a NEXT button and a PREVIOUS button for the user to select.
> 
> Any suggestions?

I think you could use the methods in Randal's second Web Techniques
column, which explains how to give X results at a time. Just what you
wanted! :-)  Hope this helps! 

   http://www.stonehenge.com/merlyn/WebTechniques/

-- Tom Phoenix        http://www.teleport.com/~rootbeer/
rootbeer@teleport.com   PGP  Skribu al mi per Esperanto!
Randal Schwartz Case:     http://www.lightlink.com/fors/



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

Date: 4 Mar 1997 20:46:34 GMT
From: mackey@cse.ucsc.edu
Subject: zerodivide errors
Message-Id: <5fi1na$fdo@darkstar.ucsc.edu>

perl -e 'print 0/0';
Illegal division by zero at -e line 1.

perl -e 'print 1e100000';
Infinity

perl -e 'print 1e100000/1e100000';
NaN

perl -e 'print 3/0'
Illegal division by zero at -e line 1.

Is there any way of making Perl follow the standard IEEE-754
rules and generate NaN on zerodivide for 0/0 and +-Infinity
when a finite number is divided by zero?

Kluges with eval of a string are not entirely satisfactory
since the result is then undef and does not distinguish between
Infinity and NaN.



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

Date: 8 Jan 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 8 Jan 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.

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

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