[14038] in Perl-Users-Digest
Perl-Users Digest, Issue: 1448 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Nov 21 00:05:46 1999
Date: Sat, 20 Nov 1999 21:05:10 -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: <943160710-v9-i1448@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Sat, 20 Nov 1999 Volume: 9 Number: 1448
Today's topics:
Can perl load a html output from another server?? <bay@serve.com>
Re: Can perl load a html output from another server?? <bwalton@rochester.rr.com>
Date Problem - Whats the deal with this? <larrymac@strato.net>
Re: Date Problem - Whats the deal with this? <jeffp@crusoe.net>
Re: Date Problem - Whats the deal with this? <bwalton@rochester.rr.com>
Re: environment vars <cpcollin@wam.umd.edu>
Re: environment vars <gellyfish@gellyfish.com>
Re: environment vars <uri@sysarch.com>
Re: File::Find on Win32 :-( - getit4.pl (0/1) (John Armsby)
Re: File::Find on Win32 :-( - getit4.pl (1/1) (John Armsby)
Re: Getting HTML tags via regular expression <uri@sysarch.com>
Help Help Help!!! <jamezd@worldnet.att.net>
Re: Help Help Help!!! (Thunderdust (TomH))
Re: help need please on perl <jpburris@ruralnetwork.net>
Re: help need please on perl <jpburris@ruralnetwork.net>
How to create file in other directory ? <hep05@jakartamail.com>
Re: How to find perl2c translator (Raffael Cavallaro)
Re: how to send data back and forth over sockets <mhdevlin@nycap.rr.com>
Re: how to send data back and forth over sockets <gellyfish@gellyfish.com>
Re: how to send data back and forth over sockets <mhdevlin@nycap.rr.com>
Re: Need a dir lee.lindley@bigfoot.com
Re: newbie : looking for a script that reads all the f <bwalton@rochester.rr.com>
newbie : looking for a script that reads all the file <kf4dmb@tds.net>
Re: newbie question <aqumsieh@matrox.com>
Re: OO question (Damian Conway)
Re: Perl programming sytle <gellyfish@gellyfish.com>
Perl Security jampa@my-deja.com
Re: Perl Security (Sam Holden)
Re: Search Engine (Matthew Bafford)
Re: Search Engine <gellyfish@gellyfish.com>
Re: Search Engine <flavell@mail.cern.ch>
Time modules. <snapperhead_420NOsnSPAM@hotmail.com.invalid>
Re: Variable expansion in Perl? limbostar@my-deja.com
Re: What is a good book on Perl (Simon Cozens)
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 21 Nov 1999 03:10:38 GMT
From: "Nicky" <bay@serve.com>
Subject: Can perl load a html output from another server??
Message-Id: <01bf33cd$998b03c0$030101a8@genma>
Hi all.
Is it allowed to load the output from a cgi from another server
so that I can process it?
eg. loading search results from multiple search engines and displaying
them in my own formats.
If its possible, how do I go about it?
thanks..!
..nicky
------------------------------
Date: Sat, 20 Nov 1999 23:44:01 -0500
From: Bob Walton <bwalton@rochester.rr.com>
Subject: Re: Can perl load a html output from another server??
Message-Id: <38377891.CC8187EF@rochester.rr.com>
Nicky wrote:
...
> Is it allowed to load the output from a cgi from another server
> so that I can process it?
>
> eg. loading search results from multiple search engines and displaying
> them in my own formats.
...
> ..nicky
use LWP::Simple;
$webpage=get('http://www.whatever.com?key1=value1&key2=value2');
--
Bob Walton
------------------------------
Date: Sat, 20 Nov 1999 22:22:55 -0500
From: "larry" <larrymac@strato.net>
Subject: Date Problem - Whats the deal with this?
Message-Id: <SzJZ3.32519$YI2.1567924@typ11.nn.bcandid.com>
I'm new to perl and am trying to track down a falt on a hit statistics
program (called counter.pl) that is returning the wrong date.
Its returning 10/20/99 on 11/20/99 yet when I look at the file dates on the
system they are correct!
here is what I have, does this look ok?
# Get the Date For Logging Purposes
if ($uselog == 1) {
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
if ($sec < 10) { $sec = "0$sec"; }
if ($min < 10) { $min = "0$min"; }
if ($hour < 10) { $hour = "0$hour"; }
if ($mday < 10) { $mday = "0$mday"; }
if ($mon < 10) { $monc = "0$mon"; }
$date = "$hour\:$min\:$sec $mon/$mday/$year";
}
The time and year is working ok, just the month is wrong.
------------------------------
Date: Sat, 20 Nov 1999 22:51:31 -0500
From: Jeff Pinyan <jeffp@crusoe.net>
Subject: Re: Date Problem - Whats the deal with this?
Message-Id: <Pine.GSO.4.10.9911202247380.436-100000@crusoe.crusoe.net>
[posted & mailed]
On Nov 20, larry blah blah blah:
> Its returning 10/20/99 on 11/20/99 yet when I look at the file dates on the
> system they are correct!
That's because you didn't bother to READ the documenation for
localtime()... you just glanced at it.
> here is what I have, does this look ok?
Only if you want January 1, 2000 to be "00/01/100"...
> if ($sec < 10) { $sec = "0$sec"; }
> if ($min < 10) { $min = "0$min"; }
> if ($hour < 10) { $hour = "0$hour"; }
> if ($mday < 10) { $mday = "0$mday"; }
> if ($mon < 10) { $monc = "0$mon"; }
These can be gotten rid of, and I'll explain why in a moment.
> $date = "$hour\:$min\:$sec $mon/$mday/$year";
If you'd bother to read the localtime() docs, you'd know it returns the
month with 1 subtracted from it, and the year with 1900 subtracted from
it. If you REALLY want to use your method, I'd suggest you change it to:
$date = sprintf "%02d:%02d:%02d $02d/%02d/%02d",
(localtime)[2,1,0,4,3,5] if $uselog;
But I'd suggest you REALLY READ the localtime() docs, because
$date = localtime if $uselog;
would probably be just as good.
--
MIDN 4/C PINYAN, USNR, NROTCURPI http://www.pobox.com/~japhy/
jeff pinyan: japhy@pobox.com perl stuff: japhy+perl@pobox.com
"The Art of Perl" http://www.pobox.com/~japhy/book/
CPAN ID: PINYAN http://www.perl.com/CPAN/authors/id/P/PI/PINYAN/
PerlMonth - An Online Perl Magazine http://www.perlmonth.com/
------------------------------
Date: Sat, 20 Nov 1999 23:34:46 -0500
From: Bob Walton <bwalton@rochester.rr.com>
Subject: Re: Date Problem - Whats the deal with this?
Message-Id: <38377666.A25E4EE1@rochester.rr.com>
larry wrote:
>
> I'm new to perl and am trying to track down a falt on a hit statistics
> program (called counter.pl) that is returning the wrong date.
> Its returning 10/20/99 on 11/20/99 yet when I look at the file dates on the
> system they are correct!
...
> The time and year is working ok, just the month is wrong.
Larry, read the docs:
perldoc -f localtime
There you will see that the item returned for month has a
range of 0..11, with 0 representing January, etc. It is
this way because that is how C does it, and localtime
reflects its C underpinnings. Same deal with the day
of the week.
--
Bob Walton
------------------------------
Date: Sat, 20 Nov 1999 18:48:05 -0500
From: "Chris Collins" <cpcollin@wam.umd.edu>
Subject: Re: environment vars
Message-Id: <817c2r$456$1@hecate.umd.edu>
I think that is on the right track (the LD_LIBRARY_PATH thing) I don't
think I know exactly what to put in that path. I put the paths of the two
files mentioned in the web server's error_log that it wasn't able to open,
but all that did was cause my working script (from the command prompt) to
give the same error I had been receiving in the webserver logs.
I am getting pretty frustrated with the whole thing, I've read a whole lot
and I'm still not making too much headway. I was wondering if perhaps I
could force the script to run as me. i.e. some sort of setuid call in the
script. Does that idea have any merit?
I can't figure out what's going on, I've successfully written code in ProC*
and Java that successfully connect to Oracle when run through the browser,
I'm just having many problems getting perl to do the same thing.
thanks for the help,
Chris
Jonathan Stowe <gellyfish@gellyfish.com> wrote in message
news:81629m$78q$1@gellyfish.btinternet.com...
> On Fri, 19 Nov 1999 23:27:03 -0500 Chris Collins wrote:
> >
> > I'm catching alot of flak for asking an innocent question.
> > Maybe I'll just write all my code in ADA from now on
> >
>
> I didnt think it was *you* that was copping any flak in this thread.
> BTW was it the $ENV{LD_LIBRARY_PATH} thing ?
>
> /J\
> --
> Jonathan Stowe <jns@gellyfish.com>
> <http://www.gellyfish.com>
> Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: 21 Nov 1999 00:40:59 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: environment vars
Message-Id: <817f2s$96e$1@gellyfish.btinternet.com>
On Sat, 20 Nov 1999 18:48:05 -0500 Chris Collins wrote:
> Jonathan Stowe <gellyfish@gellyfish.com> wrote in message
> news:81629m$78q$1@gellyfish.btinternet.com...
>> On Fri, 19 Nov 1999 23:27:03 -0500 Chris Collins wrote:
>> >
>> > I'm catching alot of flak for asking an innocent question.
>> > Maybe I'll just write all my code in ADA from now on
>> >
>>
>> I didnt think it was *you* that was copping any flak in this thread.
>> BTW was it the $ENV{LD_LIBRARY_PATH} thing ?
>>
>
> I think that is on the right track (the LD_LIBRARY_PATH thing) I don't
> think I know exactly what to put in that path. I put the paths of the two
> files mentioned in the web server's error_log that it wasn't able to open,
> but all that did was cause my working script (from the command prompt) to
> give the same error I had been receiving in the webserver logs.
>
You will probably need to ask in an oracle group to get the right
answer but basically you need to have LD_LIBRARY_PATH point to the
places where your oracle libraries reside - as an example I have
Informix installed on this machine and I would add the following to
the LD_LIBRARY_PATH :
/usr/informix/lib:/usr/informix/lib/esql
Of course this will be different for Oracle and as I say you will want
to ask in some Oracle group for a definitive answer.
/J\
--
Jonathan Stowe <jns@gellyfish.com>
<http://www.gellyfish.com>
Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: 20 Nov 1999 23:08:39 -0500
From: Uri Guttman <uri@sysarch.com>
Subject: Re: environment vars
Message-Id: <x7zow8o5a0.fsf@home.sysarch.com>
>>>>> "JS" == Jonathan Stowe <gellyfish@gellyfish.com> writes:
JS> On Sat, 20 Nov 1999 18:48:05 -0500 Chris Collins wrote:
>> I think that is on the right track (the LD_LIBRARY_PATH thing) I
>> don't think I know exactly what to put in that path. I put the
>> paths of the two files mentioned in the web server's error_log that
>> it wasn't able to open, but all that did was cause my working
>> script (from the command prompt) to give the same error I had been
>> receiving in the webserver logs.
JS> You will probably need to ask in an oracle group to get the right
JS> answer but basically you need to have LD_LIBRARY_PATH point to the
JS> places where your oracle libraries reside - as an example I have
JS> Informix installed on this machine and I would add the following to
JS> the LD_LIBRARY_PATH :
JS> /usr/informix/lib:/usr/informix/lib/esql
i think use PSI::ESP may come to the rescue. when he changed
LD_LIBRARY_PATH for the shell it failed the same way. i am now divining
that he forgot (or was never told) to put the standard lib paths in that
var too! by default, libraries are searched for in usually just
/usr/lib. if LD_LIBRARY_PATH is set, that is the list of dirs to search
and the default is not searched. so set it to:
/usr/lib:/usr/informix/lib:/usr/informix/lib/esql
so that will find all the standard and informix libraries. if perl is
installed in /usr/local, add /usr/local/lib to that. and make sure the
informix paths are correct.
uri
--
Uri Guttman --------- uri@sysarch.com ---------- http://www.sysarch.com
SYStems ARCHitecture, Software Engineering, Perl, Internet, UNIX Consulting
The Perl Books Page ----------- http://www.sysarch.com/cgi-bin/perl_books
The Best Search Engine on the Net ---------- http://www.northernlight.com
------------------------------
Date: Sun, 21 Nov 1999 00:52:49 GMT
From: jaws@mindspring.com (John Armsby)
Subject: Re: File::Find on Win32 :-( - getit4.pl (0/1)
Message-Id: <383741ff.481483@news.mindspring.com>
I believe you are correct. The script works great on win98. It also
works great on Linux. It absolutely returns a 8.3 filename from the
Novel drive. sniff.........
Thanks for the Post.
John
On Fri, 19 Nov 1999 18:02:49 GMT, scott@aravis.softbase.com (Scott
McMahan) wrote:
>John Armsby (jaws@mindspring.com) wrote:
>> 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.
>
>File::Find works on native Win32 file systems and returns the full
>paths, because I've done it and do it every time I weed out unnecessary
>backup files (*~, etc) before making a backup and have some
>monster long names with spaces and stuff.
>
>So the issue must be in the Novell drivers. It may be impossible to
>get "long" filenames over such a connection. This is not a Perl issue,
>I don't think.
>
>Scott
>
>http://autoperl.skwc.com Automating Windows With Perl
------------------------------
Date: Sun, 21 Nov 1999 00:55:36 GMT
From: jaws@mindspring.com (John Armsby)
Subject: Re: File::Find on Win32 :-( - getit4.pl (1/1)
Message-Id: <38374284.614233@news.mindspring.com>
Of course it does. I tested it on MY LINUX machine. I also tested it
on the NT machine which is hooked up to the Novel drive I want to get
file path and name from. UNFORTUNATELY it still returns the 8.3 file
names..... It has to be Novel. sniff.......
John
On 19 Nov 1999 23:09:17 -0000, Jonathan Stowe
<gellyfish@gellyfish.com> wrote:
>On Fri, 19 Nov 1999 00:13:39 GMT John Armsby wrote:
>> I have run my script which you have kindly rewritten on windows 98. I
>> will try it on my NT machine tomorrow. It works flawlessly.
>>
>
>Of course it does - I tested it on some Unix machine ;-}
>
>/J\
>--
>Jonathan Stowe <jns@gellyfish.com>
><http://www.gellyfish.com>
>Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: 20 Nov 1999 23:11:41 -0500
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Getting HTML tags via regular expression
Message-Id: <x7wvrco54y.fsf@home.sysarch.com>
>>>>> "A" == Abigail <abigail@delanet.com> writes:
A> Uri Guttman (uri@sysarch.com) wrote on MMCCLXXII September MCMXCIII in
A> <URL:news:x766yxowu4.fsf@home.sysarch.com>:
A> "" >>>>> "A" == Abigail <abigail@delanet.com> writes:
A> ""
A> "" A> package Just_another_Perl_Hacker; sub print {($_=$_[0])=~ s/_/ /g;
A> "" A> print } sub __PACKAGE__ { &
A> "" A> print ( __PACKAGE__)} &
A> "" A> __PACKAGE__
A> "" A> ( )
A> ""
A> "" amusing as always. but the s/_/ /g should be a tr/_/ / or to save a golf
A> "" stroke ala larry, y/_/ /.
A> No, it shouldn't. "g" looks more like "&" then ";" does.
ah, i didn't know your ascii art perl was trying to match at the glyph
level! but what about y/_/ /s? you don't need the squeeze but s looks
close to & (in some eyes).
uri
--
Uri Guttman --------- uri@sysarch.com ---------- http://www.sysarch.com
SYStems ARCHitecture, Software Engineering, Perl, Internet, UNIX Consulting
The Perl Books Page ----------- http://www.sysarch.com/cgi-bin/perl_books
The Best Search Engine on the Net ---------- http://www.northernlight.com
------------------------------
Date: Sat, 20 Nov 1999 20:04:57 -0600
From: "JAMES DELLER" <jamezd@worldnet.att.net>
Subject: Help Help Help!!!
Message-Id: <817k5l$6m1$1@bgtnsc01.worldnet.att.net>
My web programming prof at LSU assigned us the task of writing a cgi perl
script which reads a name (2 words) from an html form, manipulates the
string, and sends back to the http processor some html code about the
string. Are you with me so far?? What he wants us to do with the string
is 1) print out the number of characters and 2) sort the string in ascending
order (i.e. 'James' comes back as 'aeJms'). Seems easy enough. The problem
I'm having is the array I've set up to receive the string evidentally can
not be sorted. As you can see I have set up a dummy array within the script
which does allow the join and sort functions. Why won't the array I am
using for the name string allow join and sort??
Any help you can provide is greatly appreciated....
Regards, JD
#!/usr/local/bin/perl
use CGI standard;
$co = new CGI;
print $co->header,
$co->start_html(
-title=>'CGI Script Assignment',
-author=>'JD',
-meta=>{'keywords'=>'CGI Assignment'},
);
#$co->center($co->h2('xxxxxxxxxxxxxxxxx')),
#$co->h4('xxxxxxxxxxxxx'),
#$co->hr;
if($co->param()) {
@num = (3,7,8,2,9);
print "Your number is: ", @num, $co->p;
print $num[1];
print $num[3];
print $num[4];
print $num[0], $co->p;
print sort @num, $co->p;
print join(" ", sort @num), $co->p;
print "Hello!", $co->p;
@name = $co->param('text');
print "Your name is: ", @name, $co->p;
print $name[1];
print $name[4];
print $name[6];
print $name[10], $co->p;
print sort @name, $co->p;
print join(" ", sort @name), $co->p;
}
$co->hr;
$co->end_html;
------------------------------
Date: Sat, 20 Nov 1999 21:45:34 GMT
From: beans@bedford.net (Thunderdust (TomH))
Subject: Re: Help Help Help!!!
Message-Id: <38371352.58347914@news.bedford.net>
On Sat, 20 Nov 1999 20:04:57 -0600, "JAMES DELLER"
<jamezd@worldnet.att.net> wrote:
>My web programming prof at LSU assigned us the task of writing a cgi perl
...
At least you are honest enough to admit this is a homework assignment!
> The problem
>I'm having is the array I've set up to receive the string evidentally can
>not be sorted. As you can see I have set up a dummy array within the script
>which does allow the join and sort functions. Why won't the array I am
>using for the name string allow join and sort??
...
>@name = $co->param('text');
...
There's your problem, what you have is the entire string in $name[0].
You need to split the string so each array entry only has one
character, then sort it:
@name = sort ( split (//,$co->param('text' ) ) );
...
Learn to use the Perl debugger, you can see exactly what's going on.
Schnoodlewinks-constantly leveling up warrior
Fluffy_the_Fly-lvl.7 warrior (x2-don't ask!)
Flame-QFG5 Paladin
------------------------------
Date: Sat, 20 Nov 1999 20:55:26 -0700
From: "Joe Burris" <jpburris@ruralnetwork.net>
Subject: Re: help need please on perl
Message-Id: <X4KZ3.2746$vp5.6579@news2.randori.com>
Abigail wrote: "Did you read the CGI man page?"
I am a newbie too. I don't know which CGI main page you were referring to.
I have been reluctant to post questions because I'm not even sure what to
ask or how to ask it. I am a teacher enrolled in an Educational Technology
Masters program, not a programmer. If you have any ideas of resources that
might be helpful, please share.
Thanks,
- Joe
------------------------------
Date: Sat, 20 Nov 1999 21:04:31 -0700
From: "Joe Burris" <jpburris@ruralnetwork.net>
Subject: Re: help need please on perl
Message-Id: <wdKZ3.2747$vp5.6656@news2.randori.com>
I forgot to mention that I am using Win98 and downloaded activeperl from
activestate. My first goal is to process forms (such as surveys and polls).
Thanks again.
-Joe
------------------------------
Date: Sun, 21 Nov 1999 12:08:38 +0800
From: "Henry E. P." <hep05@jakartamail.com>
Subject: How to create file in other directory ?
Message-Id: <hzQZ3.2077$HP.18484@news>
Please help me how to create file in other directory ?
I've to try this syntax but it doesn't work.
open HTML, "> \\test\\test.html;
------------------------------
Date: Sat, 20 Nov 1999 22:21:44 -0500
From: raffael@mediaone.net (Raffael Cavallaro)
Subject: Re: How to find perl2c translator
Message-Id: <raffael-2011992221440001@raffaele.ne.mediaone.net>
In article <3836E615.8FCF0C24@multiweb.nl>, Ronald <r.bezuur@multiweb.nl> wrote:
>Could anybody tell me where I can find a perl2c translator?
from:
<http://www.perl.com/pub/doc/manual/html/utils/perlcc.html>
%prompt perlcc a.p -C a.c -gen # generates C code (into a.c) and
# stops without compile.
Raf
--
Raffael Cavallaro, Ph.D.
raffael@mediaone.net
------------------------------
Date: Sat, 20 Nov 1999 19:46:38 -0500
From: "Matthew H. Devlin III" <mhdevlin@nycap.rr.com>
Subject: Re: how to send data back and forth over sockets
Message-Id: <383740ED.24271D3F@nycap.rr.com>
Tony Curtis wrote:
> Re: how to send data back and forth over sockets,
> Matthew <mhdevlin@nycap.rr.com> said:
>
> Matthew> I have created a little Tk application that
> Matthew> runs on unix.
>
> How nice. Now, which newsgroup is this?
Do you see any question here regarding Tk? My question is specific to
perl.
Thanks for your help...Prick.
------------------------------
Date: 21 Nov 1999 01:28:11 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: how to send data back and forth over sockets
Message-Id: <817hrb$9ae$1@gellyfish.btinternet.com>
On Sat, 20 Nov 1999 19:46:38 -0500 Matthew H. Devlin III wrote:
> Tony Curtis wrote:
>
>> Re: how to send data back and forth over sockets,
>> Matthew <mhdevlin@nycap.rr.com> said:
>>
>> Matthew> I have created a little Tk application that
>> Matthew> runs on unix.
>>
>> How nice. Now, which newsgroup is this?
>
> Do you see any question here regarding Tk? My question is specific to
> perl.
Er to be fair you did say :
>> I have created a little Tk application that runs on unix. What I want
>> to do with it is be able to run it on a windows machine and connect via
>> a socket to the unix server.
You didnt actually mention Perl but you did mention Tk - and actually I
thought just as Tony did - I just didnt say anything as I considered
that you might have meant Perl/Tk and were simply being vague.
> Thanks for your help...Prick.
>
But there go your chances of getting any serious help around here
whatever it is you are trying to do.
/J\
--
Jonathan Stowe <jns@gellyfish.com>
<http://www.gellyfish.com>
Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: Sat, 20 Nov 1999 20:49:01 -0500
From: "Matthew H. Devlin III" <mhdevlin@nycap.rr.com>
Subject: Re: how to send data back and forth over sockets
Message-Id: <38374F8D.4B6404C4@nycap.rr.com>
Obviously the code that I need will be seperate from anything that relates to
the tk portion. I assumed that was a given. What I am looking for is
strictly some perl code to perform the functions mentioned in my first post.
I will make the connection to everything else once I figure it out. I have
posted to alt.perl.sockets but there is not much activity on that group.
Jonathan Stowe wrote:
> On Sat, 20 Nov 1999 19:46:38 -0500 Matthew H. Devlin III wrote:
> > Tony Curtis wrote:
> >
> >> Re: how to send data back and forth over sockets,
> >> Matthew <mhdevlin@nycap.rr.com> said:
> >>
> >> Matthew> I have created a little Tk application that
> >> Matthew> runs on unix.
> >>
> >> How nice. Now, which newsgroup is this?
> >
> > Do you see any question here regarding Tk? My question is specific to
> > perl.
>
> Er to be fair you did say :
>
> >> I have created a little Tk application that runs on unix. What I want
> >> to do with it is be able to run it on a windows machine and connect via
> >> a socket to the unix server.
>
> You didnt actually mention Perl but you did mention Tk - and actually I
> thought just as Tony did - I just didnt say anything as I considered
> that you might have meant Perl/Tk and were simply being vague.
>
> > Thanks for your help...Prick.
> >
>
> But there go your chances of getting any serious help around here
> whatever it is you are trying to do.
>
> /J\
> --
> Jonathan Stowe <jns@gellyfish.com>
> <http://www.gellyfish.com>
> Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: 21 Nov 1999 00:41:00 GMT
From: lee.lindley@bigfoot.com
Subject: Re: Need a dir
Message-Id: <817f2s$cfi$1@rguxd.viasystems.com>
Jonathan Stowe <gellyfish@gellyfish.com> wrote:
:>So the shell prepends the peritinent part of the path when it runs the
:>program - I would assume that most other programs that run other
:>programs (and I am thinking particularly of a web server here ) will
:>do the same and $0 will reflect that. Nonetheless (relativity
:>notwithstanding :) the path part of $0 will be sufficient to locate the
:>program.
Don't think too much. Just go read the code in the FindBin module.
I was humiliated on this very issue by Tom C himself about 6 months
ago. Any answer to this question other than "use FindBin" is subject
to ridicule.
--
// Lee.Lindley /// I used to think that being right was everything.
// @bigfoot.com /// Then I matured into the realization that getting
//////////////////// along was more important. Except on usenet.
------------------------------
Date: Sat, 20 Nov 1999 23:30:38 -0500
From: Bob Walton <bwalton@rochester.rr.com>
Subject: Re: newbie : looking for a script that reads all the file names in the directory
Message-Id: <3837756E.2A71B25@rochester.rr.com>
jim and lois flaherty wrote:
>
> I am looking for a perl script the reads the names of all the files in a
> directory , then I can
> make the script to build a html page
...
> Jim
@file_names_in_current_directory=<*.*>;
See perlop I/O operators for details.
--
Bob Walton
------------------------------
Date: Sun, 21 Nov 1999 03:34:56 GMT
From: "jim and lois flaherty" <kf4dmb@tds.net>
Subject: newbie : looking for a script that reads all the file names in the directory
Message-Id: <ALJZ3.1448$4D5.967260@ratbert.tds.net>
I am looking for a perl script the reads the names of all the files in a
directory , then I can
make the script to build a html page
Thanks
Jim
------------------------------
Date: Sat, 20 Nov 1999 17:31:56 -0500
From: Ala Qumsieh <aqumsieh@matrox.com>
Subject: Re: newbie question
Message-Id: <x3yd7t4zter.fsf@tigre.matrox.com>
Waranun Bunjongsat <bunjonwa@trek.CS.ORST.EDU> writes:
> I know now that why my DB_File is not working. This is because
> my server do not have the program installed. So, I downloaded the DB_File
> from sleepycat. But, I do not know how to use it. I feel that I need
> DB_File.pm. But should I put it in my cgi-bin ?? what else I need to do ?
> What other file I need ? Do I need to install something ?
No, but you need to consult the FAQs. The answer lies within perlfaq8:
How do I keep my own module/library directory?
--Ala
------------------------------
Date: 20 Nov 1999 23:44:03 GMT
From: damian@cs.monash.edu.au (Damian Conway)
Subject: Re: OO question
Message-Id: <817bo3$l8l$1@towncrier.cc.monash.edu.au>
kragen@dnaco.net (Kragen Sitaker) writes:
>>: # CALL METHODS NON-POLYMORPHICALLY (VIA REFERENCE)...
>>: $mycall1->($self,$arg1);
>>: $mycall2->($self,$arg2);
>>
>>Wouldn't
>>
>> $self->$mycall1($arg1);
>>
>>be preferable because of its advantage in the area of visual cues?
>Damian was posting about how to make it faster, not more readable. :)
In fairness, testing under 5.00502 indicates the $obj->$method_ref()
method call syntax is fractionally *faster* than the
$method_ref->($obj) on my machine.
The reason I used the subroutine pointer syntax was pedagogical: to
emphasize than no method dispatch was being done at that point. The
same reasoning would indicate that the syntax I used might be
marginally more maintainable.
But in practice, yes, I'd probably use the method-call-ish syntax myself
in non-pedagogical code.
Damian
------------------------------
Date: 20 Nov 1999 22:54:28 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Perl programming sytle
Message-Id: <8178r4$91c$1@gellyfish.btinternet.com>
On Sat, 20 Nov 1999 16:50:35 -0500 Michael Fischer wrote:
>
> BTW, despite its reputation, this is one of the most generous
> and helpful newsgroups around. Thanks to all the regulars.
>
Mind if we quote you on that ?
/J\
--
Jonathan Stowe <jns@gellyfish.com>
<http://www.gellyfish.com>
Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: Sun, 21 Nov 1999 01:58:32 GMT
From: jampa@my-deja.com
Subject: Perl Security
Message-Id: <817jk7$bdl$1@nnrp1.deja.com>
Hi all!
I'm concerned about i problem that all of you had
or will have someday... perl security.
After search all over the net i find myself
totally blind in this subject.
Let's to my scenario:
A friend ask me to make a sort of member site for
him, so i started to use my "perl skills", i use
a textfile to keep the login and passwds (crypted
with crypt function) the file is on a "hidden
area" of my server, but my doubt is that possible
that some kind of hacker can get the file? or get
access to the members file?
Just to clarify all the content to the members
are generated by the script
Let me show an example:
Let's say that i have to files: 1.txt and 2.txt
in a protected/hidden directory, so after the
member give username and pass the script get the
files and show on the screen.
Is this a kind of protection? Am i on the right
way? or i'm totally screwed?
Thankx ... sorry for my poor english!
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: 21 Nov 1999 02:17:37 GMT
From: sholden@pgrad.cs.usyd.edu.au (Sam Holden)
Subject: Re: Perl Security
Message-Id: <slrn83elik.jba.sholden@pgrad.cs.usyd.edu.au>
On Sun, 21 Nov 1999 01:58:32 GMT, jampa@my-deja.com wrote:
>Hi all!
>I'm concerned about i problem that all of you had
>or will have someday... perl security.
>After search all over the net i find myself
>totally blind in this subject.
>Let's to my scenario:
I'm assumming you are referrring to a web thing, even though
you didn't say (which is why I assume it is web).
>A friend ask me to make a sort of member site for
>him, so i started to use my "perl skills", i use
>a textfile to keep the login and passwds (crypted
>with crypt function) the file is on a "hidden
>area" of my server, but my doubt is that possible
>that some kind of hacker can get the file? or get
>access to the members file?
There is no need to store the file in the web tree, thus the
only way for someone to access it is via a different protocol
(ftp, or telnet, or whatever) or a via a badly written CGI or
web server.
>Just to clarify all the content to the members
>are generated by the script
>Let me show an example:
>Let's say that i have to files: 1.txt and 2.txt
>in a protected/hidden directory, so after the
>member give username and pass the script get the
>files and show on the screen.
Again those files can be stored outside of the web tree.
>
>Is this a kind of protection? Am i on the right
>way? or i'm totally screwed?
You are much better off using the security providied by whatever your
'site' runs on.
If it is a web based thing, then reading the web server documentation and
setting up htaccess style security will be much easier, and much more
secure.
But that is best discussed or asked in a different newsgroup.
If you can't work it out from the docs, then ask in one of the
comp.infosystems.www.* groups.
--
Sam
About the only thing most people know about black holes is they are
black, and now we have stuffed that up
-- Dr Paul Francis (after reporting finding 'pink' holes)
------------------------------
Date: Sat, 20 Nov 1999 23:30:03 GMT
From: *@dragons.duesouth.net (Matthew Bafford)
Subject: Re: Search Engine
Message-Id: <slrn83eb7s.5t0.*@dragons.duesouth.net>
[Wrapping fixed, article rearranged to make more sense]
On Sat, 20 Nov 1999 14:23:38 -0800, Jaime Perez <jaimedp@pacbell.net>
enriched us with: [ Your reply belongs down ]
: Jaime Perez wrote: +----------------------------------+
: [some snipping done,|since Jaime can't]
: > I did all the code|but the program did not work.
: > +--+
: > The code is at:| http://jaime.laosb.org/cgi-bin/sitesearch.cgi
: > +----+
: > The code is supposed|to search stonehenge.com for the word the user
: > inputs. +---+
: > The problem is that when|the user inputs the stuff and submits the
: > forms, it does not work.|
: [more snipping done] |
: > Please advise me on what|I am doing wrong.
: [more snipping done] |
|
Here. <-------------------+
: For those of you that are not helping me with the program, I would
: appreciate it if you kept your comments to yourselves. I am a
: programmer!
Then you must realize how difficult it is to assimilate a new program.
We are not here to be shown random code and attempt to determine what
problems plague it.
: If I am using this list is because I thought lists like this are
: supposed to be helpful sources not places to start fights or redicule or
: mock people on the questions they post, in this case me!
It is a helpful source, if you do some work yourself.
: On the other hand, you are kind of person that instead of helping mocks
: others, then I suggest you go to comedy clubs. This place is for
: professionals like me trying to find solutions for not so evident
: problems.
We expect professionals to do some of the work themselves.
You see, we are not consultants. We are just people trying to help other
people.
Many people spend HOURS per day responding to clpm messages, ignoring
their families and their own jobs in an effort to help others.
Because of the amount of time it takes to respond to the hundreds of
posts each day, many people here limit the time they will spend on a
single message.
It's one thing for us to answer a post with a specific piece of code and
an expected/obtained result.
To have to download an entire program, install any modules it might need
that we don't have, run the program, debug the program, and then post the
results is too much to ask.
When you are paying someone, it's perfectly fine to walk in with that
sort of problem. I'm sure very few people in this group have received
any form of money for their assistance.
: Sincerely,
HTH, HAND,
: Jaime
--Matthew
------------------------------
Date: 21 Nov 1999 00:06:45 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Search Engine
Message-Id: <817d2l$93c$1@gellyfish.btinternet.com>
On Sat, 20 Nov 1999 14:23:38 -0800 Jaime Perez wrote:
> For those of you that are not helping me with the program, I would
> appreciate it if you kept
> your comments to yourselves. I am a programmer!
> If I am using this list is because I thought lists like this are supposed to
> be helpful sources not places to
> start fights or redicule or mock people on the questions they post, in this
> case me!
>
> On the other hand, you are kind of person that instead of helping mocks
> others, then I suggest
> you go to comedy clubs. This place is for professionals like me trying to
> find solutions for not so evident
> problems.
>
Forget it ! You have come here and told us that you have some code that
doesnt work and that it uses some modules : you havent shown us any code,
you havent shown us the fruits of any attempts at debugging you might
have made - if you want help then you have to make concessions to the
people you are asking for help : we are not blessed with the power of
remote debugging.
If your program isnt working then presumably there is something wrong with
it - if there is something wrong then this is generally due to some
detectable condition - you said you are using LWP::UserAgent - are you
printing out the status of your request for instance ?
Anyhow your little rant has probably blown any chance you had of getting
any help from those that are most qualified to do so - you've just got
to learn not to take yourself so seriously and you've got to understand
that it is *you* asking *us* for help and help for free to boot.
/J\
--
Jonathan Stowe <jns@gellyfish.com>
<http://www.gellyfish.com>
Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: Sun, 21 Nov 1999 01:02:15 +0100
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: Search Engine
Message-Id: <Pine.HPP.3.95a.991121005418.13424B-100000@hpplus01.cern.ch>
On Sat, 20 Nov 1999, Jaime Perez wrote:
> I am a programmer!
Really? Then here is a small exercise which may be instructive.
First, forget everything you already know about yourself. Now, read
exactly what you have posted here on this thread. Then, try to work
out what kind of a picture you have painted of your previous competence
and experience in programming.
On usenet you are nothing more than the picture that you paint of
yourself through your postings. As the old saying goes, "on Usenet
no-one knows that you're a dog".
> This place is for professionals like me trying to find solutions for
> not so evident problems.
Professionals pay a consultant for solutions.
This place is for people to participate in interactions on usenet terms.
Hard to say exactly what that is, but you kind of get to know it as you
tag along. When you deviate too far from the norms, you get ridiculed.
Don't worry about it too much - this isn't real life, we haven't a clue
about how you treat your children or whether you are kind to animals.
Have fun.
------------------------------
Date: Sat, 20 Nov 1999 18:48:42 -0800
From: John Iyezack <snapperhead_420NOsnSPAM@hotmail.com.invalid>
Subject: Time modules.
Message-Id: <004aa0e3.d8f5598f@usw-ex0102-016.remarq.com>
Why does none of the time modules support converting time in military
time ? They can go from 13:00 to 1:00 pm. But why not 1:00 pm to
13:00 ? Does anyone of any time modules that support this. I know its
a simple stupied easy thing. But, I would prefer seing it in a module.
* Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
The fastest and easiest way to search and participate in Usenet - Free!
------------------------------
Date: Sun, 21 Nov 1999 00:59:56 GMT
From: limbostar@my-deja.com
Subject: Re: Variable expansion in Perl?
Message-Id: <817g6b$94c$1@nnrp1.deja.com>
> $replace = qq/"$replace"/; # wrap it in double quotes for the
> # second round of evaluation.
> # or include the quotes in your file
> s/$pattern/$replace/gee;
That did the trick nicely, thanks.
> That is too selfish.
Is there a such thing as -too- selfish? :P
> You should fix that.
Yeah, it's a bug. Should be fixed by the next release.
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: 21 Nov 1999 04:40:39 GMT
From: simon@brecon.co.uk (Simon Cozens)
Subject: Re: What is a good book on Perl
Message-Id: <slrn83etu7.l88.simon@othersideofthe.earth.li>
Uri Guttman (comp.lang.perl.misc):
>the new johnson book from manning: elements of programming in perl (we
>need a nickname or an abbrev for that) is aimed at first time
>programmers. and as someone pointed out, you are mentioned in there as
>the author of the cpu crippling prime number regex.
There's my Beginning Perl, too, but that's mere vapourware at the
moment. Hell, I better get back to it.
--
Customer: "I'm running Windows '95."
Tech: "Yes."
Customer: "My computer isn't working now."
Tech: "Yes, you said that."
------------------------------
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 1448
**************************************