[8132] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1751 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Jan 28 12:07:19 1998

Date: Wed, 28 Jan 98 09:01:35 -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           Wed, 28 Jan 1998     Volume: 8 Number: 1751

Today's topics:
    Re: Problems installing perl5.004_01 on HPUX10.20 <bjnielsen@fedex.com>
        Question about answering (older) questions in c.l.p.* (Steve Linberg)
    Re: READ THIS FIRST <jdporter@min.net>
        Site map for web site - Perl scripts - help please <GeoffW@wordsmith.demon.co.uk>
        Split <moshea@jen.co.il>
        Strange behaviour of chomp AIX vs. Linux? <see_text_for_email@nospam.please.com>
    Re: Strip Trailing Spaces. How? <dzuy@dazel.com>
    Re: Strip Trailing Spaces. How? <real@earthling.net>
    Re: Survival Of perl (Ronald L. Parker)
    Re: unix command pipes <sja3@columbia.edu>
    Re: Vote/poll/survey Script needed (Patrick)
        Want to determine the subnet networks from a network:su kevinm@crt.com
    Re: why no one ever reply? (brian d foy)
    Re: why no one ever reply? (Gabor)
    Re: Win32:Eventlog does not work (Gurusamy Sarathy)
        Win95 intermittent hang on startup during "use" or "req <dfan@harmonixmusic.com>
        Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: Wed, 28 Jan 1998 09:10:46 -0600
From: Brian <bjnielsen@fedex.com>
Subject: Re: Problems installing perl5.004_01 on HPUX10.20
Message-Id: <34CF4A73.9EBBA331@fedex.com>

Having the same problem except I'm getting a -O.  The -O option is only
available with the C/ANSI C product;
Strange stuff....Brian

Anu Manne contractor for Carl Kiger wrote:

> I Couldnot install perl on HPUX10.20, got following warning messages
> while Making perl(5.004_01) and terminated after failing test 0:
>
> ************************************************************************
>   CCCMD =  cc -DPERL_CORE -c -D_HPUX_SOURCE -Aa -DARG_ZERO_IS_SCRIPT
> -O
> cc: Perl_yylex(): warning 6062: Optdriver: Exceeding compiler resource
> limits in Perl_yylex; some optimizations skipped. Use +Onolimit if
> override desired. (6062)
> cc: Perl_keyword(): warning 6062: Optdriver: Exceeding compiler resource
> limits in Perl_keyword; some optimizations skipped. Use +Onolimit if
> override desired. (6062)
>
> cc: "pp_sys.c", line 800: warning 604: Pointers are not
> assignment-compatible.
> cc: "pp_sys.c", line 800: warning 563: Argument #2 is not the correct
> type.
> cc: "pp_sys.c", line 800: warning 604: Pointers are not
> assignment-compatible.
> cc: "pp_sys.c", line 800: warning 563: Argument #3 is not the correct
> type.
> cc: "pp_sys.c", line 800: warning 604: Pointers are not
> assignment-compatible.
> cc: "pp_sys.c", line 800: warning 563: Argument #4 is not the correct
> type.
>
> /usr/ccs/bin/ld: (Warning) At least one PA 2.0 object file
> (miniperlmain.o) was detected. The linked output may not run on a PA 1.x
> system.
> sh: 2060 Bus error(coredump)
> You may see some irrelevant test failures if you have been unable
> to build lib/Config.pm.
>          cd t && (rm -f perl; /usr/bin/ln -s ../miniperl perl) \
>                 && ./perl TEST base/*.t comp/*.t cmd/*.t io/*.t op/*.t
> pragma/*.t </dev/tty
> base/cond.........ok
> base/if...........ok
> base/lex..........FAILED on test 0
> Failed a basic test--cannot continue.
> *** Error exit code 2 (ignored)
>         ./miniperl configpm tmp
> *** Termination signal 138
>
> Stop.
> ***********************************************************************
>
> Output from running myconfig:
> ->./myconfig
>
> Summary of my perl5 (5.0 patchlevel 4 subversion 1) configuration:
>   Platform:
>     osname=hpux, osvers=10, archname=PA-RISC2.0
>     uname='hp-ux npgch38 b.10.20 a 9000780 2013387633 two-user license '
>     hint=recommended, useposix=true, d_sigaction=define
>     bincompat3=y useperlio=undef d_sfio=undef
>   Compiler:
>     cc='cc', optimize='-O', gccversion=
>     cppflags='-D_HPUX_SOURCE -Aa'
>     ccflags ='-D_HPUX_SOURCE -Aa'
>     stdchar='unsigned char', d_stdstdio=define, usevfork=false
>     voidflags=15, castflags=0, d_casti32=define, d_castneg=define
>     intsize=4, alignbytes=8, usemymalloc=y, randbits=15
>   Linker and Libraries:
>     ld='ld', ldflags =' -L/usr/local/lib'
>     libpth=/usr/local/lib /lib/pa1.1 /lib /usr/lib /usr/ccs/lib
>     libs=-lnet -lnsl_s -lndbm -ldld -lm -lc -lndir -lcrypt
>     libc=/lib/libc.sl, so=sl
>     useshrplib=false, libperl=libperl.a
>   Dynamic Linking:
>     dlsrc=dl_hpux.xs, dlext=sl, d_dlsymun=undef, ccdlflags='-Wl,-E
> -Wl,-B,deferred '
>     cccdlflags='+z', lddlflags='-b -L/usr/local/lib'
>
> ->printenv | egrep 'PERL|LC|LANG'
> LANG=C
>
> Any help would be greatly appreciated.
> Thanks,
> Anu





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

Date: Wed, 28 Jan 1998 11:10:40 -0500
From: linberg@literacy.upenn.edu (Steve Linberg)
Subject: Question about answering (older) questions in c.l.p.*
Message-Id: <linberg-2801981110400001@projdirc.literacy.upenn.edu>

Kind people,

This newsgroup is a source of great delight and continuous learning for
me.  Whenever I have a question that I can't find the answer to on deja
news, I come here, try to answer a few myself, and post mine.  It seems to
work!

Occasionally, though, I have a question I can't find an answer to
anywhere, and I have to crack it the old-fashioned way - by hammering on
it and experimenting.  Sometimes I get one.

Last night, for example, I was mucking about with the Win32::ODBC module
and trying to figure out how to use a certian call ("ColAttributes", to be
precise.)  I couldn't get it, and a deja news search showed seven or eight
people had asked the same questions over the last year and never gotten
any (public) answers.  Well, from reading their questions, checking the
module source, and a fair amount of experimenting, I eventually figured
out how to use it.  Hurrah!

It occurred to me, however, that there is not a clear avenue to sharing
this information.  I'm sure other people will have this problem down the
road -- maybe people have it right now and are just giving up after their
dejanews searches yield no answers.  I could post a general announcement
in one of the groups, but that would strike me as clutter.  Why answer a
question no-one's asking?  On the other hand, it would be nice if there
were some kind of central repository for people to leave tidbits that are
certain to be needed by someone someday.

Is there a good method for sharing information bound to be a FAQ someday
without adding to the general noise?

-- 

*********************************************************************
Steve Linberg                                     
Systems Programmer and Technology Specialist   (general) 215-898-2100
National Center on Adult Literacy             (tech lab) 215 898-0668
Graduate School of Education                       (fax) 215-898-9804
University of Pennsylvania                        
3910 Chestnut Street                       linberg@literacy.upenn.edu
Philadelpia, PA  19104
*********************************************************************


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

Date: Wed, 28 Jan 1998 09:50:45 -0500
From: John Porter <jdporter@min.net>
Subject: Re: READ THIS FIRST
Message-Id: <34CF45C5.95E@min.net>

ENROLD wrote:
>     Programmer's Report 1998. For all JAVA, C++, C programmers ONLY.
>     EXCLUSIVE 1998 report by Applications & Programming Cap-Division,
>      NOTE:Not for Eiffel or Ada programmers. For Java, C++, & C
>      programmers only.  Send $1.00:

Damn.  As an ADA programmer, I was thinking this report might be
useful for me. I won't send for it, because I'm afraid they would
check up on me, to make sure I'm a card-carrying C++ programmer.

This also confirms my suspicion that there are in fact only five
programming languages.  (As if C and Java have anything in common
besides curly braces.)

John Porter


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

Date: Wed, 28 Jan 1998 15:25:30 +0000
From: Geoff Wilkins <GeoffW@wordsmith.demon.co.uk>
Subject: Site map for web site - Perl scripts - help please
Message-Id: <ST+duKAq30z0EwSx@wordsmith.demon.co.uk>

I'm (voluntarily) helping a major foreign-aid charity to produce a
detailed site-map showing the structure and links of its sprawling Web
site.

Could anyone advise me where I might find any ready-made Perl scripts
that would assist me in this (or perhaps some other free or cheap
software)?

Suggestions to here or emailed to me at GeoffW@wordsmith.demon.co.uk,
please.
-- 
Geoff Wilkins

34 Farnham Road, Handsworth, Birmingham B21 8EG, UK, 
                telephone: 0121-554 8264


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

Date: Wed, 28 Jan 1998 17:14:26 +0200
From: Moshe Aaron Allen <moshea@jen.co.il>
Subject: Split
Message-Id: <34CF4B52.B2FA28C1@jen.co.il>

Hi,
 I'm need to split() a pararaph after every five words. Can anyone help?

MA



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

Date: Wed, 28 Jan 1998 15:33:13 +0100
From: Wouter Liefting <see_text_for_email@nospam.please.com>
Subject: Strange behaviour of chomp AIX vs. Linux?
Message-Id: <34CF41A9.41C6@nospam.please.com>

Hello all.

I wrote some CGI-scripts in perl which uses chomp to strip off the
trailing newline. But somehow this does not work (correctly) under AIX.
The same script works fine under Linux, but under AIX I have to replace
every chomp with a chop. And that's a little less safe, I guess.

AIX - perl -v says version 5.004_03
Linux - perl -v says version 5.003 with EMBED + suidperl security patch

Any ideas?

Please reply by news. If you prefer email do it to liefting@nl.ibm.com

- Wouter Liefting


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

Date: Wed, 28 Jan 1998 09:05:04 -0600
From: Dzuy Nguyen <dzuy@dazel.com>
To: Tom Lewis <tglewis@mindspring.com>
Subject: Re: Strip Trailing Spaces. How?
Message-Id: <34CF4920.41C67EA6@dazel.com>

Tom Lewis wrote:
> 
> I am new to Perl programming.  All I need to do is strip trailing spaces
> from a string.  I was wondering if there is a easy, predefined way of
> doing it?
> 
> Tom Lewis

Use chop() to chop off trailign charaters:

while (($c = chop($string)) eq " ") {
 ...
}


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

Date: 28 Jan 1998 16:21:27 GMT
From: "Real" <real@earthling.net>
Subject: Re: Strip Trailing Spaces. How?
Message-Id: <01bd2c08$c72fc8c0$822c57c0@pc0130.pica.nl>

Tom Lewis <tglewis@mindspring.com> wrote in article
<34CE094C.49DD2902@mindspring.com>...
> I am new to Perl programming.  All I need to do is strip trailing spaces
> from a string.  I was wondering if there is a easy, predefined way of
> doing it?
> 
> Tom Lewis

I don't know of any predefined way but here's one way of doing it.

print "Line: "; $line = <STDIN>; chomp($line);      # get a string
$line =~ s/ *$//g; print ">$line<\n";               # remove trailing
spaces

 ... and if you want a full trim use;

$line =~ s/^ *| *$//g; print ">$line<\n";           # full trim

In short, s/^ *| *$//g means;
  s       Perl string replace
  ^ *     0 or more spaces from begin of string
  |       and ...
   *$     0 or more spaces at end of string
  g       global replace

Cheers,
Real



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

Date: Wed, 28 Jan 1998 16:19:45 GMT
From: ron@farmworks.com (Ronald L. Parker)
Subject: Re: Survival Of perl
Message-Id: <34cf5839.10828530@10.0.2.33>

On Wed, 28 Jan 1998 00:15:09 -0600, tadmc@flash.net (Tad McClellan)
wrote:

>----------------------------------------------
>In article <1995Nov9.193745.13694@netlabs.com>, lwall@netlabs.com (Larry
>Wall) wrote: ...
>
><Larry>  [snip]  I view a programming language as a place to be
><Larry>  explored, like Disneyland. You don't need to have a lot of preparation
><Larry>  to explore a theme park.  You do have to go along with the crowd
><Larry>  control measures, though.  In a sense, each ride has its own
><Larry>  prerequisites--if you cut in line, you risk getting tossed out of the
><Larry>  park.
><Larry> 
><Larry>  What we have here in this newsgroup is a failure in crowd control.
><Larry>  Reading the FAQ is like staying in line--it's something you should
><Larry>  learn in kindergarten.  Usenet needs a better kindergarten.
>----------------------------------------------

I see this snippet posted a lot, and I happened to run across it in
DejaNews the other day while looking for other Larry Wall witticisms.
It's certainly appropriate for this group, but an important part of
the snippage is this line:

Newsgroups: comp.infosystems.www.authoring.cgi

See, we're not the only ones with this problem.  As Larry said, it's
Usenet that needs a better kindergarten, not just ciwac or clpm.  And
maybe we can help all the people in ciwac by not just sending the "500
Server Error" people there, but sending them to that group's FAQ.
Yes, some of us already do that.  Too many of us don't.



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

Date: Wed, 28 Jan 1998 09:50:37 -0500
From: Sonya Allin <sja3@columbia.edu>
To: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: unix command pipes
Message-Id: <Pine.GSO.3.95L.980128094444.2464A-100000@ciao.cc.columbia.edu>

hey -- your suggestions did help a lot; thank for the info on chop and the
!# directive!  also got the command pipe to work, thankfully....

i'm just learning this stuff for the first time from a C background.
Perhaps, once i learn a touch more, I can return the favor and help you
out with something, too.

yours,

Sonya Allin




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

Date: Thu, 29 Jan 1998 01:21:41 GMT
From: Venice @ euronet.nl (Patrick)
Subject: Re: Vote/poll/survey Script needed
Message-Id: <6anm3l$lc7$1@news.NL.net>

"BozzMon" <bozzmon@bigfoot.com> wrote:

>I need a script that allows people to respond, and then view the current
>results in a graphical form.  I have a couple scripts like this already, but
>they show the stats before you vote, and therefore produce a biased poll.
>Can anyone point me to one so I don't have to re-invent the wheel?

www.fictional.net -> free services.
It's all in development, but the voting stuff works fine.
(it's not graphical (yet))))))





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

Date: Wed, 28 Jan 1998 09:53:03 -0600
From: kevinm@crt.com
Subject: Want to determine the subnet networks from a network:subnet combo.
Message-Id: <886002623.1144782858@dejanews.com>

Need help.  Wanting to get a list of the networks that would be derived
from 10.216 subnetmasked 255.255.240.0.  The subnets that I should get
back will be 10.216.0 and 10.216.16 - 10.216.240 (in increments of 16)
but I don't know how exactly to code this.  I've got h2n and it says
something about bitwise or'ing to do this but I'm really very new at perl
and am not sure what this is all about.  Any help will be greatly
appreciated.  Thanks.

Kevin Martin
kevinm@crt.com

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


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

Date: Wed, 28 Jan 1998 09:19:25 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: why no one ever reply?
Message-Id: <comdog-2801980919250001@news.panix.com>
Keywords: just another new york perl hacker

In article <34CE67DF.68FB@interport.net>, angyny@interport.net posted:

> I've posted several times but never get anyone reply.
> I'm still looking for the unzip tool to install Perl on alpha NT.

why would anyone in a perl newsgroup want to talk about unzip
for NT?  if you have PoB questions, go to a different newsgroup
of read an NT FAQ.  if you have perl questions, rather than questions
in which "perl" appears in the sentence, ask here.

but don't wonder why everyone ignores you when you ask off-charter
questions.

-- 
brian d foy                                 <http://computerdog.com>
upgrade to OSF/1 and use gunzip


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

Date: 28 Jan 1998 16:13:08 GMT
From: gabor@vmunix.com (Gabor)
Subject: Re: why no one ever reply?
Message-Id: <slrn6culvh.3pf.gabor@vnode.vmunix.com>

In comp.lang.perl.misc, angyny@interport.net <angyny@interport.net> wrote :
# I've posted several times but never get anyone reply.
# I'm still looking for the unzip tool to install Perl on alpha NT.

gzip and tar?



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

Date: 28 Jan 1998 16:32:49 GMT
From: gsar@engin.umich.edu (Gurusamy Sarathy)
Subject: Re: Win32:Eventlog does not work
Message-Id: <6anmjh$8br@srvr1.engin.umich.edu>

  [ mailed and posted ]

In article <01bd2be5$2c10de10$df8cc3c2@p01026>,
Leonberger Bausparkasse AG <iob@leonberger.bawue.com> wrote:
>use Win32::Eventlog;
                 ^
That should be   L

>$eventinfo =
>  { 'Key' =>	  '',                                    
>    'Category' => '',                     
>    'EventID' =>  '',                               
>    'Data' =>     '',                      
>    'Strings' =>  '',                
>  };
>
>sub read_it
>  { my $EventLogs;
>    Win32::EventLog::Open($EventLogs, "system", '') || die $!;
>    $EventLogs->Read('EVENTLOG_FORWARDS_READ', 1, \%eventinfo) || die $!;
                      ^                      ^     ^^
     $EventLogs->Read(EVENTLOG_FORWARDS_READ|EVENTLOG_SEEK_READ,
                      1, $eventinfo) || die $!;

>    foreach $key (keys %eventinfo)
                        ^
                        %$eventinfo

>      { print $key, "\n";
>      }
>  }
>read_it;

 - Sarathy.
   gsar@umich.edu



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

Date: 28 Jan 1998 11:30:49 -0500
From: Dan Schmidt <dfan@harmonixmusic.com>
Subject: Win95 intermittent hang on startup during "use" or "require"
Message-Id: <wkvhv4v9vq.fsf@turangalila.harmonixmusic.com>

I am using Gurusamy Sarathy's build of perl for Win32 (5.004_02) on a
Windows 95 system running 4DOS.  (I just checked and running under
command.com makes no difference.)

When I run Perl scripts, around half the time they just hang before
anything happens.  This behavior just started a few weeks ago.  I'm
not sure what I did to cause it.  I have completely reinstalled Perl
and still get the same behavior.

The frequency of hangs seems to be correlated with the number of "use"
statements I have in my script.  (If I don't include any other source
files, it always runs fine.)  And when I run with perl -d, instead of
a hang I get something like this:

  Loading DB routines from perl5db.pl version 1
  Emacs support available.

  Enter h or `h h' for help.

  Signal SEGV at C:\APP\PERL\lib/Exporter.pm line 0
        eval {...} called at C:\APP\PERL\lib/Exporter.pm line 0
        require vars.pm called at C:\APP\PERL\lib/FileHandle.pm line 5
        FileHandle::BEGIN() called at C:\APP\PERL\lib/Exporter.pm line 0
        eval {...} called at C:\APP\PERL\lib/Exporter.pm line 0
        require FileHandle.pm called at mparse.pl line 1
        main::BEGIN() called at C:\APP\PERL\lib/Exporter.pm line 0
        eval {...} called at C:\APP\PERL\lib/Exporter.pm line 0

The actual file it chokes on varies from run to run; here's another one:

  Signal SEGV at C:\APP\PERL\lib/Carp.pm line 0
        require vars.pm called at C:\APP\PERL\lib/FileHandle.pm line 5
        FileHandle::BEGIN() called at C:\APP\PERL\lib/Carp.pm line 0
        eval {...} called at C:\APP\PERL\lib/Carp.pm line 0
        require FileHandle.pm called at mparse.pl line 1
        main::BEGIN() called at C:\APP\PERL\lib/Carp.pm line 0
        eval {...} called at C:\APP\PERL\lib/Carp.pm line 0

I have no idea what could be going on to cause this, and if anybody
has a clue, I'd love to hear it.  I'd be happy to provide more
information; I just don't know what's relevant yet.

-- 
                 Dan Schmidt -> dfan@harmonixmusic.com, dfan@alum.mit.edu
Honest Bob & the                http://www2.thecia.net/users/dfan/
Factory-to-Dealer Incentives -> http://www2.thecia.net/users/dfan/hbob/
          Gamelan Galak Tika -> http://web.mit.edu/galak-tika/www/


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

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

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