[13991] in Perl-Users-Digest
Perl-Users Digest, Issue: 1401 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Nov 16 21:05:36 1999
Date: Tue, 16 Nov 1999 18:05:20 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <942804320-v9-i1401@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Tue, 16 Nov 1999 Volume: 9 Number: 1401
Today's topics:
(5.00503) perlcc cannot find Getopt::Long::GetOptions <sds@goems.com>
access Oracle on NT from Linux/Perl: is that possible? <310064202272#0001@online.de>
Re: access Oracle on NT from Linux/Perl: is that possib (Xuequn Xu)
Re: Can open file with Telnet but not browser <cassell@mail.cor.epa.gov>
Re: CGI cookies and Internet Explorer for the Mac <cassell@mail.cor.epa.gov>
CGI Error... <vedas@ce.mediaone.net>
Re: CGI Error... (Kragen Sitaker)
Re: CGI Programmer Needed in Philadelphia Area <cassell@mail.cor.epa.gov>
chroot() with being root <bmetcalf@nortelnetworks.com>
Re: chroot() with being root (Kragen Sitaker)
Re: chroot() with being root (Abigail)
Re: command line args to "perl" (Yanick Champoux)
Compiling Perl Under MSDOS 6.2 <javanet@dynacap.com>
Re: cron filehandle (Kragen Sitaker)
Re: database processes <cassell@mail.cor.epa.gov>
Re: database processes (Martien Verbruggen)
Date & Time <Zephyre@home.com>
DBD::Oracle <aschmied@earthlink.net>
embedded perl engine in Windowss application <xu@aerovironment.com>
Re: embedded perl engine in Windowss application (Kragen Sitaker)
Re: Fetch Dilbert. <carlj@peak.org>
Re: Fetch Dilbert. perldoc@my-deja.com
Re: Fetch Dilbert. (Matthew Bafford)
Re: Fetch Dilbert. (Abigail)
File::Find on Win32 :-( - getit4.pl (0/1) (John Armsby)
File::Find on Win32 :-( - getit4.pl (1/1) (John Armsby)
Re: File::Find on Win32 :-( - getit4.pl (1/1) (Kragen Sitaker)
globbing problem: getwd: cannot access parent directori naji@xmission.com
Re: globbing problem: getwd: cannot access parent direc (Kragen Sitaker)
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 16 Nov 1999 20:23:18 -0500
From: Sam Steingold <sds@goems.com>
Subject: (5.00503) perlcc cannot find Getopt::Long::GetOptions
Message-Id: <un1sdoqrd.fsf@ksp.com>
I cannot compile properly the perl code which executes fine in
interpreted (== JIT-compiled) mode.
what am I doing wrong?
$ perlcc extract_clean.pl
--------------------------------------------------------------------------------
Compiling extract_clean.pl:
--------------------------------------------------------------------------------
Making C(extract_clean.pl.c) for extract_clean.pl!
/usr/local/bin/perl -I/usr/local/lib/perl5/5.00503/sun4-solaris -I/usr/local/lib/perl5/5.00503 -I/usr/local/lib/perl5/site_perl/5.005/sun4-solaris -I/usr/local/lib/perl5/site_perl/5.005 -I. -MO=CC,-oextract_clean.pl.c extract_clean.pl
extract_clean.pl syntax OK
No definition for sub Getopt::Long::GetOptions
No definition for sub Getopt::Long::GetOptions (unable to autoload)
Use of uninitialized value at /usr/local/lib/perl5/5.00503/sun4-solaris/B/C.pm
line 602 (#1)
(W) An undefined value was used as if it were already defined. It was
interpreted as a "" or a 0, but maybe it was a mistake. To suppress this
warning assign an initial value to your variables.
Use of uninitialized value at /usr/local/lib/perl5/5.00503/sun4-solaris/B/CC.pm
line 284 (#1)
Use of uninitialized value at /usr/local/lib/perl5/5.00503/sun4-solaris/B/CC.pm
line 288 (#1)
Use of uninitialized value at /usr/local/lib/perl5/5.00503/sun4-solaris/B/C.pm
line 816 (#1)
--
Sam Steingold (http://www.podval.org/~sds/)
Micros**t is not the answer. Micros**t is a question, and the answer is Linux,
(http://www.linux.org) the choice of the GNU (http://www.gnu.org) generation.
Parachute for sale, once used, never opened, small stain.
------------------------------
Date: Wed, 17 Nov 1999 00:11:06 +0100
From: bmlam <310064202272#0001@online.de>
Subject: access Oracle on NT from Linux/Perl: is that possible?
Message-Id: <3831E489.C6C1D23F@online.de>
We have an Oracle server running on NT platform and we are considering
installing Apache on a Linux box that will access the Oracle database
when serving web pages. The CGI script would be written in Perl. Does
Perl have a module that enables this kind of remote database access to
Oracle 8.0.4?
Thanks for any hints!
------------------------------
Date: 17 Nov 1999 00:30:10 GMT
From: xux@informa.bio.caltech.edu (Xuequn Xu)
Subject: Re: access Oracle on NT from Linux/Perl: is that possible?
Message-Id: <80ssui$k3f@gap.cco.caltech.edu>
Yes. Try perl module DBI and DBD:Oracle. You also need to install
the oracle client library on the Linux side, and start oracle listener
on the NT server.
Xuequn Xu, Oracle DBA
Caltech, Pasadena, CA
bmlam (310064202272#0001@online.de) wrote:
: We have an Oracle server running on NT platform and we are considering
: installing Apache on a Linux box that will access the Oracle database
: when serving web pages. The CGI script would be written in Perl. Does
: Perl have a module that enables this kind of remote database access to
: Oracle 8.0.4?
: Thanks for any hints!
------------------------------
Date: Tue, 16 Nov 1999 15:31:39 -0800
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Can open file with Telnet but not browser
Message-Id: <3831E95B.D949F7DD@mail.cor.epa.gov>
amonotod wrote:
>
> In article <38309E1A.7564EE23@mail.cor.epa.gov>,
> David Cassell <cassell@mail.cor.epa.gov> wrote:
[snip]
X > I don't know of any webservers which use this directory as
X > the working directory.
> Ahh, whatever, just run the script...
I'm sorry you're taking this personally. I'm not trying to
be difficult. [I *am difficult, I'm just not trying to be :-]
[snip of comments]
>
> No David, it is a _simple_ test, to see if the server works. You don't
> need every switch turned on to run a test script. Nor do we need to
> worry about whether or not our return is printed in proper html. Just
> save the script into your cgi-bin directory and see what you get. If it
> doesn't work as advertised, I will make sure that from now on, when I
> post, I notify you at your personal email so that you may critique what
> I say. Even better, I will send my reply to you first, and if you
> approve, you can post it for me! Work for you?
I'm going to agree with you that you do not need every switch
for your own test scripts. But when you're writing code for
a total newbie - code which will be read by a lot more newbies
who are lurking - you really need to be a stickler.
Look at the sort of code that Larry Rosler posts. Or Jonathan
Stowe. Or Uri Guttman. [Don't look at Abigail's code unless
you're willing to risk cerebral implosions.] They are
always careful to show good form, including checking returns
on open(). I know you've been around here for a while, so I
just wanted to remind you that those of us who choose to answer
questions here end up as unintentional 'role models', with
readers emulating our code. So quick one-offs which you
might use for your own private code are potentially a
problem when given as answers here.
I don't want to write your code for you. But I have confidence
that you can write model code here. Please set a good example.
Be the Brian Wallace of this newsgroup, not the Latrell
Sprewell. ;-)
David, already choking...
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Tue, 16 Nov 1999 15:41:40 -0800
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: CGI cookies and Internet Explorer for the Mac
Message-Id: <3831EBB4.9B50237F@mail.cor.epa.gov>
Kragen Sitaker wrote:
[snip]
> If a newsgroup doesn't fall in a forest and thousands of people are
> there and hear it fall, does it make a noise?
If a tree falls on a mime in a forest, does anyone care?
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Tue, 16 Nov 1999 17:06:18 -0600
From: Matt Sellers <vedas@ce.mediaone.net>
Subject: CGI Error...
Message-Id: <3831E36A.51BF4E90@ce.mediaone.net>
Hi...
I am getting a "500" error.
Here is my problem / diagnosis:
I am gettings this error when I type "./newspro.cgi"
bash: ./newspro.cgi: No such file or directory
when I type "/usr/bin/perl" as I have in the .
"/usr/bin/perl newspro.cgi"
What is happening?
I am running Redhat Linux 6.1 with perl 5.x installed. Please help. When
I goto test a script ex: /path/of/perl <script> it works, but I always
get a 500 error w/ browser.
Thanks, please reply to e-mail.
Matt Sellers
vedas@ce.mediaone.net
------------------------------
Date: Wed, 17 Nov 1999 01:21:57 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: CGI Error...
Message-Id: <VqnY3.19965$YI2.866899@typ11.nn.bcandid.com>
In article <3831E36A.51BF4E90@ce.mediaone.net>,
Matt Sellers <vedas@ce.mediaone.net> wrote:
>I am gettings this error when I type "./newspro.cgi"
>bash: ./newspro.cgi: No such file or directory
Either newspro.cgi doesn't exist, it's not in ., or the #! line doesn't
point to the right place.
> when I type "/usr/bin/perl" as I have in the .
>"/usr/bin/perl newspro.cgi"
Is this supposed to modify the last sentence, or be a sentence of its
own? If the former, I think you are mistaken. If the latter, what
happens when you type that? Either way, what's the .?
>Thanks, please reply to e-mail.
No.
--
<kragen@pobox.com> Kragen Sitaker <http://www.pobox.com/~kragen/>
The Internet stock bubble didn't burst on 1999-11-08. Hurrah!
<URL:http://www.pobox.com/~kragen/bubble.html>
------------------------------
Date: Tue, 16 Nov 1999 15:44:06 -0800
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: CGI Programmer Needed in Philadelphia Area
Message-Id: <3831EC46.9F36D7A5@mail.cor.epa.gov>
job01@gix.com wrote:
>
> We have a full time position open in West Chester, Chester County, PA
>
> A skilled progrmmer with experience in:
>
> Perl 5
> Java/Script
I know Java, but what's that Script language you mention?
> ASP/VB
Ick.
[snip]
> Please e-mail job01@gix.com with resume.
Please post jobs in appropriate newsgroups. The best Perl
programmers won't respect your offer if you don't respect
them.
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Tue, 16 Nov 1999 15:08:10 -0800
From: Brandon Metcalf <bmetcalf@nortelnetworks.com>
Subject: chroot() with being root
Message-Id: <3831E3DA.F21187F2@nortelnetworks.com>
Anyway to chroot() in Perl without being root? Or something that
accomplishes something similar. I would like to be able to do something
like
$filename = $root/path/to/file
without having to use $root everywhere.
Thanks,
Brandon
------------------------------
Date: Wed, 17 Nov 1999 01:24:10 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: chroot() with being root
Message-Id: <_snY3.19979$YI2.867074@typ11.nn.bcandid.com>
In article <3831E3DA.F21187F2@nortelnetworks.com>,
Brandon Metcalf <bmetcalf@nortelnetworks.com> wrote:
>Anyway to chroot() in Perl without being root?
Not in Unix, for security reasons. (chroot() can chroot() you out of a
chroot, and makes setuid programs insecure).
>Or something that accomplishes something similar. I would like to be
>able to do something like
>
>$filename = $root/path/to/file
>
>without having to use $root everywhere.
The simplest way is to chdir to the directory and use path/to/file,
without a leading slash.
A more complicated way would be to write an LD_PRELOADable library that
would intercept all your open(), unlink(), rename(), and other related
calls. Some libraries that do this are on freshmeat.net.
--
<kragen@pobox.com> Kragen Sitaker <http://www.pobox.com/~kragen/>
The Internet stock bubble didn't burst on 1999-11-08. Hurrah!
<URL:http://www.pobox.com/~kragen/bubble.html>
------------------------------
Date: 16 Nov 1999 19:46:39 -0600
From: abigail@delanet.com (Abigail)
Subject: Re: chroot() with being root
Message-Id: <slrn8342ee.cvu.abigail@alexandra.delanet.com>
Brandon Metcalf (bmetcalf@nortelnetworks.com) wrote on MMCCLXVIII
September MCMXCIII in <URL:news:3831E3DA.F21187F2@nortelnetworks.com>:
-- Anyway to chroot() in Perl without being root? Or something that
-- accomplishes something similar. I would like to be able to do something
-- like
--
-- $filename = $root/path/to/file
--
-- without having to use $root everywhere.
So, what's wrong with chdir?
Your really don't want to use chroot for what you want to do. It's
very likely to make it impossible to require any modules or use system
afterwards.
Abigail
--
perl -we '$@="\145\143\150\157\040\042\112\165\163\164\040\141\156\157\164".
"\150\145\162\040\120\145\162\154\040\110\141\143\153\145\162".
"\042\040\076\040\057\144\145\166\057\164\164\171";`$@`'
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: Wed, 17 Nov 1999 00:51:39 GMT
From: yanick1@sympatico.ca (Yanick Champoux)
Subject: Re: command line args to "perl"
Message-Id: <v_mY3.55860$up3.85045@news21.bellglobal.com>
In article <slrn82j44m.s71.tadmc@magna.metronet.com>,
tadmc@metronet.com (Tad McClellan) writes:
> On Tue, 09 Nov 1999 22:44:46, Seshadri Sriperumbudur
> <seshadri9@worldnet.att.net> wrote:
>
>>Where can I find more about all the command line args to "perl"; I mean,
>>
>>shell % perl -p -i -e ....
>
> perldoc perlrun
Without forgetting the deliciously ironic:
perl -h
Joy,
Yanick
--
#! /usr/bin/perl
@comnet = ( '@comnet' ); print $_ = <<NAB;
Email => Yanick@comnet.ca,
Web_Site => http://www.iro.umontreal.ca/~champoux
NAB
s!^.*(.)(..)(.)(..)\@.*!spylqg$2othyqm$3ntrepidqf$1etqwha$4y.!s;
s,y,er,g;$_=join'q',sort split/q/;y:fgmqsw: :;print;
------------------------------
Date: Tue, 16 Nov 1999 16:21:26 -0900
From: Arnaldo Riquelme <javanet@dynacap.com>
Subject: Compiling Perl Under MSDOS 6.2
Message-Id: <38320316.1DCBE979@dynacap.com>
This is a multi-part message in MIME format.
--------------7F926D2BB22069CCB2319F93
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Hi
I'm trying to compile perl(5.005) under MSDOS6.2.
I followed everything in the README.dos text file
and this is how far I've gotten
1. run configur.bat -des
ok
2. run make
everything seems to compile just fine
3. run make test
1 test failed
4 run make install
and this is what I got
patchlevel of perl (05) and patchlevel of config.sh() don't
math
make.exe: ***[install.perl] Error 27.
What am I doing wrong. Did I missed any steps.
How do I manually copy all the *.exe and libs to
the rigth place if make install doesn't work.
I'll apreciate your help or if you can point me to
the rigth direction.
thanks
Arnaldo
--------------7F926D2BB22069CCB2319F93
Content-Type: text/plain; charset=us-ascii;
name="myconfig.out"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="myconfig.out"
Summary of my perl5 (5.0 patchlevel subversion ) configuration:
Platform:
osname=dos, osvers=djgpp, archname=dos-djgpp
uname='ms-dos inter_12 6 22 pc
'
hint=recommended, useposix=undef, d_sigaction=define
usethreads=undef useperlio=undef d_sfio=undef
Compiler:
cc='gcc', optimize='-O2 -malign-loops=2 -malign-jumps=2 -malign-functions=2', gccversion=2.95.1 19990816 (release)
cppflags=''
ccflags =''
stdchar='char', d_stdstdio=undef, usevfork=false
intsize=4, longsize=4, ptrsize=4, doublesize=8
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
alignbytes=4, usemymalloc=n, prototype=define
Linker and Libraries:
ld='ld', ldflags ='-s'
libpth=c:/djgpp/lib
libs=-lm -lc
libc=c:/djgpp/lib/libc.a, so=none, useshrplib=false, libperl=libperl.a
Dynamic Linking:
dlsrc=dl_none.xs, dlext=none, d_dlsymun=undef, ccdlflags=''
cccdlflags='', lddlflags=''
--------------7F926D2BB22069CCB2319F93--
------------------------------
Date: Tue, 16 Nov 1999 23:07:23 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: cron filehandle
Message-Id: <LslY3.19591$YI2.847636@typ11.nn.bcandid.com>
In article <38309F53.5A21F053@mail.cor.epa.gov>,
David Cassell <cassell@mail.cor.epa.gov> wrote:
>cron doesn't run under the same environment as your username.
>Different home directory, different environment, different
>privileges, ...
ITYM 'different current directory', no?
How are privileges different? On a vanilla Unix system where users
typically belong to a single group, and there are no Kerberos or DCE or
AFS or Coda tokens, they should be the same.
--
<kragen@pobox.com> Kragen Sitaker <http://www.pobox.com/~kragen/>
The Internet stock bubble didn't burst on 1999-11-08. Hurrah!
<URL:http://www.pobox.com/~kragen/bubble.html>
------------------------------
Date: Tue, 16 Nov 1999 16:06:43 -0800
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: database processes
Message-Id: <3831F193.DB79BE2@mail.cor.epa.gov>
yugiman@my-deja.com wrote:
>
> Hello,
> I am dealing with cgi that do a backend database tasks. I would like to
> be able to send the user a feedback that the process may take a few
> seconds and that he should wait before he clicks anything... when the
> process is done I would like to be able to update the page. So far, I
> could only show the updated page after the process was done. How can
> I give the user feedback and then the final results?
This is in the FAQ.. but not the Perl FAQ. It is a CGI
question, and is in the CGI Programming FAQ.
[www.webthing.com/tutorials/cgifaq.html]
In Perl, you will want to fork() off the long process, and
disassociate it by closing STDOUT and STDIN so it doesn't
hold everything up. Then the parent can give a notice to
your user while the child runs. But, once the child is done,
you have to have some way of handing the info off...
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Wed, 17 Nov 1999 01:14:33 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: database processes
Message-Id: <ZjnY3.163$dp.5661@nsw.nnrp.telstra.net>
On Tue, 16 Nov 1999 22:07:42 GMT,
yugiman@my-deja.com <yugiman@my-deja.com> wrote:
> Hello,
> I am dealing with cgi that do a backend database tasks. I would like to
> be able to send the user a feedback that the process may take a few
> seconds and that he should wait before he clicks anything... when the
> process is done I would like to be able to update the page. So far, I
> could only show the updated page after the process was done. How can
> I give the user feedback and then the final results?
You may have written your CGI applications in Perl, but that doesn't
mean that this question is related to Perl in any way. Your question
is about how to achieve something for a CGI application, no matter
what the language is.
If your question does not mentione the word Perl, or if you can
rephrase it, replacing Perl with C or any other language name, then
the question is not about Perl.
You should ask this in a group that talks about CGI. Somewhere in
comp.infosystems.www.* there should be one.
Martien
--
Martien Verbruggen |
Interactive Media Division | Failure is not an option. It comes
Commercial Dynamics Pty. Ltd. | bundled with your Microsoft product.
NSW, Australia |
------------------------------
Date: Wed, 17 Nov 1999 01:17:45 GMT
From: "Trevor Barnett" <Zephyre@home.com>
Subject: Date & Time
Message-Id: <ZmnY3.722$lY5.6761@news.rdc1.nj.home.com>
Hello. I need to create a script that catches the date and time of the
SERVER. I think this would be simple but I can't figure out the command to
do it. Could someone help me out?
--
Trevor Barnett
TBarnett@home.com
------------------------------
Date: Wed, 17 Nov 1999 01:31:48 GMT
From: Amy Schmieder <aschmied@earthlink.net>
Subject: DBD::Oracle
Message-Id: <80t0i4$ur8$1@nnrp1.deja.com>
Greetings.
I am having some trouble with stored procedures and DBI. (Using
DBD::Oracle.)
I have the following function in my Oracle database:
---------------------
function perltest
(p_which IN varchar2)
return testtab
is
vReturnTab testtab;
BEGIN
select cast(multiset(select Col1, Col2 from perltesttable
where Col2=p_which) as TestTab) INTO vReturnTab
from dual;
return vReturnTab;
END;
---------------------
I then try to access it with the following piece of perl:
connecting stuff (works fine)
------------------
my $call=q{select * from THE (select cast(perltest('test') as TestTab)
from dual);};
$cursor=$dbh->prepare($call);
$cursor->execute;
@row=$cursor->fetchrow_array;
print @row;
---------------------------
When run, this returns the error:
ERROR no statement executing (perhaps you need to call execute first)
If I replace that ugly bit of sql up there in my call with something
pretty like q{select * from User where UserName like 'George'}, then it
all works like a charm. The ugly sql does work just fine from
OraclePlus. I have pored over the perldocs for DBD::Oracle, and DBI,
searched the FAQ, searched the newsgroups, etc, and alas! it has been
to no avail.
Alternatively to this working, I need some way to call a procedure, and
let an array(list), rather than a scalar be returned.
If anyone has any ideas, I will be highly grateful.
Thanks in advance,
Amy Schmieder
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Tue, 16 Nov 1999 15:02:11 -0800
From: John Xu <xu@aerovironment.com>
Subject: embedded perl engine in Windowss application
Message-Id: <3831E273.F4B7F412@aerovironment.com>
I have a windows applications developed using C++, which need the
capability to parser some kind of script. Of course, I like to use Perl.
But how do I embedded the Perl engine in a windows application? Where
should I start?
Thanks,
------------------------------
Date: Wed, 17 Nov 1999 01:18:00 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: embedded perl engine in Windowss application
Message-Id: <cnnY3.19944$YI2.863883@typ11.nn.bcandid.com>
In article <3831E273.F4B7F412@aerovironment.com>,
John Xu <xu@aerovironment.com> wrote:
>I have a windows applications developed using C++, which need the
>capability to parser some kind of script. Of course, I like to use Perl.
>But how do I embedded the Perl engine in a windows application? Where
>should I start?
perldoc perlembed
--
<kragen@pobox.com> Kragen Sitaker <http://www.pobox.com/~kragen/>
The Internet stock bubble didn't burst on 1999-11-08. Hurrah!
<URL:http://www.pobox.com/~kragen/bubble.html>
------------------------------
Date: 16 Nov 1999 09:05:54 -0800
From: Carl Johnson <carlj@peak.org>
Subject: Re: Fetch Dilbert.
Message-Id: <87yabypdsd.fsf@cjlinux.localnet>
Uri Guttman <uri@sysarch.com> writes:
> >>>>> "A" == Abigail <abigail@delanet.com> writes:
>
> A> Here's a little script that fetches the daily Dilbert image, and
> A> displays it in a viewer. You might want to change the '$viewer'
> A> line if you wish to use this program.
>
> i wrote something recently to get a month of calvin & hobbes (and
> another strip or too). i got sick of the ads and the pain of fetching
> one at a time. i may post the raw code sometime.
Do either of you know of anything equivalent for getting User Friendly
also? I would love to get be able to fetch them automatically, but
they seem to have randomized the numbers for the GIFs.
--
Carl Johnson carlj@peak.org
------------------------------
Date: Tue, 16 Nov 1999 23:35:28 GMT
From: perldoc@my-deja.com
Subject: Re: Fetch Dilbert.
Message-Id: <80spo0$q1q$1@nnrp1.deja.com>
In article <m1hfim5ttz.fsf@halfdome.holdit.com>,
merlyn@stonehenge.com (Randal L. Schwartz) wrote:
> Or you can just look at my WebTechniques column # 15, at
>
> http://www.stonehenge.com/merlyn/WebTechniques/col15.html
...but if you do, beware that the script on this page
is out of date. The $HTML_RE and $GIF_RE configuration
variables at the top should be changed to read as follows:
my $HTML_RE = '/comics/dilbert/archive/cal-\d+.html';
my $GIF_RE = '/comics/dilbert/archive/images/dilbert\d+.gif';
Of course, Randal has fixed this in his working example at
http://www.stonehenge.com/cgi/dilbert
but has conveniently neglected to mention that to anyone.
Gee, is it any surprise this group is overloaded with
confused newbies? Thanks for adding to the confusion
by providing a link to *your* buggy code.
> print "Just another Perl hacker,"
print "Just another self-promoter,"
Yours, perldoc
.signature containing 4-line advertisement omitted
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Wed, 17 Nov 1999 01:30:08 GMT
From: *@dragons.duesouth.net (Matthew Bafford)
Subject: Re: Fetch Dilbert.
Message-Id: <slrn83406l.1l7.*@dragons.duesouth.net>
On 16 Nov 1999 09:05:54 -0800, Carl Johnson <carlj@peak.org> spewed
forth:
: Do either of you know of anything equivalent for getting User Friendly
: also? I would love to get be able to fetch them automatically, but
: they seem to have randomized the numbers for the GIFs.
Easy...
The url for the daily static and that day's image differ by one letter
only.
So, download:
http://www.userfriendly.org/static/
Search for the URL
Remove the letter
Grab the image
: Carl Johnson
--Matthew
------------------------------
Date: 16 Nov 1999 19:30:18 -0600
From: abigail@delanet.com (Abigail)
Subject: Re: Fetch Dilbert.
Message-Id: <slrn8341fo.cvu.abigail@alexandra.delanet.com>
Carl Johnson (carlj@peak.org) wrote on MMCCLXVIII September MCMXCIII in
<URL:news:87yabypdsd.fsf@cjlinux.localnet>:
\\
\\
\\ Do either of you know of anything equivalent for getting User Friendly
\\ also? I would love to get be able to fetch them automatically, but
\\ they seem to have randomized the numbers for the GIFs.
Djee, it wouldn't be that hard given the dilbert example, would it?
Randomized number aren't a problem - the dilbert fetcher didn't use
any hardcoded numbers either.
This one gets userfriendly, the larger version of the images. Note that
it's almost the same as the dilbert program - just replacing some config
info, making a trivial change, and added one line.
#!/opt/perl/bin/perl -w
#
# $Id: uf.pl,v 1.1 1999/11/17 01:29:22 abigail Exp abigail $
#
# $Log: uf.pl,v $
# Revision 1.1 1999/11/17 01:29:22 abigail
# Initial revision
#
#
use strict;
use LWP::Simple;
my $uf_url = 'http://www.userfriendly.org/static/';
my $comic_url = '(http://www.userfriendly.org/cartoons/archives/\S+.gif)';
my $viewer = '/usr/local/bin/display -';
my $uf = get $uf_url or die "Failed to fetch UF.\n";
my ($comic) = $uf =~ /$comic_url/ or die "Failed to find comic.\n";
$comic =~ s./x./.; # Large version.
my $image = get $comic or die "Failed to fetch comic.\n";
open DISPLAY, "| $viewer" or die "Failed to open viewer.\n";
print DISPLAY $image;
close DISPLAY or die "Failed to close viewer.\n";
__END__
=pod
This program is copyright 1999 by Abigail.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT
OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
=cut
--
perl -wlne '}for($.){print' file # Count the number of lines.
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: Wed, 17 Nov 1999 00:15:49 GMT
From: jaws@mindspring.com (John Armsby)
Subject: File::Find on Win32 :-( - getit4.pl (0/1)
Message-Id: <3831f2e6.750854@news.mindspring.com>
I have written a short Perl script to recurse through a Novel
(windows) directory and return path and file name. Interestingly
enough "dir /b/s" does the same thing. The good news is that it
works. The bad news is that long filenames are reduced to the 8.3
format. SURELY there is a way around this. I am running the latest
from active state on NT with all the service packs installed.
Any help would be appreciated.
John
------------------------------
Date: Wed, 17 Nov 1999 00:15:50 GMT
From: jaws@mindspring.com (John Armsby)
Subject: File::Find on Win32 :-( - getit4.pl (1/1)
Message-Id: <3831f3b6.958983@mail.mindspring.com>
begin 644 getit4.pl
M(R%C.EQP97)L7&)I;EQP97)L#0IU<V4@1FEL93HZ1FEN9#L-"@T*9FEN9"!S
M=6)[1V5T:70H*3M]("P@)VHZ+V1E<'1S+W=S<'!R;VIE+W!R;VIE8W1D+VQI
M8G)A<GDO)SL-"@T*<W5B($=E=&ET#0I[#0H-"B1&:6QE3F%M92`])$9I;&4Z
M.D9I;F0Z.FYA;64[#0I`1FEL95-T870]<W1A="@D1FEL94YA;64I.PT*)$9I
M;&54:6UE(#T@)$9I;&53=&%T6SE=.PT*)$QO8V%L1FEL951I;64@/6QO8V%L
M=&EM92@D1FEL951I;64I.PT*)$9I;&5.86UE(#U^(',O:CHO+SL-"B1&:6QE
M3F%M92`]?B!S+UPO9&5P=',O=F%U;'0O.PT*<')I;G0H(EQN)$9I;&5.86UE
7?"1,;V-A;$9I;&54:6UE(BD[#0I]#0H`
`
end
------------------------------
Date: Wed, 17 Nov 1999 01:33:04 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: File::Find on Win32 :-( - getit4.pl (1/1)
Message-Id: <kBnY3.20033$YI2.868168@typ11.nn.bcandid.com>
In article <3831f3b6.958983@mail.mindspring.com>,
John Armsby <jaws@mindspring.com> wrote:
>begin 644 getit4.pl
>M(R%C.EQP97)L7&)I;EQP97)L#0IU<V4@1FEL93HZ1FEN9#L-"@T*9FEN9"!S
>`
>end
Don't post uuencoded files here. This is not a binaries newsgroup.
--
<kragen@pobox.com> Kragen Sitaker <http://www.pobox.com/~kragen/>
The Internet stock bubble didn't burst on 1999-11-08. Hurrah!
<URL:http://www.pobox.com/~kragen/bubble.html>
------------------------------
Date: Tue, 16 Nov 1999 23:40:16 GMT
From: naji@xmission.com
Subject: globbing problem: getwd: cannot access parent directories
Message-Id: <80sq10$qc2$1@nnrp1.deja.com>
I'm having an interesting problem with globbing. Here's a code snippet:
....
my $TEMPLATEDIR = '/home/auser/public_html/asubdir/';
....
my @infiles = <${TEMPLATEDIR}Home/*>;
# Effectively, @infiles = </home/auser/public_html/asubdir/Home/*>;
....
Upon execution of the ellipse, two lines are written out to STDERR:
shell-init: could not get current directory: getwd: cannot access
parent directories
job-working-directory: could not get current directory: getwd: cannot
access parent directories
The resulting @infiles array contains a list of all files in the
desired directory, EXCEPT the first file! Any explanation and/or fix
to this problem?
This is inside a CGI script (but I can replicate the results when
logged into a shell). The web server can read the directories in
question, but it can not read some of the parent directories. I'm not
as concerned with the error messages as I am about missing the first
file in the directory.
Thanks in advance!
--
--
Naji <naji@xmission.com>
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Wed, 17 Nov 1999 01:30:09 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: globbing problem: getwd: cannot access parent directories
Message-Id: <BynY3.20012$YI2.867904@typ11.nn.bcandid.com>
In article <80sq10$qc2$1@nnrp1.deja.com>, <naji@xmission.com> wrote:
>my @infiles = <${TEMPLATEDIR}Home/*>;
>shell-init: could not get current directory: getwd: cannot access
>parent directories
>job-working-directory: could not get current directory: getwd: cannot
>access parent directories
>
>The resulting @infiles array contains a list of all files in the
>desired directory, EXCEPT the first file! Any explanation and/or fix
>to this problem?
Suggested explanation: glob is somewhat kludgy, and is implemented by
spawning off a sh which spawns off a csh.
Suggested fix: use opendir and readdir instead. Sorry. HTH.
--
<kragen@pobox.com> Kragen Sitaker <http://www.pobox.com/~kragen/>
The Internet stock bubble didn't burst on 1999-11-08. Hurrah!
<URL:http://www.pobox.com/~kragen/bubble.html>
------------------------------
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 1401
**************************************