[27667] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 9121 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Apr 4 18:05:45 2006

Date: Tue, 4 Apr 2006 15:05:05 -0700 (PDT)
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 Apr 2006     Volume: 10 Number: 9121

Today's topics:
        Catching Apache Errors in Perl <NoSPam@NoSpam.com>
    Re: Help calling perl from gnu make on windows <thundergnat@hotmail.com>
        M-x cperl-indent-region: why error "no comment syntax i (David Combs)
    Re: Regex Question axel@white-eagle.invalid.uk
    Re: Render 3D-Body <corff@zedat.fu-berlin.de>
    Re: Traslation: memmove to perl xhoster@gmail.com
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Tue, 4 Apr 2006 15:59:12 -0400
From: "Daniel Kaplan" <NoSPam@NoSpam.com>
Subject: Catching Apache Errors in Perl
Message-Id: <1144180753.207482@nntp.acecape.com>

Hello All,

I wanted to replace on my server the standard 500 Server error page with my 
own via a Perl script.

What I was curious about was does Perl have a way of accessing those errors? 
I thought it might be @!, at least to start with.  But when I ran a test 
script with the "my" missing, all @! contained was "No such file or 
directory" so am not sure where that's coming from.

If this can be done, which I am sure it can, if some could point me in the 
right direction with a link or such?

Thanks ahead,

Daniel 




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

Date: Tue, 04 Apr 2006 15:20:54 -0400
From: thundergnat <thundergnat@hotmail.com>
Subject: Re: Help calling perl from gnu make on windows
Message-Id: <dIOdnZC4xLKKWq_ZnZ2dnUVZ_sydnZ2d@rcn.net>

Random Task wrote:
> No chance you know how to get the 8.3 name for a path inside perl do you ?
> 


my $dos_path = Win32::GetShortPathName($path);


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

Date: 4 Apr 2006 14:19:56 -0400
From: dkcombs@panix.com (David Combs)
Subject: M-x cperl-indent-region: why error "no comment syntax is defined"?
Message-Id: <e0udcc$jms$1@panix3.panix.com>

(I cross-post this in hope that eg ilya or other guru might see it
sooner.  Plus ANY respondees will see posts from ALL respondees.
   (yes, I know there is a religious-issue about cross-posting :-(  ))


M-x cperl-indent-region: why error "no comment syntax is defined"?

-----   Heading-lines of /.../cvs-emacs--6apr05/lisp/progmodes/cperl-mode.el:

;;; cperl-mode.el --- Perl code editing commands for Emacs

;; Copyright (C) 1985,86,87,91,92,93,94,95,96,97,98,99,2000,03,2004,2005
;;     Free Software Foundation, Inc.

;; Author: Ilya Zakharevich and Bob Olson
;; Maintainer: Ilya Zakharevich <cperl@ilyaz.org>
;; Keywords: languages, Perl

;; This file is part of GNU Emacs.


(I could find no version-number in the file, but
the line-numbers via egrep -n could indicate the version):
---------------- an egrep on 'comment-start':


 ./progmodes/cperl-mode.el:1466:  (make-local-variable 'comment-start)
 ./progmodes/cperl-mode.el:1467:  (setq comment-start "# ")
 ./progmodes/cperl-mode.el:1472:  (make-local-variable 'comment-start-skip)
 ./progmodes/cperl-mode.el:1473:  (setq comment-start-skip "#+ *")

 ./progmodes/cperl-mode.el:1654:  (let ((comment-start "#"))
 ./progmodes/cperl-mode.el:1661:  (let ((comment-start "#"))




---- FWIW (probably nothing), I not-much-later got this error:

File mode specification error: (void-variable mode-require-final-newline)
keyboard-quit: Quit
cperl-mode: Symbol's value as variable is void: mode-require-final-newline [2 times]
Mark set


Thanks,

David




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

Date: Tue, 04 Apr 2006 18:20:41 GMT
From: axel@white-eagle.invalid.uk
Subject: Re: Regex Question
Message-Id: <ZNyYf.47852$wl.36745@text.news.blueyonder.co.uk>

Anno Siegel <anno4000@lublin.zrz.tu-berlin.de> wrote:
> John W. Krahn <krahnj@telus.net> wrote in comp.lang.perl.misc:
>> Mike C# wrote:
>> > Hi I'm new to Perl regex's, and I've been racking my brain for a while now 
>> > on this one.  Any help is appreciated.  Basically, I want to return all 
>> > matches from the beginning of the string to a specific letter.  As an 
>> > example, with the string "Manager" and up to the letter "a", I want to 
>> > return the following sub-groups:
 
>> > M
>> > Man

>> > And for the word "Fishing" and up to the letter "i", I want to return:

>> > F
>> > Fish

> Then again, a regex can be used:
 
>    print substr($str, 0, $-[0]), "\n" while $str =~ /$letter/g;

or...

     print $`, "\n" while $str =~ /$letter/g;
 
Axel



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

Date: 4 Apr 2006 19:07:45 GMT
From: <corff@zedat.fu-berlin.de>
Subject: Re: Render 3D-Body
Message-Id: <49fug1Focsk1U1@uni-berlin.de>

Jonas Huckestein <Jonas.Huckestein@web.de> wrote:

: Which module can you recommend to display that sort of
: "stacked-polygons-body"? I might add, that I would like to be able to turn
: the body and view it from all around. 

: In other words, I have a "model" of something, given by a set of group and
: edges and need to display it in a 3d-environment.

Did you have a look at VRML? Did you search cpan.org for VRML? Some modules
there might do what you need.

Oliver.

-- 
Dr. Oliver Corff              e-mail:    corff@zedat.fu-berlin.de


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

Date: 04 Apr 2006 18:18:32 GMT
From: xhoster@gmail.com
Subject: Re: Traslation: memmove to perl
Message-Id: <20060404142855.542$0h@newsreader.com>

gamo <gamo@telecable.es> wrote:
> I am not sure about how could I translate this:
>
>       if($pos<$SIZE){
>           if($pos<$SIZE-1){
> #             memmove($min+$pos+1, $min+$pos,
>                   ($SIZE-1-$pos)*sizeof(int));
>               splice @min, $pos,
>                   $SIZE-1-$pos, $min[$pos+1..$SIZE-1];
>           }
>           $min[$pos] = $item;
>       }

I think it would be

   splice @min,$pos,0,$item; # replaces middle 5 lines above

But there may be an off-by-one or boundary case in there somewhere.
Try it and see if it does what you want.

Xho

-- 
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service                        $9.95/Month 30GB


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

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

NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice. 

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.

#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 V10 Issue 9121
***************************************


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