[7391] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1016 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Sep 12 11:17:14 1997

Date: Fri, 12 Sep 97 08: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           Fri, 12 Sep 1997     Volume: 8 Number: 1016

Today's topics:
     Re: backreferences and /i in regex (Tom Grydeland)
     Bonehead addressing question <KenVogt@rkymtnhi.com>
     Re: Bonehead addressing question (Mike Stok)
     Re: Calling a sub function on submit <michael_suddes@" <"NO SPAM>eee.org">
     Capture rsh (remote host tty output) interactively. <wongchwh@hkbu.edu.hk>
     Class::Struct: Access via variable? (Helmut Lichtenberg)
     Re: Compiling scripts <aaron@soltec.net>
     Re: Declaring dynamically named lexical variables (Jeremy D. Zawodny)
     Re: Detecting NFS outage while <> (Jeremy D. Zawodny)
     Re: Detecting NFS outage while <> <doug@tc.net>
     Re: Editor in perl (Jeremy D. Zawodny)
     help request <kerner@nortel.ca>
     Re: help request (Mike Stok)
     Re: how access netscape' s dbm file? <aaron@soltec.net>
     Re: How to email text file <aaron@soltec.net>
     Re: Illegal character \015 (carriage returns) -- HELP (Jeremy D. Zawodny)
     Re: Illegal character \015 (carriage returns) -- HELP (Andrew M. Langmead)
     Re: Illegal character \015 (carriage returns) -- HELP (Tad McClellan)
     Install problems on a HP/Convex Exemplar multi-processo <fridy_jm@atc.alcoa.com>
     is there a better way to do this subroutine? <rbush@up.net>
     Re: Loading modules or subroutines at execution (robert)
     Re: Macperl:  Selena Sol's Groupware Calendar <michael_suddes@" <"NO SPAM>eee.org">
     Re: PERL 5 for Alpha OpenVMS (Patrick MOREAU, CENA Athis, Tel: 01.69.57.64.40)
     Re: Perl Lib Path with Sybase Libraris mpeppler@mbay.net
     Reading Binary Files (The Flash)
     Re: Trivial(?) readdir question Joshua@no.spam.leeds.ac.uk
     Re: unpack and install Perl (Jeremy D. Zawodny)
     Where is the Exception.pm module? (Warren Brown)
     Re: Why don't my <<HERE documents work?  Attempt #2! (Tom Grydeland)
     win32 - piping from a command <newman@ttd.teradyne.com>
     WWW & Password Access <makela@riksu.hamkk.fi>
     Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: 12 Sep 1997 09:33:05 GMT
From: tom@mitra.phys.uit.no (Tom Grydeland)
Subject: Re: backreferences and /i in regex
Message-Id: <slrn61i32h.rg.tom@mitra.phys.uit.no>

On 11 Sep 1997 19:14:37 GMT,
Ilya Zakharevich <ilya@math.ohio-state.edu> wrote:

> >			     Interesting.  Will the same apply to
> > ((?m)re), ((?s)re) etc?
> 
> I would not be sure until the test suite contains a test.  Care to
> contribute a couple?  Looks like "a simple one" t/op/regexp.t cannot

I don't have the jumbo patch installed, so I can't try these out for
myself, but I imagine something like

"a\nb\n" =~ /a(?s(.))b(?!.)/

should match iff (?s ) is applied to only the first .

"a\nb\n" =~ /(?m(^b))(?!$)/

should match iff (?m ) applies only to the ^ and not to the $.

> But the intention was for these to work.

Excellent.

> Ilya

-- 
//Tom Grydeland <Tom.Grydeland@phys.uit.no>


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

Date: Fri, 12 Sep 1997 08:42:58 -0600
From: Kenneth Vogt <KenVogt@rkymtnhi.com>
Subject: Bonehead addressing question
Message-Id: <341954F2.7733@rkymtnhi.com>

Hi everyone,

I have a bonehead question about relative addressing.  My directories
are as follows:

root -+-cgi
      +-html
      +-graphics

If I run a cgi program that resides in /cgi, how can I call a file in
/html or /graphics from that cgi program without giving the absolute
address?

Thanks.
-- 
Kenneth Vogt      
KenVogt@rkymtnhi.com

http://ModernShopping.com
Buy Tupperware(r) products right on the WWW!


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

Date: 12 Sep 1997 14:48:46 GMT
From: mike@stok.co.uk (Mike Stok)
Subject: Re: Bonehead addressing question
Message-Id: <5vbkoe$7qf@news-central.tiac.net>

In article <341954F2.7733@rkymtnhi.com>,
Kenneth Vogt  <KenVogt@rkymtnhi.com> wrote:

>I have a bonehead question about relative addressing.  My directories
>are as follows:
>
>root -+-cgi
>      +-html
>      +-graphics
>
>If I run a cgi program that resides in /cgi, how can I call a file in
>/html or /graphics from that cgi program without giving the absolute
>address?

That depends on what the working directory is.  If your web server (making
an assumption here...) changes working directory to the cgi directory
before executing the scripts then ../html/file etc. should work as
relative file names.  One way to check this out is to write a little test
script which outputs the current working directory (the Cwd module can
help here for perl 5.xxx)

Hope this helps,

Mike

-- 
mike@stok.co.uk                    |           The "`Stok' disclaimers" apply.
http://www.stok.co.uk/~mike/       |   PGP fingerprint FE 56 4D 7D 42 1A 4A 9C
http://www.tiac.net/users/stok/    |                   65 F3 3F 1D 27 22 B7 41
stok@psa.pencom.com                |      Pencom Systems Administration (work)


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

Date: Wed, 10 Sep 1997 00:56:20 -0700
From: "Michael J. Suddes <michael_suddes@" <"NO SPAM>eee.org">
To: fischers@execpc.com
Subject: Re: Calling a sub function on submit
Message-Id: <5v5k36$1v83@news.eee.org>

fischers@execpc.com wrote:
> 
> Here is a dilly of a problem.
> I have a perl script that updates a database.  I want to do a 'onSubmit'
> button that calls a sub function in the current script.  Problem is,
> when the form is submitted, the script looks for the function on my
> server, not in the script itself.  How do I get the script to look for
> the function in itself, not on the server?


Lets say you have a Subroutine called update:

update
{
updating code.....
}

call it like this :

&update;

Mike
-- 
---------------------------------------
Webmaster - http://www.1-888-Javanow.com
Visit the site, tell us what you think.
-------
The sender of any unsolicited email sent to this address agrees to pay 
$500/email for proofreading services.


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

Date: Fri, 12 Sep 1997 17:46:17 +0800
From: Wong Chi Wah <wongchwh@hkbu.edu.hk>
Subject: Capture rsh (remote host tty output) interactively.
Message-Id: <Pine.LNX.3.93.970912173929.4652A-100000@ctscmt.hkbu.edu.hk>

Would any one can help that how can use perl for doing RSH job with
capturing remote's host tty output and save it as a file in local host
then process it later.

Sometime remote host require user to hit some keys to continue the job .
(note: remote does not have any storage.)

Thanks



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

Date: 12 Sep 97 11:54:35 GMT
From: heli@helsinki.tzv.fal.de (Helmut Lichtenberg)
Subject: Class::Struct: Access via variable?
Message-Id: <34192d7b.0@leda.tzv.fal.de>
Keywords: Class::Struct


Hi,
I am working on an application which uses Class::Struct. I have problems
accessing elements of structures with variable substitution. Here a little
code example:

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

use Class::Struct;
struct( Cols => [
      DATA        => '$',  # for the data
      TEXT        => '$',  # Description
]);

package Error;
use Class::Struct;

@error_struct = qw ( NR E_CODE MSG );
struct( NR      => Cols,
        E_CODE  => Cols,
        MSG     => Cols,
);
sub InitializeError {
	my $self = shift;
   $self->NR->TEXT("Number");
   $self->E_CODE->TEXT("Errorcode");
   $self->MSG->TEXT("Errormessage");
};

package main;
$x = Error->new;
$x->InitializeError;

foreach $elem (@{Error::error_struct}) {
   print $x->$elem->TEXT, ": ";            # this is line 29
   my $answ = (<>);
   chop $answ;
   $x->$elem->DATA($answ);
   print $x->$elem->TEXT, " is ", $x->$elem->DATA, "\n";
}
######################################################################

I get these error messages for the concerning lines (29, 32, 33):

print $x->$elem->TEXT, ": ";
syntax error at ./a line 29, near "$elem->TEXT"

print $x->${elem}->TEXT, ": ";
syntax error at ./a line 29, near "${elem}->TEXT"

print $x->{$elem}->TEXT, ": ";
Not a HASH reference at ./a line 29

print $x->($elem)->TEXT, ": ";
Not a CODE reference at ./a line 29.

The only solution I found is:

my $txt =  '$x->' . "$elem" . '->TEXT';
print eval $txt, ": ";

I'm shure there must be a very simple solution. But which?

Thanks
Helmut

PS: perl -v: This is perl, version 5.004_01
--
--------------------------------------------------------------------
 Helmut Lichtenberg   (PGP Public Key available)    heli@tzv.fal.de
 Institut f. Tierzucht und Tierverhalten - 31535 Neustadt - Germany
--------------------------------------------------------------------


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

Date: 12 Sep 1997 13:15:15 GMT
From: "Aaron" <aaron@soltec.net>
Subject: Re: Compiling scripts
Message-Id: <01bcbf7d$e8b7ad20$b5910a9f@aurora.cna.com>

I'm actually interested in this as well

along with what a 'dump compiled' script is 

I've heard of such a beast, but don't know where to look for information


Ken Snyder <ksnyde@sapient.com> wrote in article
<3416fe34.13818046@delphi>...
> I would love to discuss compiling PERL (through the alpha-3 Perl-to-C
> compiler) with anyone who has relavent experience.  I have run into
> problems compiling files that are larger than ~= 30k, where the
> compiler can't handle the memory requirements of optimizations.
> Without the optimizations the scripts do not offer any real
> performance advantage (and are MUCH slower than a "dump-compiled"
> script).
> 
> Also interested in if anyone has any performance characteristics of
> Perl statically compiled versus shared libraries.



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

Date: Fri, 12 Sep 1997 12:07:38 GMT
From: zawodny@hou.moc.com (Jeremy D. Zawodny)
Subject: Re: Declaring dynamically named lexical variables
Message-Id: <341d303c.86242420@igate.hst.moc.com>

[cc'd automagically to original author]

On Fri, 12 Sep 1997 08:03:34 GMT, dan@gulch.demon.co.uk (Dan Sumption)
wrote:

>Can someone tell me how I would declare a lexical variable whose name
>is determined by another variable. I had thought that placing a
>variable name inside a block would return a variable whose name was
>the product of the block, e.g.
>	$varname1 = 'foo';
>	$varname2 = 'bar';
>	 my ${$varname1} = ${$varname2};
>would be the equivalent of saying:
>	my $foo = $bar;
>
>However, it seems I was wrong, and that this produces a reference,
>generating the error 'Can't declare scalar deref in my'
>
>Can someone tell me how I would declare the my variables correctly?

I believe there were examples of how to do this in the old Camel book,
using eval. I'd check the section on eval(). It may or may not appear
in the new book (don't have a copy handy).

In any case, what's wrong with a reference? :-)

Jeremy
-- 
Jeremy Zawodny
Internet Technology Group
Information Technology Services
Marathon Oil Company, Findlay Ohio

http://www.marathon.com/

Unless explicitly stated, these are my opinions only--not those of my employer.


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

Date: Fri, 12 Sep 1997 12:00:37 GMT
From: zawodny@hou.moc.com (Jeremy D. Zawodny)
Subject: Re: Detecting NFS outage while <>
Message-Id: <341a2e9c.85826091@igate.hst.moc.com>

[cc'd automagically to original author]

On Fri, 12 Sep 1997 01:31:20 GMT, bks@netcom.com (Bradley K. Sherman)
wrote:

>If I am reading a file from an NFS mounted disk and
>the plug is pulled on the remote machine, can I tell
>the difference between this error condition and EOF?
>
>More generally will $! be set in a way that allows
>me to distinguish between EOF and an error like
>ferror() & feof() in C?

Hmm... I dunno.

You could always try it and see. :-)

Seriously, though, even if those methods don't work, you should be
able to check (after the file has become closed/inaccessible) and see
if it exists. If it no longer exists, it was either removed, or the
server died.

I'm sure there is a better approach, though...

Jeremy
-- 
Jeremy Zawodny
Internet Technology Group
Information Technology Services
Marathon Oil Company, Findlay Ohio

http://www.marathon.com/

Unless explicitly stated, these are my opinions only--not those of my employer.


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

Date: 12 Sep 1997 10:38:15 -0400
From: Douglas McNaught <doug@tc.net>
Subject: Re: Detecting NFS outage while <>
Message-Id: <m2wwkmlhrc.fsf@ono.tc.net>

zawodny@hou.moc.com (Jeremy D. Zawodny) writes:

> On Fri, 12 Sep 1997 01:31:20 GMT, bks@netcom.com (Bradley K. Sherman)
> wrote:
> 
> >If I am reading a file from an NFS mounted disk and
> >the plug is pulled on the remote machine, can I tell
> >the difference between this error condition and EOF?
> >
> >More generally will $! be set in a way that allows
> >me to distinguish between EOF and an error like
> >ferror() & feof() in C?
> 
> Hmm... I dunno.
> 
> You could always try it and see. :-)
> 
> Seriously, though, even if those methods don't work, you should be
> able to check (after the file has become closed/inaccessible) and see
> if it exists. If it no longer exists, it was either removed, or the
> server died.

This really depends on how the NFS filesystem is mounted.  There are
two ways to do it: 'soft' and 'hard'.  A soft mount will eventually
time out and give you an error if the server is down.  A hard mount
will keep retrying until the server comes back up.  If you supply the
'intr' option to a hard mount, you can interrupt the i/o operation by
sending the process a signal (I usually do my mounts with
'hard,intr'). 

So, ask your sysadmin or look at /etc/v?fstab on your system.

-Doug
-- 
sub g{my$i=index$t,$_[0];($i%5,int$i/5)}sub h{substr$t,5*$_[1]+$_[0],1}sub n{(
$_[0]+4)%5}$t='encryptabdfghjklmoqsuvwxz';$c='fxmdwbcmagnyubnyquohyhny';while(
$c=~s/(.)(.)//){($w,$x)=g$1;($y,$z)=g$2;$w==$y&&($p.=h($w,n$x).h($y,n$z))or$x==
$z&&($p.=h(n$w,$x).h(n$y,$z))or($p.=h($y,$x).h($w,$z))}$p=~y/x/ /;print$p,"\n";


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

Date: Fri, 12 Sep 1997 11:58:42 GMT
From: zawodny@hou.moc.com (Jeremy D. Zawodny)
Subject: Re: Editor in perl
Message-Id: <34192dfb.85665149@igate.hst.moc.com>


[cc'd automagically to original author]

On 12 Sep 1997 00:37:39 GMT, t95129ku@sfc.keio.ac.jp (o-su ken'ichi )
wrote:

>I'm thinking about how to code the editor in perl, like Unix's emacs 
>or Machintosh's simpletext, or Windows' wordpad.  
>The editor which I wanna build is a simple one, 
>just having the basic edit operation will do.
>Is there any usable modules or example source codes? 
>Please give me information..................

Hm... Well, I'm not sure why you'd do it, but that's hardly the point.

Have a look around CPAN for curses-related modules. They'll help you
with full-screen manipulation, text positioning and such. That will be
one of your bigger challenges, I imagine.

Then again, who am I to talk. I once was assigned the task of writing
a line editor in 68000 assembler on a Macintosh SE. Yikes. :-)

Jeremy
-- 
Jeremy Zawodny
Internet Technology Group
Information Technology Services
Marathon Oil Company, Findlay Ohio

http://www.marathon.com/

Unless explicitly stated, these are my opinions only--not those of my employer.


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

Date: Fri, 12 Sep 1997 10:00:52 -0400
From: Leo Kerner <kerner@nortel.ca>
Subject: help request
Message-Id: <34194B14.41C67EA6@nortel.ca>

This is a newcomer to perl.

Can anybody explain the first lines in page 95 of Randal Schwartz's
"Learning Perl"? It says that asfer a successful pattern match 
$1, $2,... are set to \1, \2,... I don't see an explanation as to what
\1, \2,... are.

Cheers, 

Leo


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

Date: 12 Sep 1997 14:27:21 GMT
From: mike@stok.co.uk (Mike Stok)
Subject: Re: help request
Message-Id: <5vbjg9$6rg@news-central.tiac.net>

In article <34194B14.41C67EA6@nortel.ca>, Leo Kerner  <kerner@nortel.ca> wrote:
>This is a newcomer to perl.
>
>Can anybody explain the first lines in page 95 of Randal Schwartz's
>"Learning Perl"? It says that asfer a successful pattern match 
>$1, $2,... are set to \1, \2,... I don't see an explanation as to what
>\1, \2,... are.

While a regular expression is being evaluated it's possible to remember
things and use them as backreferences (using parentheses) and these are
referenced using \1, \2 etc in the regex.  For example

 /^(foo|bar)to\1$/

will match footofoo and bartobar but not footobar.  If the regex is
successful then \1 gets put into $1, \2 into $2 etc.

That means that you can say things like:

  if (/^(foo|bar)to\1$/) {
    print "matches a $1 string!\n";
  }

Note that uisng $1 abd $2 in a reges is most likely a mistake as they will
not be set to what you thin until after the regex has succeeded - in
particular the regex undergoes a double quote-ish interpolation before
it's used so if $1 and $2 are use in place of \1 and \2 then they will be
interpolated to their values before the regex is executed.

Hope this helps,

Mike

-- 
mike@stok.co.uk                    |           The "`Stok' disclaimers" apply.
http://www.stok.co.uk/~mike/       |   PGP fingerprint FE 56 4D 7D 42 1A 4A 9C
http://www.tiac.net/users/stok/    |                   65 F3 3F 1D 27 22 B7 41
stok@psa.pencom.com                |      Pencom Systems Administration (work)


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

Date: 12 Sep 1997 13:28:58 GMT
From: "Aaron" <aaron@soltec.net>
Subject: Re: how access netscape' s dbm file?
Message-Id: <01bcbf7f$d318c920$b5910a9f@aurora.cna.com>

Hey

We're doing the same thing with one of netscapes db files

except we are using the tools that netscape provided (shuser, etc)

I'm wondering if the Sun Berkley DB you suggest would mean that we could
bypass that and not have to shell out.

What we have right now are forms that access those commands and we get all
the functionality we want, but we have to shell out to do it.

It works, but I'm always looking for another way to do something.


> 
> You probably have the wrong version of Berkeley DB. On my Sun Berkeley
> DB 1.85 is needed to access Netscape files.
> 
> Paul
> 


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

Date: 12 Sep 1997 13:20:44 GMT
From: "Aaron" <aaron@soltec.net>
Subject: Re: How to email text file
Message-Id: <01bcbf7e$ad143b20$b5910a9f@aurora.cna.com>

I'm curious about this Mail::Send package

does it have facilities for including files as attachments?  

Don't get me wrong, I'm going to RTFM myself, but I was wondering if you
find the performance of this better than the ways they mentioned in the
earlier posts (I do it the way those other posts recommended).


> I prefer using Mail::Send and letting it muck around with all the
> pipes for me.  It checks 3 or 4 standard mail configurations and
> uses whatever it can find (sendmail, mailx, etc).  It's OO,
> easy to use, and has been working reliably for me.  Get a copy
> from CPAN and read the man page for it.  Took me about 5 minutes
> to download, install, grok and write my first use for it.



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

Date: Fri, 12 Sep 1997 12:04:34 GMT
From: zawodny@hou.moc.com (Jeremy D. Zawodny)
Subject: Re: Illegal character \015 (carriage returns) -- HELP
Message-Id: <341c2f9f.86085724@igate.hst.moc.com>

[cc'd automagically to original author]

On Thu, 11 Sep 1997 22:51:44 -0600, Randal Pittelli
<pittelli@ehsct7.envmed.rochester.edu> wrote:

>1) How do I actually strip the carriage returns in all of those scripts?
>Even a manual {:-< edit with PICO (sp?) doesn't catch those hidden
>critters. Or is there a way to PREVENT the occurrence BEFORE file
>transfer (development and transfer using Win95/WS-FTP)?

perl -pi.bak -e "s/\r//g;" *.pl

>2) Why is this only a problem now? I've installed several hundred scripts
>on all sorts of Unix servers w/all versions of Perl, but have gotten two
>of this particular report (another 5.004 Unix machine), only in the past
>week. Is this something particular to 5.004?! Why did they work before?

It may be. I'd check the upgrade docs and see if it is documented
anywhere...

Jeremy
-- 
Jeremy Zawodny
Internet Technology Group
Information Technology Services
Marathon Oil Company, Findlay Ohio

http://www.marathon.com/

Unless explicitly stated, these are my opinions only--not those of my employer.


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

Date: Fri, 12 Sep 1997 12:38:26 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: Illegal character \015 (carriage returns) -- HELP
Message-Id: <EGEB43.JFo@world.std.com>

Randal Pittelli <pittelli@ehsct7.envmed.rochester.edu> writes:

>1) How do I actually strip the carriage returns in all of those scripts?
>Even a manual {:-< edit with PICO (sp?) doesn't catch those hidden
>critters. Or is there a way to PREVENT the occurrence BEFORE file
>transfer (development and transfer using Win95/WS-FTP)?

To fix files now, you can do something like 
"perl -i.bak -pe 's/\r//g'.  To prevent it from happening, if you are
FTPing files between machines, transfer them in "text" not "binary"
mode.

>2) Why is this only a problem now? I've installed several hundred scripts
>on all sorts of Unix servers w/all versions of Perl, but have gotten two
>of this particular report (another 5.004 Unix machine), only in the past
>week. Is this something particular to 5.004?! Why did they work before?

It was an error that wasn't checked for before. There are many times
where the carriage returns cause no problems at all. Perl considers it
whitespace and doesn't care how many characters of whitespace are
between each statement. (since it treats the semicolon as the
statement terminator) There are some cases (here-docs) where extra
whitespace absolutely can't occur, and places like multiline quoted
strings or formats where unintended whitespace will propagate to your
programs output.
-- 
Andrew Langmead


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

Date: Fri, 12 Sep 1997 07:24:42 -0500
From: tadmc@flash.net (Tad McClellan)
Subject: Re: Illegal character \015 (carriage returns) -- HELP
Message-Id: <aacbv5.cs.ln@localhost>


Randal Pittelli (pittelli@ehsct7.envmed.rochester.edu) wrote:

: With perl -c in a shell, all the cgi scripts on a client's Unix Apache
: server, JUST upgraded to Perl 5.004_01, return:

: "Illegal character \015 (carriage return) at ...
: (maybe you didn't strip carriage returns after a network transfer)"

:  ...when they ALL worked in 5.002.

: I undertand the error, read the FAQ on \n versus \r and different
: platforms, BUT:

: 1) How do I actually strip the carriage returns in all of those scripts?


   perl -p -i -e 's/\r//g' filenames...


Or, if you want to CYA:

   perl -p -i.bak -e 's/\r//g' filenames...


: Even a manual {:-< edit with PICO (sp?) doesn't catch those hidden
: critters. Or is there a way to PREVENT the occurrence BEFORE file
: transfer (development and transfer using Win95/WS-FTP)?

How about DURING file transfer ;-)

ftp will convert line endings if you do the transfer in ASCII mode
rather than binary mode.


: 2) Why is this only a problem now? I've installed several hundred scripts
: on all sorts of Unix servers w/all versions of Perl, but have gotten two
: of this particular report (another 5.004 Unix machine), only in the past
: week. Is this something particular to 5.004?! Why did they work before?


When wondering about the differences in perl versions, you should consult
the man page that covers the differences in perl versions  ;-)


from perldelta:

--------------------------
=head1 New Diagnostics

Several new conditions will trigger warnings that were
silent before.  Some only affect certain platforms.


 ...


=item Illegal character %s (carriage return)

(F) A carriage return character was found in the input.  This is an
error, and not a warning, because carriage return characters can break
multi-line strings, including here documents (e.g., C<print E<lt>E<lt>EOF;>).
--------------------------


Maybe it worked in previous versions because the CRs just didn't happen
to fall in one of the places where it matters.

You were just lucky ;-)


--
    Tad McClellan                          SGML Consulting
    tadmc@flash.net                        Perl programming
    Fort Worth, Texas


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

Date: Fri, 12 Sep 1997 09:42:51 -0400
From: Joseph Fridy <fridy_jm@atc.alcoa.com>
Subject: Install problems on a HP/Convex Exemplar multi-processor...
Message-Id: <341946DB.2ECA@atc.alcoa.com>

I am trying to install Perl-5.00401 on an HP/Convex 
Exemplar.  I can get Perl to build but the 
resulting Perl fails 8 or 9 tests, including bop 
and open and readdir, and harness doesn't work and 
in general things are not happy.  The compiler is 
Convex CC version 6.5, the operating system is 
HPUX 9.03.  I ran Configure using the hpux hints, 
but avoiding shared libraries (not supported by the 
compiler), and dynamic loading (for simplicity's 
sake), and turning off optimization, and using the 
-DHIDEMYMALLOC and -DCRIPPLED_CC switches.  Does 
anyone have a config.sh for this type of system, or 
advice about how to answer Configure's questions?

thanks,

joe fridy

aka

joseph.fridy@alcoa.com


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

Date: Fri, 12 Sep 1997 10:31:58 -0400
From: "Raymond K. Bush" <rbush@up.net>
Subject: is there a better way to do this subroutine?
Message-Id: <3419525E.4429@up.net>

I'd like the following subroutine to be more efficient ... any ideas?

sub SPL{
        local(*p,*plog)=@_; 
        #@nplog=@plog;  
        #print @p;
        #print @plog;
        foreach $user(@p){
                $report="";
                ($u,@junk)=split(/\:/, $user);
                #print "$u\n";
                #@plog=@nplog;
                foreach $ple(@plog){
                        if ($ple =~ " $u "){
 
#                               print ",$ple,\n";
# 
#example line:  Sep 3 15:44:08 dd43 popper[24571]: Stats: mick 0 0 0 0
# 
                                if ($report ne ""){
                                        $report="$report|$ple";
                                }else{ 
                                        $report="$ple";
                                } 
                        } 
                        #else{ 
                        #       push(@nplog);
                        #} 
                } 
        if ($report eq ""){ 
                $report="$u nmct"; 
        } 
        #print ",$report,\n"; 
        push (@report,$report); 
        } 
        return(@report); 
}

--Ray
 .70~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~07.
      --- reply to rbush - at - up - dot - net ---
--- please include indication of past correspondence ---
      --- in order to receive a faster response ---


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

Date: 12 Sep 1997 13:20:51 +0200
From: robert@ICK.il.fontys.nl (robert)
Subject: Re: Loading modules or subroutines at execution
Message-Id: <5vb8ij$17e@bsd1.hqehv-internal.ilse.net>

[posted and mailed]

Lorna McLaughlin <L_McLaughlin@fccc.edu>:
 >Is there  a way to not load a module or subroutine within a module until
 >it is actually needed?  This would reduce compile time.  Or, is there
 >anyway to use an if statement to selectively "require" a module only
 >when needed?

You might want to check out the 'do' function.

                                                                    robert


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

Date: Thu, 11 Sep 1997 00:25:29 -0700
From: "Michael J. Suddes <michael_suddes@" <"NO SPAM>eee.org">
To: Ann Harste <aharste@mcgraw-hill.com>
Subject: Re: Macperl:  Selena Sol's Groupware Calendar
Message-Id: <5v86la$1v84@news.eee.org>

Ann Harste wrote:

> 
> I'm sorry, I was not able to open ./Library/cgi-lib.pl.  Would you
> please check to make sure that you gave me a valid filename and that the
> permissions on  are set to allow me access?
> 

the cgi-lib.pl library isn't installed. E-mail me a copy of the script, 
and I can show you how to bypass it.

Mike

-- 
---------------------------------------
Webmaster - http://www.1-888-Javanow.com
Visit the site, tell us what you think.
-------
The sender of any unsolicited email sent to this address agrees to pay 
$500/email for proofreading services.


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

Date: 12 Sep 97 13:59:20 +0100
From: pmoreau@cenaath.cena.dgac.fr (Patrick MOREAU, CENA Athis, Tel: 01.69.57.64.40)
Subject: Re: PERL 5 for Alpha OpenVMS
Message-Id: <1997Sep12.135920.1@sable>

In article <3417E46C.5709@riag.com>, Daniel Mills <dmills@riag.com> writes:
> Does anyone know where I can get a reliable port for this OS?
> 
> -- TIA - Dan. 
> 

Perl 5.003 work great under OpenVMS VAX and Alpha. You can find sources and
binaries at my site:

  http://www2.cenaath.cena.dgac.fr/ftp/vms/perl5003_axp_exe_v62.zip
  http://www2.cenaath.cena.dgac.fr/ftp/vms/perl5003_vax_exe_v552.zip
  http://www2.cenaath.cena.dgac.fr/ftp/vms/perl5_003.zip

also available via ftp at url

  ftp://ada.cenaath.cena.dgac.fr/vms/

Patrick
-- 
===============================================================================
pmoreau@cena.dgac.fr  (CENA)     ______      ___   _           (Patrick MOREAU)
moreau_p@decus.decus.fr(DECUS)  / /   /     / /|  /|
CENA/Athis-Mons FRANCE         / /___/     / / | / |   __   __   __   __  
BP 205                        / /         / /  |/  |  |  | |__| |__  |__| |  |
94542 ORLY AEROGARE CEDEX    / /   ::    / /       |  |__| | \  |__  |  | |__|
Web Page: http://www2.cenaath.cena.dgac.fr/~pmoreau/
===============================================================================


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

Date: Fri, 12 Sep 1997 09:21:43 -0600
From: mpeppler@mbay.net
To: navi@sci.ccny.cuny.edu
Subject: Re: Perl Lib Path with Sybase Libraris
Message-Id: <874073815.3642@dejanews.com>

In article <EGDIo6.66y@scisun.sci.ccny.cuny.edu>,
  navi@sci.ccny.cuny.edu (Navishtha Sirisena) wrote:
>
>
> Hello,
> I have installed perl5.003 with sybperl extensions ( sybperl2.7 ). I have

Sybase Libraris ( OpenClient 10.004) Installed. However, when I use
sypberl routins, perl cannot find the sybase libraris since it is not
inthe path. I have precompiled perl for Solaris2.5.1. How can I set up
perl , so it can use the sybase libs? I cannot use $export
LD_LIBRARY_PATH since these are cgi's. If I set LD_LIBRARY_PATH to the
location of sybase libs the scripts work. Any help will begreately
appreciated.

Normally, when you build sybperl on Solaris the path to the libraries is
coded into the .so files, so LD_LIBRARY_PATH is not needed. In your case
I suspect that the libraries have been moved after sybperl was built.

You can either rebuild sybperl with the current location of the libraries,
or use a shell wrapper around your CGI scripts that sets LD_LIBRARY_PATH
before executing the real script.

Michael

-------------------==== Posted via Deja News ====-----------------------
      http://www.dejanews.com/     Search, Read, Post to Usenet


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

Date: 12 Sep 1997 14:54:07 GMT
From: l42452@alfa.ist.utl.pt (The Flash)
Subject: Reading Binary Files
Message-Id: <5vbl2f$adq$1@ci.ist.utl.pt>

Hello All !

	I would like to know how can I read information from a binary file.
I am making a substitute for finger using perl and I need to know how can I
access the information on the wtmp and utmp files in a UNIX system.

	If anybody could help me I would be very gratefull.
	
	I prefer answers by e-mail.


	Thanks !

Jorge Tavares
the.flash@bigfoot.com


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

Date: Fri, 12 Sep 1997 11:17:33 +0100 (BST)
From: Joshua@no.spam.leeds.ac.uk
Subject: Re: Trivial(?) readdir question
Message-Id: <341986C1.7A90@no.spam>

>>>Given that readdir reads the directory sequentially, I'd say that they
>>>will always be the first two entries returned and always in that order.

>>That isn't defined.   So only a masochist would assume it.

>True enough, in a sense. When I first started playing around with ...

The first problem is that these directories are OS specific. They are
found under DOS and unix, but not on the Mac.

Given that they may NOT be present under unix, assumptions based on 
their presence would seem unwise.

Ben.


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

Date: Fri, 12 Sep 1997 12:02:41 GMT
From: zawodny@hou.moc.com (Jeremy D. Zawodny)
Subject: Re: unpack and install Perl
Message-Id: <341b2f2a.85967965@igate.hst.moc.com>

[cc'd automagically to original author]

On Thu, 11 Sep 1997 19:45:35 -0700, Larry Nguyen
<Larry_P_Nguyen@qmail2.sp.trw.com> wrote:

>What format is the perl's code (ie. latest.tar.gz) packed in?
>How do I unpack it?

Well, since there is a .gz extension, you need gzip/gunzip to
uncompress it. See ftp://prep.ai.mit.edu/ for a copy. Once you've done
that, you simply need to untar it using your system's tar program.

Jeremy
-- 
Jeremy Zawodny
Internet Technology Group
Information Technology Services
Marathon Oil Company, Findlay Ohio

http://www.marathon.com/

Unless explicitly stated, these are my opinions only--not those of my employer.


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

Date: Fri, 12 Sep 1997 14:25:38 GMT
From: warrenb@pop.kenan.com (Warren Brown)
Subject: Where is the Exception.pm module?
Message-Id: <34194c5e.1529738031@news.kenan.com>

As mentioned in the new "Advanced Perl Programming" book, there is or
will be made available a new module called Exception.pm.  What is the
latest about this quasi-announcement?

warren.


Warren Brown
Quality Process Engineer
Kenan System Corporation - Cambridge MA


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

Date: 12 Sep 1997 08:53:32 GMT
From: tom@mitra.phys.uit.no (Tom Grydeland)
Subject: Re: Why don't my <<HERE documents work?  Attempt #2!
Message-Id: <slrn61i0oc.ap9.tom@mitra.phys.uit.no>

On 12 Sep 1997 08:28:55 +0200,
Ronald Fischer <rovf@earthling.net> wrote:

> Try this:
> 
> print <<EOF;
> This is a test!
> EOF;       # <------ !!!!!
> exit;

Rubbish.  There should absolutely not be a semicolon on the marked line.
This does *not* work

> or this:
> 
> print <<EOF
> This is a test!
> EOF
> ;       # <------ !!!!!
> exit;

This will work, but it is strange.

The semicolon following EOF in the first case is *not* part of the
delimiter.  Remember, Here-documents are just a peculiar way of quoting,
placing the actual string out of the way.

You can do this:

print(<<END_A, <<END_B);	# Prints "Hello,\nworld!\n\n"
Hello, 
END_A
world!

END_B


And even this:

if (<<'STRING' =~ /ab*a*b/) {print "Yes"}	# Prints "Yes"
abba
STRING


> Ronald Fischer (rovf@Earthling.net) (PGP public key available)

-- 
//Tom Grydeland <Tom.Grydeland@phys.uit.no>


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

Date: Fri, 12 Sep 1997 09:50:37 -0500
From: Aaron D Newman <newman@ttd.teradyne.com>
Subject: win32 - piping from a command
Message-Id: <341956BC.4E01@ttd.teradyne.com>

Is there a standard way under windows95 to do this:

open(IN,"\\gnu\\bin\\ls.exe|"); 
while(<IN>) {
    print "ls:";
}

This doesn't work under the ActiveWare version, I suppose because there
is no fork().  How are people in the Win32 world handling this?  One
hoaky way is to output to a file, and read in the file.  But this is,
well, hoaky. 

BTW does anybody know how close cygnus' CDK is to compiling UNIX Perl? 
Then we'd have fork.  Cool beans.

Thanks,
Aaron
-- 
---------------------------------------------------------------------
|  newman@ttd.teradyne.com           | "A forest is a finite         |
|                                    | (possibly empty) set of       |
|http://www.cirrusnet.com/~newman    | trees." - Baase               |
---------------------------------------------------------------------


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

Date: Fri, 12 Sep 1997 14:16:46 -0200
From: Toni Makela <makela@riksu.hamkk.fi>
Subject: WWW & Password Access
Message-Id: <Pine.SOL.3.91.970912140618.28046A-100000@riksu>


Is it possible to create system that ask validation for every one of my 
HTML-pages when they are accessed! After you have answered to one 
question right, validation is automatic so that you dont have to insert 
your name/pass anymore! Like it is done at allmost every K-18 site! 

   _________________________
 /'                         '\_______________________________________
|  Toni Makela                                                       '\
|  Mustikkamaentie 4            e-mail : makton@sci.fi                 |
|  11710 RIIHIMAKI                       makela@riihimaki.hamkk.fi     |
|  FINLAND                               toni.makela@compost.fipnet.fi |
'\________________________      TEL    : +358-40-5932413               |
                          '\    WWW    : 193.166.86.77/cre/toni.html   |
                            '\________________________________________/'



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

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

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