[17257] in Perl-Users-Digest
Perl-Users Digest, Issue: 4679 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Oct 20 18:10:35 2000
Date: Fri, 20 Oct 2000 15:10:17 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <972079816-v9-i4679@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Fri, 20 Oct 2000 Volume: 9 Number: 4679
Today's topics:
Re: Perl for PalmOS? <joncdavis@attglobal.net>
Re: Perl for PalmOS? (Tony L. Svanstrom)
Re: Perl for PalmOS? <swhatley@blkbox.com>
POSIX module failing when compiling 5.6 michaeld@brown-cole.com
redirection Location help metamp@my-deja.com
renaming files w/wildcards console unix <vibrato@my-deja.com>
spider script <kevburger@prolynx.com>
Re: spider script (Jerome O'Neil)
SSI and Perl <david.scally@scallynet.co.uk>
Upload binary file problem! <Aleksey.Agagfonov@mtu-net.ru>
Re: Upload binary file problem! <dsimonis@fiderus.com>
very new at perl, need a few examples explained tgerstmar@my-deja.com
Re: what is 'Subroutine NULL'? <tim@ipac.caltech.edu>
Re: Writing multiple files to a particular directory <camerond@mail.uca.edu>
Re: Writing multiple files to a particular directory (Jerome O'Neil)
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 20 Oct 2000 13:57:55 -0500
From: Jon Davis <joncdavis@attglobal.net>
Subject: Re: Perl for PalmOS?
Message-Id: <39F095B3.11B616CC@attglobal.net>
> The answer, I'm sure, will be something like "now how the hell would I get
> Perl to work on that lil thing".
Or why would I want to???
Jon Davis
------------------------------
Date: Fri, 20 Oct 2000 20:39:30 GMT
From: tony@svanstrom.com (Tony L. Svanstrom)
Subject: Re: Perl for PalmOS?
Message-Id: <1eitnx2.dq4m048hg34sN%tony@svanstrom.com>
Jon Davis <joncdavis@attglobal.net> wrote:
> > The answer, I'm sure, will be something like "now how the hell would I get
> > Perl to work on that lil thing".
>
> Or why would I want to???
Don't have me for saying this, but I'd love to run a pure Perl webserver
on my Palm Vx.
/Tony
--
/\___/\ Who would you like to read your messages today? /\___/\
\_@ @_/ Protect your privacy: <http://www.pgpi.com/> \_@ @_/
--oOO-(_)-OOo---------------------------------------------oOO-(_)-OOo--
on the verge of frenzy - i think my mask of sanity is about to slip
---ôôô---ôôô-----------------------------------------------ôôô---ôôô---
\O/ \O/ ©99-00 <http://www.svanstrom.com/?ref=news> \O/ \O/
------------------------------
Date: Fri, 20 Oct 2000 20:49:16 GMT
From: Steven Whatley <swhatley@blkbox.com>
Subject: Re: Perl for PalmOS?
Message-Id: <gd2I5.25927$YX4.945684@news2.giganews.com>
In comp.sys.palmtops.pilot Tony L. Svanstrom <tony@svanstrom.com> wrote:
> Jon Davis <joncdavis@attglobal.net> wrote:
>> Or why would I want to???
> Don't have me for saying this, but I'd love to run a pure Perl webserver
> on my Palm Vx.
It's coming I'm sure. Wouldn't be surprised to see this within two years.
That would be way cool to carry my web server with me? Am I a geek or am
I a geek? :)
Later,
Steven
------------------------------
Date: Fri, 20 Oct 2000 19:39:49 GMT
From: michaeld@brown-cole.com
Subject: POSIX module failing when compiling 5.6
Message-Id: <8sq723$men$1@nnrp1.deja.com>
Hopefully someone will be able to help me with this or point me to some
helpful resources- I'm trying to get perl 5.6 compiled under ncr unix
(mp-ras) and I've had one sticking point. I'm using GCC 2.7, and I get
the listed output when it tries to compile the POSIX module. Here are
the configure options I'm using:
sh Configure -Dcc=/usr/gnu/bin/gcc -Dprefix=/usr/gnu
The build is successful if I add -Duseposix=false to the command line,
but we've got critical scripts that use thata module. I've tried going
through the files indicated by the errors to troubleshoot, but it's a
little over my head.
I can't use glibc under my platform, and I'm not sure how much of a
problem that is.
the POSIX module works under the old version we're using (5.00503), but
that install is otherwise broken and I've been told that I need to
reinstall. I figured this was a good time to upgrade to the latest
version.
I'm more than willing to provide extra information as needed, and RTFM
posts are welcome, as long as the FM in question is indicated.
----------------Compile errors follow-----------------
Making POSIX (dynamic)
Note (probably harmless): No library found for -lposix
Note (probably harmless): No library found for -lcposix
Writing Makefile for POSIX
make[1]: Entering directory `/usr/gnu/src/perl-5.6.0/ext/POSIX'
make[1]: *** Warning: File `Makefile' has modification time in the
future (2000-10-20 10:21:56.150000002 > 2000-10-20 10:21:56)
mkdir ../../lib/auto/POSIX
make[1]: warning: Clock skew detected. Your build may be incomplete.
make[1]: Leaving directory `/usr/gnu/src/perl-5.6.0/ext/POSIX'
make[1]: Entering directory `/usr/gnu/src/perl-5.6.0/ext/POSIX'
cp POSIX.pm ../../lib/POSIX.pm
AutoSplitting ../../lib/POSIX.pm (../../lib/auto/POSIX)
cp POSIX.pod ../../lib/POSIX.pod
../../miniperl -I../../lib -I../../lib ../../lib/ExtUtils/xsubpp -
noprototypes -typemap ../../lib/ExtUtils/typemap -typemap typemap
POSIX.xs > POSIX.
xsc && mv POSIX.xsc POSIX.c
/usr/gnu/bin/gcc -c -I/usr/include -I/usr/ucbinclude -
I/usr/local/include -O -DVERSION=\"1.03\" -DXS_VERSION=\"1.03\" -
fPIC -I../.. POSIX.c
In file included from ../../perl.h:1139,
from POSIX.xs:9:
/usr/include/ieeefp.h:35: warning: `__i386' redefined
*Initialization*:1: warning: this is the location of the previous
definition
POSIX.xs:168: parse error before `*'
POSIX.xs:168: warning: data definition has no type or storage class
POSIX.c: In function `XS_POSIX__SigSet_new':
POSIX.c:2784: `POSIX__SigSet' undeclared (first use this function)
POSIX.c:2784: (Each undeclared identifier is reported only once
POSIX.c:2784: for each function it appears in.)
POSIX.c:2784: parse error before `RETVAL'
POSIX.xs:2777: `RETVAL' undeclared (first use this function)
POSIX.xs:2777: `sigset_t' undeclared (first use this function)
POSIX.xs:2777: parse error before `)'
POSIX.xs:2777: parse error before `)'
POSIX.c: In function `XS_POSIX__SigSet_DESTROY':
POSIX.c:2812: `POSIX__SigSet' undeclared (first use this function)
POSIX.c:2812: parse error before `sigset'
POSIX.c:2816: `sigset' undeclared (first use this function)
POSIX.c: In function `XS_POSIX__SigSet_addset':
POSIX.c:2833: `POSIX__SigSet' undeclared (first use this function)
POSIX.c:2833: parse error before `sigset'
POSIX.c:2839: `sigset' undeclared (first use this function)
POSIX.c: In function `XS_POSIX__SigSet_delset':
POSIX.c:2862: `POSIX__SigSet' undeclared (first use this function)
POSIX.c:2862: parse error before `sigset'
POSIX.c:2868: `sigset' undeclared (first use this function)
POSIX.c: In function `XS_POSIX__SigSet_emptyset':
POSIX.c:2891: `POSIX__SigSet' undeclared (first use this function)
POSIX.c:2891: parse error before `sigset'
POSIX.c:2896: `sigset' undeclared (first use this function)
POSIX.c: In function `XS_POSIX__SigSet_fillset':
POSIX.c:2919: `POSIX__SigSet' undeclared (first use this function)
POSIX.c:2919: parse error before `sigset'
POSIX.c:2924: `sigset' undeclared (first use this function)
POSIX.c: In function `XS_POSIX__SigSet_ismember':
POSIX.c:2947: `POSIX__SigSet' undeclared (first use this function)
POSIX.c:2947: parse error before `sigset'
POSIX.c:2954: `sigset' undeclared (first use this function)
POSIX.xs: In function `XS_POSIX_sigaction':
POSIX.xs:3377: storage size of `act' isn't known
POSIX.xs:3378: storage size of `oact' isn't known
POSIX.xs:3379: `POSIX__SigSet' undeclared (first use this function)
POSIX.xs:3379: parse error before `sigset'
POSIX.xs:3409: `sigset' undeclared (first use this function)
POSIX.xs:3409: `sigset_t' undeclared (first use this function)
POSIX.xs:3409: parse error before `)'
POSIX.xs:3436: parse error before `)'
POSIX.xs:3439: parse error before `)'
POSIX.xs:3439: parse error before `)'
POSIX.c: In function `XS_POSIX_sigpending':
POSIX.c:4284: `POSIX__SigSet' undeclared (first use this function)
POSIX.c:4284: parse error before `sigset'
POSIX.c:4289: `sigset' undeclared (first use this function)
POSIX.c: In function `XS_POSIX_sigprocmask':
POSIX.c:4313: `POSIX__SigSet' undeclared (first use this function)
POSIX.c:4313: parse error before `sigset'
POSIX.c:4319: `sigset' undeclared (first use this function)
POSIX.xs:3466: `oldsigset' undeclared (first use this function)
POSIX.xs:3473: `sigset_t' undeclared (first use this function)
POSIX.xs:3473: parse error before `)'
POSIX.xs:3473: parse error before `)'
POSIX.c: In function `XS_POSIX_sigsuspend':
POSIX.c:4356: `POSIX__SigSet' undeclared (first use this function)
POSIX.c:4356: parse error before `signal_mask'
POSIX.c:4361: `signal_mask' undeclared (first use this function)
make[1]: *** [POSIX.o] Error 1
make[1]: Leaving directory `/usr/gnu/src/perl-5.6.0/ext/POSIX'
make: *** [lib/auto/POSIX/POSIX.so] Error 2--
--------------------------
michaeld_at_brown-cole.com
binky_at_bingo-lan.org
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Fri, 20 Oct 2000 20:38:43 GMT
From: metamp@my-deja.com
Subject: redirection Location help
Message-Id: <8sqagi$pke$1@nnrp1.deja.com>
I want to do redirection
I'm useing the print "Location: http://mysite.com/\n\n";
but I want to redirect to a web page and to a download file
if I do second line Print "Location: http://myfile.zip\n\n"
my first redirect is ignored.
is here any way to do Location target =_blank or _self so I could
redirect to 2 diferent locations
or
system timer would be an alternative but I'm not sure if I can do that
something like this timer set to 10000
on timer {
redirect to file;
timer disable;
}
can anybody help with this
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Fri, 20 Oct 2000 18:13:06 GMT
From: Lance Hoffmeyer <vibrato@my-deja.com>
Subject: renaming files w/wildcards console unix
Message-Id: <8sq1va$hid$1@nnrp1.deja.com>
How can I rename a group of files in linux using Perl? I wish to use
perl from a command line and not in a script. I want to find all files
with - and change to :
> perl -e 'rename *\-* *\:*' possible answer?
There may be an easier way than Perl but I generally use Perl for most
of my console activities. As an aside what are some other available
methods in linux (I know this is not the right group to make this post
on but this is primarily a Perl question and most people will be able to
help me with any other methods)?
Lance
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Fri, 20 Oct 2000 13:17:59 -0600
From: "Kevin Burger" <kevburger@prolynx.com>
Subject: spider script
Message-Id: <39f09bc6.0@nntp.prolynx.com>
Does anyone out there know of a perl script that will allow me to "spider"
another web page and grab the source code from it?
I've got one I've been using but for some reason I can't seem to get it to
work on a certain web page that was built with Cold Fusion. Any ideas?
Kevin Burger
kevburger@prolynx.com
------------------------------
Date: Fri, 20 Oct 2000 19:53:07 GMT
From: jerome@activeindexing.com (Jerome O'Neil)
Subject: Re: spider script
Message-Id: <Do1I5.676$UK.184357@news.uswest.net>
"Kevin Burger" <kevburger@prolynx.com> elucidates:
> Does anyone out there know of a perl script that will allow me to "spider"
> another web page and grab the source code from it?
perl -MLWP::Simple -e 'print get("http://www.yahoo.com")'
HTH!
--
"Civilization rests on two things: the discovery that fermentation
produces alcohol, and the voluntary ability to inhibit defecation.
And I put it to you, where would this splendid civilization be without
both?" --Robertson Davies "The Rebel Angels"
------------------------------
Date: Fri, 20 Oct 2000 22:41:09 +0100
From: "David Scally" <david.scally@scallynet.co.uk>
Subject: SSI and Perl
Message-Id: <8sqeat$eql$1@gxsn.com>
Hi,
Is it possible to create a Server Side Include using a Perl subroutine?
I want to include a global include file (A header that appears all over the
site) that needs to be included on the news database at:
www.mancity.net
Is there any way to do this?
TIA
Scall
------------------------------
Date: Fri, 20 Oct 2000 22:27:06 +0300
From: "Aleksey Agafonov" <Aleksey.Agagfonov@mtu-net.ru>
Subject: Upload binary file problem!
Message-Id: <8sq2rk$1ftk$1@gavrilo.mtu.ru>
Dear sirs!
I have a small problem with binary file upload from html form in web server.
Russian web-server Appach decode my binary file as text. My binary file
uploaded but not right. I read the FAQ but nothing understand. And FAQ
example not work also! Please help me. Send my mail on
Aleksey.Agafonov@mtu-net.ru
Thank you!
------------------------------
Date: Fri, 20 Oct 2000 14:39:23 -0400
From: Drew Simonis <dsimonis@fiderus.com>
Subject: Re: Upload binary file problem!
Message-Id: <39F0915B.644F97BF@fiderus.com>
Aleksey Agafonov wrote:
>
> Dear sirs!
> I have a small problem with binary file upload from html form in web server.
> Russian web-server Appach decode my binary file as text. My binary file
> uploaded but not right. I read the FAQ but nothing understand. And FAQ
> example not work also! Please help me. Send my mail on
> Aleksey.Agafonov@mtu-net.ru
> Thank you!
Have you told the script that the file is binary?
------------------------------
Date: Fri, 20 Oct 2000 21:52:11 GMT
From: tgerstmar@my-deja.com
Subject: very new at perl, need a few examples explained
Message-Id: <8sqeqa$t8e$1@nnrp1.deja.com>
Hey, well Like i said, i am very new at perl, i
have only started learning over the past couple
weeks. Anyways enough chit chat, i was wondering
if anyone could help me out with a few things...
When ever i see examples i always see at the top
of each program the 'Use Strict' module with
no '''s thier, and i was wondering if someone
could tell me what it did.. I was also wondering
what $_ does, becuz i seem to see quite a few
Input values put into the $_ variable. If anyone
could get back to me that would be excellent.
Thank you..
Tynan
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Fri, 20 Oct 2000 11:22:58 -0700
From: Tim Conrow <tim@ipac.caltech.edu>
Subject: Re: what is 'Subroutine NULL'?
Message-Id: <39F08D82.FA73A61@ipac.caltech.edu>
bing-du@tamu.edu wrote:
>
> In article <39EF509A.A0686838@ipac.caltech.edu>,
> tim@ipac.caltech.edu wrote:
> > bing-du@tamu.edu wrote:
> > >
> > > My script gives:
> > >
> > > Prototype mismatch: sub main::NULL vs () at (eval 63) line 1.
> > > Subroutine NULL redefined at (eval 63) line 1.
>
> > I can reproduce your error this way:
> >
> > % perl -we 'eval 1 for(1..62); eval q/sub NULL ($$) { } sub NULL ($$$){};/'
> > Prototype mismatch: sub main::NULL ($$) vs ($$$) at (eval 63) line 1.
> > Subroutine NULL redefined at (eval 63) line 1.
> >
> > But I assume you don't think you have a subroutine named NULL. Are you
> > sure?
>
> I'm 100% sure :).
>
> > None of the modules you use or libraries you require have such a
> > subroutine?
>
> Not sure. I'll grep NULL from those *.pm files corresponding to the
> modules that used by the script to see which module has subroutine NULL.
>
> The script has 1250 lines. ... I just posted 'main' part here.
There's really not enough there to help. I can only take one, gigantic,
arm-flapping, wildass guess.
> use Perlfect::Template;
I can't quickly find source for this, but don't template processing systems
generally need to do evals? Why don't you check and see that you're using this
templating system correctly?
Last suggestion: Learn to use the debugger so you can see where code execution
is when you get the error messages.
--
-- Tim Conrow tim@ipac.caltech.edu |
------------------------------
Date: Fri, 20 Oct 2000 13:19:53 -0500
From: Cameron Dorey <camerond@mail.uca.edu>
Subject: Re: Writing multiple files to a particular directory
Message-Id: <39F08CC9.177FF1A6@mail.uca.edu>
Jerome O'Neil wrote:
>
> Anders Lund <anders@wall.alweb.dk> elucidates:
>
> >> open (FIXEDLOG, '>c:\baalogs\fixeddirectory\$fixed') or die "n\nCan not
> >> open $fixed for write: $!\n\n";
> >>
> >> I can see that the code overwrites each new file created, and I end up
> >> with only the last file processed called $fixed.
> >>
> > To apend to a file, do
> >
> > open HANDLE ">>FILENAME";
>
> >> But how do i ensure that the variable $fixed is recognised in this 'open'
> >> line.
>
> Anders, take a closer look at the quoting used in the call to open().
>
> To the OP, single quotes don't interpolate. Change them to double
> quotes, and I think it will DWYM.
But if they are changed to double quotes, he will have to either double
up on the backslashes or change them to forward slashes.
Cameron
--
Cameron Dorey
Associate Professor of Chemistry
University of Central Arkansas
Phone: 501-450-5938
camerond@mail.uca.edu
------------------------------
Date: Fri, 20 Oct 2000 19:21:55 GMT
From: jerome@activeindexing.com (Jerome O'Neil)
Subject: Re: Writing multiple files to a particular directory
Message-Id: <nX0I5.656$UK.174072@news.uswest.net>
Cameron Dorey <camerond@mail.uca.edu> elucidates:
>> >> open (FIXEDLOG, '>c:\baalogs\fixeddirectory\$fixed') or die "n\nCan not
>> Anders, take a closer look at the quoting used in the call to open().
>>
>> To the OP, single quotes don't interpolate. Change them to double
>> quotes, and I think it will DWYM.
>
> But if they are changed to double quotes, he will have to either double
> up on the backslashes or change them to forward slashes.
Good point. Let me amend my statement to say,
Change them to double quotes, and use forward slash path seperators
(Works in WinPerl). i.e. "c:/baalogs/fixedd..."
I have also found File::Spec is a most handy module for this type
of thing.
Thanks!
--
"Civilization rests on two things: the discovery that fermentation
produces alcohol, and the voluntary ability to inhibit defecation.
And I put it to you, where would this splendid civilization be without
both?" --Robertson Davies "The Rebel Angels"
------------------------------
Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 16 Sep 99)
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: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.
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 V9 Issue 4679
**************************************