[12326] in Perl-Users-Digest
Perl-Users Digest, Issue: 5926 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Jun 8 22:07:23 1999
Date: Tue, 8 Jun 99 19:00:22 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Tue, 8 Jun 1999 Volume: 8 Number: 5926
Today's topics:
Re: Address Resolution Using Perl to Query Exchange (Sitaram Chamarty)
Re: Calling an applet from perl <David@spamoff.byrden.com>
Re: can i variably name an array? (Abigail)
Re: capture the output from screen?? (Sitaram Chamarty)
Re: Confused by configuraton file and 'use strict' (Tad McClellan)
Re: FAQ 5.15: How can I open a file with a leading "E<g tneff@pobox.com
Re: followup: taint checking problems (Sitaram Chamarty)
Re: fork for DNS lookup - help (Michael Fuhr)
Re: HELP:Hash mapping of subroutines with params (Tad McClellan)
Re: HELP:Hash mapping of subroutines with params <uri@sysarch.com>
Re: Hosting question... (Tad McClellan)
Re: Hosting question... <juex@my-dejanews.com>
Re: Hosting question... (Abigail)
Re: Hosting question... (Abigail)
Re: how can i do this? (Sitaram Chamarty)
Re: How write a perl program that connects to a remote (Abigail)
Re: Perl Expert Opinion on Million Size Hashes (Abigail)
Re: Perl on win32 <carvdawg@patriot.net>
Re: Perl on win32 <All@n.due.net>
Problem with Mac Perl and showtimes quodling@my-deja.com
Re: Problem with Mac Perl and showtimes (Avram Grumer)
Re: question on split <uri@sysarch.com>
Re: Regular Expresion (Tad McClellan)
Re: Regular Expresion (Abigail)
Re: Search a list for an element (Tad McClellan)
Re: Search a list for an element (Alastair)
Re: Sequently adding data to a hash with $x[x..x]??? (Andrew Allen)
Re: Syntax checking a Perl script (Abigail)
Re: The artistic license and perl: (Kai Henningsen)
Re: The artistic license and perl: (Kai Henningsen)
Using the Net::Ping Module <mcarpent@total.net>
Re: Web page redirect - Not working ?perl problem? Plse acisconsulting@my-deja.com
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 09 Jun 1999 01:39:09 GMT
From: sitaram@diac.com (Sitaram Chamarty)
Subject: Re: Address Resolution Using Perl to Query Exchange
Message-Id: <slrn7lr3jr.5t6.sitaram@diac.com>
On Mon, 7 Jun 1999 16:18:14 -0500, Michael J. McKinlay
<Mike.McKinlay@hboc.com> wrote:
>I've seen some hints and ideas floating around -- is there anyone actually
>using perl LDAP to query an Exchange server to resolve an address?
I use "ldapsearch", a neat little command line thingie, to grab
all the email addresses every Monday morning and populate my email
client (mutt)'s aliases file. Works great.
>We have an app on IIS that can generate SMTP mail, but you have to know the
Aaah! Now I see what you mean. Perhaps ldapsearch and its
associated tools will compile on NT...?
>proper address. Resolving the username against Exchange will give us the
>SMTP address.
>
>We could probably employ an ActiveX control here but want to stay within the
>confines of basic perl and HTML.
You are trying to stay within a sane environment in an insane O/S.
An O/S where the command line and scripting of any kind is such a
second-class citizen will not easily give up it's secrets :-)
If I'm wrong about this and someone says "this command will do it"
- hey at least I will have learned something!
Good luck.
------------------------------
Date: Wed, 09 Jun 1999 00:42:57 GMT
From: "David Byrden" <David@spamoff.byrden.com>
Subject: Re: Calling an applet from perl
Message-Id: <01beb211$185d2be0$8a867dc2@goyra>
Gerardo <greynaga@yahoo.com> wrote in article
<7jj8mv$lts$1@nnrp1.deja.com>...
> Hi there,
>
> I'm trying to call an applet from a perl script. I keep getting:
> "Applet Files class Files could not be loaded"
> This message doesn't tell me much, but I think that is not finding the
> applet.
>
> This is the way I'm calling it:
> .....
> print '<applet codebase="cgi-bin/test" code="Files.class"
> archive="gfiles.jar" width=600 height=250>';
> print '</applet>';
> .....
>
> I've tried putting absolute path in codebase, I have the .class and .jar
> files in cgi-bin/test.
Does your web server allow
browsers to read files from the cgi-bin/test
directory?
David
------------------------------
Date: 8 Jun 1999 19:40:27 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: can i variably name an array?
Message-Id: <slrn7lregb.q8.abigail@alexandra.delanet.com>
mikecard@my-deja.com (mikecard@my-deja.com) wrote on MMCVII September
MCMXCIII in <URL:news:7jj4r4$kbs$1@nnrp1.deja.com>:
&& hello
&&
&& is it possible to give an array an interpolated name?
&&
&& suppose i have
&&
&& $array_name = "mikes_array";
&&
&& now i want to use the scalar $array_name to create an array
&& @mikes_array.
Yes, you can, and it's explained in the manual under 'symbolic references'.
But why? Do you have the urge to do this when programming in C or Pascal
as well? Why is this question popping up 17 times a week?
&& i have looked in the books and in this ng and tried many different
Really? Did you really look with your eyes open? This question pops up
many times each week in this group.
&& things one of them being @$array_name (which i knew wouldnt work because
&& it was just too ugly).
You're utterly wrong. I bet you tried in the same way as you checked this
newsgroup: not at all.
Try: perl -le '$foo = "bar"; @$foo = 1 .. 4; print @bar'
&& is this possible or am i just dreaming.
It is possible, but you are dreaming. You really don't want to do this.
And read the FAQ to find out why you don't want to.
Abigail
--
sub _'_{$_'_=~s/$a/$_/}map{$$_=$Z++}Y,a..z,A..X;*{($_::_=sprintf+q=%X==>"$A$Y".
"$b$r$T$u")=~s~0~O~g;map+_::_,U=>T=>L=>$Z;$_::_}=*_;sub _{print+/.*::(.*)/s}
*_'_=*{chr($b*$e)};*__=*{chr(1<<$e)};
_::_(r(e(k(c(a(H(__(l(r(e(P(__(r(e(h(t(o(n(a(__(t(us(J())))))))))))))))))))))))
-----------== 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, 09 Jun 1999 01:39:14 GMT
From: sitaram@diac.com (Sitaram Chamarty)
Subject: Re: capture the output from screen??
Message-Id: <slrn7lr5ao.5t6.sitaram@diac.com>
On 04 Jun 99 03:27:26 GMT, UUCP
<UUCP@p1.f3.n500.z2.hccfido.hcc.nl> wrote:
>Let's say I write a perl script to "ping" some IP address.
>So, that I will get the the output that will display on screen.
>Do you know how can I capture that output and assign to $_ to do
>string matching??? Any example will be nice.
$_ = `ping host`;
More details in the fine manuals. Look for "backtick".
------------------------------
Date: Tue, 8 Jun 1999 14:57:03 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Confused by configuraton file and 'use strict'
Message-Id: <v1pjj7.uar.ln@magna.metronet.com>
John Olsen (J.Olsen@btinternet.com) wrote:
: I was trying to use a configuration file as shown in the Cookbook but
: it's not behaving the way I was expecting. The bit of code below shows
: what I was trying.
: #!perl
: use strict ;
: do 'config.cfg' ;
: print "varx is $varx\n" ;
: and in the 'config' file I have
: $varx = '$value_x' ;
: With 'use strict' in operation I get 'requires explicit package name'
: compilation errors
You should give the complete error message text.
The part you edited out is the part that might lead to a solution.
When I do it, I get:
Global symbol "$varx" requires explicit package name at ./test line 6.
^^^^^^^^^^^^^
Under use strict, you must declare any globals that you want
to have.
You want to have $varx be global, so you need to
use vars qw/$varx/;
Somewhere near the top of your program.
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Wed, 09 Jun 1999 00:16:35 GMT
From: tneff@pobox.com
Subject: Re: FAQ 5.15: How can I open a file with a leading "E<gt>" or t
Message-Id: <7jkbos$4l5$1@nnrp1.deja.com>
In article <B37D354396681448DB@204.112.166.88>, rlb@intrinsix.ca (Lee)
wrote:
> In article <3757be0b@cs.colorado.edu>,
> Tom Christiansen <perlfaq-suggestions@perl.com> wrote:
>
> >Annex Canada now! We need the room, and who's going to stop us?
> > --A Tom Neff .signature
>
> You tried it once before. Looking to have the White House burnt to the
> ground again? :)
The White House (and Capitol) did not burn to the ground, but suffered
extensive interior damage. Washington was not attacked by Canadians,
but by British redcoats: Admiral George Cockburn's veteran troops,
transferred from the Peninsula after Napoleon's defeat. (US forces had
rather stupidly burned York, Upper Canada's capital, alienating the
indifferent Ontario farmers and inviting reprisal, against which our
politically appointed generals were incompetent to mount a defense.)
If Canada expects similar help when we annex it in 2016, you'd better
start learning Mandarin now.
--
Tom Neff <tneff@pobox.com>
"Aphorisms are sprinkles on the cupcake of truth."
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Wed, 09 Jun 1999 01:41:04 GMT
From: sitaram@diac.com (Sitaram Chamarty)
Subject: Re: followup: taint checking problems
Message-Id: <slrn7lr5ni.5t6.sitaram@diac.com>
On Fri, 04 Jun 1999 16:47:06 GMT, Alan Young <alany@2021.com> wrote:
>I just changed _backtick_pwd to
>
>sub _backtick_pwd {
> my $cwd;
> my $tmppath = $ENV{PATH}
> $tmppath =~ /^(.*)$/;
> $tmppath = $1;
> $ENV{PATH} = $tmppath;
> chop($cwd = `pwd`);
> $cwd;
>}
>
>and got the same error message. I really don't want to run this
Since your newsreader seems to have lost the reference line, I
dont know what error message you refer to.
Since your script - as it stands - has a syntax error, I doubt
that you are running *precisely* this one.
Since it (almost[1]) works for me, you should probably post the
correct code.
[1] I get "Insecure $ENV{BASH_ENV} while running with -T switch at
aa.pl line 6." Adding "delete $ENV{BASH_ENV};" at the top fixes
that, and I see the result. Just FYI, here's my complete program:
[sitaram@ltsitaram sitaram]$ cat aa.pl
my $cwd;
my $tmppath = $ENV{PATH};
delete $ENV{BASH_ENV};
$tmppath =~ /^(.*)$/;
$tmppath = $1;
$ENV{PATH} = $tmppath;
chop($cwd = `pwd`);
print "cwd=$cwd\n";
[sitaram@ltsitaram sitaram]$ perl -T aa.pl
cwd=/home/sitaram
------------------------------
Date: 8 Jun 1999 18:49:22 -0600
From: mfuhr@dimensional.com (Michael Fuhr)
Subject: Re: fork for DNS lookup - help
Message-Id: <7jkdmi$qej@flatland.dimensional.com>
"kayec" <delete.the.nospam.kayec@gov.ns.ca> writes:
> To speed up DNS lookups i've split my list of IPs into 5 different files.
> Now i want to span five PERL programs to do the lookups.
> After the lookups are done i have to do more processing so i need to know
> when the five processes are done.
>
> I think i want to use FORK for this but am not clear on the syntax....
For an example of fast DNS lookups without forking, see the program
I posted a few months ago:
http://www.deja.com/getdoc.xp?AN=455581292&fmt=text
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
------------------------------
Date: Tue, 8 Jun 1999 15:25:53 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: HELP:Hash mapping of subroutines with params
Message-Id: <1oqjj7.9dr.ln@magna.metronet.com>
kgentes@gentek.net wrote:
: I am diligently reading my Perl Cookbook (good book
: btw- some buggy code, but very well organized and
: nicely filled out).. anyways- I found the following
: code snip. It does what I want, EXCEPT, I would like
: to have params passed in as well.
: but here is what I want to do
: in the call. Is this ok?
: ==============================================================
: if ($States{$page}) {
: $States{$page}->($myvariable, $yourvariable); # call the subroutine
: } else {
: no_such_page();
: }
: ==============================================================
WHWYTI?
(What Happened When You Tried IT)
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: 08 Jun 1999 21:05:31 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: HELP:Hash mapping of subroutines with params
Message-Id: <x7u2si5gkk.fsf@home.sysarch.com>
>>>>> "k" == kgentes <kgentes@gentek.net> writes:
k> I am diligently reading my Perl Cookbook (good book
k> btw- some buggy code, but very well organized and
^^^^^
what code are you referring to? show us where the bugs are. tom c and
gnat are most open to hearing about bugs in their book and would
immediately add them to the errata page. so let's see wht you have
found.
uri
--
Uri Guttman ----------------- SYStems ARCHitecture and Software Engineering
uri@sysarch.com --------------------------- Perl, Internet, UNIX Consulting
Have Perl, Will Travel ----------------------------- http://www.sysarch.com
The Best Search Engine on the Net ------------- http://www.northernlight.com
------------------------------
Date: Tue, 8 Jun 1999 15:02:34 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Hosting question...
Message-Id: <acpjj7.uar.ln@magna.metronet.com>
DevSys (info@devsys.net) wrote:
: Tad McClellan <tadmc@metronet.com> wrote in message
: news:4fhjj7.34r.ln@magna.metronet.com...
: > Rudi (MM@devsys.com) wrote:
: >
: > You are in the wrong newsgroup.
: >
: > You do not need a "hosting company" to program in Perl.
: Strange reaction !
Strange if you think that Perl and the WWW are joined at
the hip or something.
But they're not, so it isn't. :-)
I have been programming in Perl for several years, maybe 4
weeks worth of that was WWW related.
Perl does not equal CGI.
You do not need a "hosting company" to program in Perl.
: Sure you do if you want to use it on the www
If you want to use it on the WWW then you ask in a
newsgroup that has some connection to the WWW.
This newsgroup is not such a group.
These are though:
comp.infosystems.www.advocacy
comp.infosystems.www.announce
comp.infosystems.www.authoring.cgi
comp.infosystems.www.authoring.html
comp.infosystems.www.authoring.images
comp.infosystems.www.authoring.misc
comp.infosystems.www.authoring.site-design
comp.infosystems.www.authoring.stylesheets
comp.infosystems.www.authoring.tools
comp.infosystems.www.browsers.mac
comp.infosystems.www.browsers.misc
comp.infosystems.www.browsers.ms-windows
comp.infosystems.www.browsers.x
comp.infosystems.www.misc
comp.infosystems.www.servers.mac
comp.infosystems.www.servers.misc
comp.infosystems.www.servers.ms-windows
comp.infosystems.www.servers.unix
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Tue, 8 Jun 1999 17:40:41 -0700
From: "J|rgen Exner" <juex@my-dejanews.com>
Subject: Re: Hosting question...
Message-Id: <7jkd61$orr@news.dns.microsoft.com>
DevSys <info@devsys.net> wrote in message
news:7jk6qt$mb8$1@nickel.uunet.be...
>
> Tad McClellan <tadmc@metronet.com> wrote in message
> news:4fhjj7.34r.ln@magna.metronet.com...
> > Rudi (MM@devsys.com) wrote:
> >
> > You are in the wrong newsgroup.
> >
> > You do not need a "hosting company" to program in Perl.
>
> Strange reaction !
> Sure you do if you want to use it on the www and your ISP doesn't allow
> it....
But what does that have to do with programming in Perl? Why would you need
an ISP or the WWW to program in Perl? I can program Perl on my stand-alone
notebook just fine.
So, the question stands: what does your ISP problem has to do with Perl?
jue
--
J|rgen Exner
------------------------------
Date: 8 Jun 1999 20:11:45 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Hosting question...
Message-Id: <slrn7lrgb2.q8.abigail@alexandra.delanet.com>
Rudi (MM@devsys.com) wrote on MMCVII September MCMXCIII in
<URL:news:7jjuc4$e8c$1@nickel.uunet.be>:
<>
<> Would like some feedback about good hosting companies.
<> One of the features I would like is that they install modules on request and
<> setup Cron jobs on demand.
And your Perl question is.... ?
Abigail
--
%0=map{reverse+chop,$_}ABC,ACB,BAC,BCA,CAB,CBA;$_=shift().AC;1while+s/(\d+)((.)
(.))/($0=$1-1)?"$0$3$0{$2}1$2$0$0{$2}$4":"$3 => $4\n"/xeg;print#Towers of Hanoi
-----------== 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: 8 Jun 1999 20:12:28 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Hosting question...
Message-Id: <slrn7lrgcd.q8.abigail@alexandra.delanet.com>
DevSys (info@devsys.net) wrote on MMCVII September MCMXCIII in
<URL:news:7jk6qt$mb8$1@nickel.uunet.be>:
~~
~~ Tad McClellan <tadmc@metronet.com> wrote in message
~~ news:4fhjj7.34r.ln@magna.metronet.com...
~~ > Rudi (MM@devsys.com) wrote:
~~ >
~~ > You are in the wrong newsgroup.
~~ >
~~ > You do not need a "hosting company" to program in Perl.
~~
~~ Strange reaction !
~~ Sure you do if you want to use it on the www and your ISP doesn't allow
~~ it....
Silly boy.
Abigail
--
perl -we '$_ = q ;4a75737420616e6f74686572205065726c204861636b65720as;;
for (s;s;s;s;s;s;s;s;s;s;s;s)
{s;(..)s?;qq qprint chr 0x$1 and \161 ssq;excess;}'
-----------== 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, 09 Jun 1999 01:41:52 GMT
From: sitaram@diac.com (Sitaram Chamarty)
Subject: Re: how can i do this?
Message-Id: <slrn7lr65v.5t6.sitaram@diac.com>
On Tue, 08 Jun 1999 08:03:42 GMT, smnayeem@my-deja.com
<smnayeem@my-deja.com> wrote:
>I cant work out how to access each element of an array of array using
>two for loops.
>heres my code :
>1 my $header = [[a,b,c],[d,e,f],[g,h,i],[j,k,l]];
>2 for ($i = 0;$i <= $#$header; $i++) {
>3 for ($j = 0;$j <= $#[$header->[$i]];$j++) {
>4 print ($header->[$i][$j],"\t");
>5 }
>6 print "\n";
>7 }
> (please remove the line numbers)
>
>when i run it it shows :
>a
>d
>g
>j
Change
for ($j = 0;$j <= $#[$header->[$i]];$j++) {
to
for ($j = 0;$j <= $#{$header->[$i]};$j++) {
$# needs an array name or a listref in braces - that is, inside {
and }. All references work that way, not just $#.
------------------------------
Date: 8 Jun 1999 20:13:19 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: How write a perl program that connects to a remote Oracle database server without configuring any connections? NT
Message-Id: <slrn7lrge0.q8.abigail@alexandra.delanet.com>
Lim Chong Sun (chongsun@krdl.org.sg) wrote on MMCVII September MCMXCIII
in <URL:news:7jiqkl$914$1@godzilla.krdl.org.sg>:
\\ No text!
No answer!
Abigail
--
sub _'_{$_'_=~s/$a/$_/}map{$$_=$Z++}Y,a..z,A..X;*{($_::_=sprintf+q=%X==>"$A$Y".
"$b$r$T$u")=~s~0~O~g;map+_::_,U=>T=>L=>$Z;$_::_}=*_;sub _{print+/.*::(.*)/s}
*_'_=*{chr($b*$e)};*__=*{chr(1<<$e)};
_::_(r(e(k(c(a(H(__(l(r(e(P(__(r(e(h(t(o(n(a(__(t(us(J())))))))))))))))))))))))
-----------== 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: 8 Jun 1999 20:15:40 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Perl Expert Opinion on Million Size Hashes
Message-Id: <slrn7lrgib.q8.abigail@alexandra.delanet.com>
Ankur Narang (ankurn@Eng.Sun.COM) wrote on MMCVII September MCMXCIII in
<URL:news:7jk1dq$10u$1@engnews2.Eng.Sun.COM>:
&& Hi,
&& Can some Perl expert help me in answering these questions ?
&&
&& Is it possible to have 2 million node hashes in Perl without ending up
&& in "Out of memory!" messages ?
Yes, but you need to have the memory for it.
&& What are the limits on hash size and handling in Perl and how can we
&& get around such problems ? If we use keys() function on such a big-size
&& hash what problems can occur ?
Perl doesn't have build in limits for hash sizes. If your OS can give the
memory to Perl, Perl will handle it well.
&& Similarly what are the mem. issues with 2 million elements size
&& arrays and strings (like passing such an array as an argument to a function)
&& and how to get around them.
Perhaps you want to pass a reference to the array.
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: Tue, 08 Jun 1999 20:16:39 +0100
From: Marquis de Carvdawg <carvdawg@patriot.net>
Subject: Re: Perl on win32
Message-Id: <375D6C17.3B1B9F86@patriot.net>
Allan,
The only problem with your answer is that by default, NT doesn't
parse the autoexec.bat file. For completeness, you should also tell
which Registry key needs to be set.
Of course, it's probably easy just to check the environment variables
in the System icon in Control Panel, don't you think?
Allan M. Due wrote:
> Ken Flannigan wrote in message <7jjj00$e8u$1@louie.disney.com>...
> :I am trying to set up my environment on my NT box at work for running Perl
> :scripts at the command line. In the Perl book I bought, there's a setting
> :for the pathext environment variable where you set it to
> :pathext=%pathext%;.plx
> :
> :This works fine for the current dos box that's open. The problem is when
> you
> :close the dos box and then open a new dos session, the pathext is back to
> :the original setting.
>
> Put it in your autoexec.bat file.
>
> HTH
>
> AmD
>
> --
> $email{'Allan M. Due'} = ' All@n.Due.net ';
> --random quote --
> 'Out, out brief candle!
> Life's but a walking shadow,
> a poor player, that struts and frets his hour upon the stage,
> And then is heard no more; It is a tale, told by an idiot,
> full of sound and fury, signifying nothing'
> - MacBeth
------------------------------
Date: Wed, 09 Jun 1999 01:32:37 GMT
From: "Allan M. Due" <All@n.due.net>
Subject: Re: Perl on win32
Message-Id: <Vuj73.11025$mu5.4202@news.rdc1.ct.home.com>
Marquis de Carvdawg <carvdawg@patriot.net> wrote in message
news:375D6C17.3B1B9F86@patriot.net...
: Allan,
:
: The only problem with your answer is that by default, NT doesn't
: parse the autoexec.bat file. For completeness, you should also tell
: which Registry key needs to be set.
:
: Of course, it's probably easy just to check the environment variables
: in the System icon in Control Panel, don't you think?
I should know better by now than to post about issues on topics for which
I have no firsthand experience. Thanks for the edification, it is
appreciated.
AmD
PS I find it hard to quibble after being wrong but it is generally
considered inappropriate to stealth CC a person - for obvious reasons.
--
$email{'Allan M. Due'} = ' All@n.Due.net ';
--Random Quote--
Numbers are tools, not rules.
Ashley-Perry Statistical Axioms[0]
------------------------------
Date: Tue, 08 Jun 1999 22:20:52 GMT
From: quodling@my-deja.com
Subject: Problem with Mac Perl and showtimes
Message-Id: <7jk4vp$2aa$1@nnrp1.deja.com>
I am installing MAC Perl, on my G3/300 Powerbook. running 8.5.1 And I am
a little confused about setting it up.
The reason for installing Perl is to run showtimes (from
http://jrray.visionart.com/showtimes/showtimes.html
This is a movie download. It uses a Perl Script called getdata.pl, and
from my debugging so far, it appears to need the lwp (libwww-perl) and
URI components.
I found the lwp and installed it, and also the URI Stuff, but I am not
sure that I have installed it correctly.
Initially I was getting the following error message.
# Can't locate object method "proxy_authorization_basic" via package
"HTTP::Headers".
File 'Macintosh HD:MacPerl :lib:HTTP:Message.pm'; Line 172
Grabbing URL 1 of 3 from au.yahoo...
With a Bit of investigation, I determined that this was related to the
lwp (lib-www-perl), which I put in a directory, and then under macperl,
edit pulldown menu, preferences, Libraries, And then add a path to
Macintosh HD:Desktop Folder:wwwperl:X86:blib: lib: (IS this the right
place to put it, or does it belong somewhere under the
The error message now changes to
500 # Can't locate auto/URI/URL/http/authority.al in @INC.
File 'Macintosh HD:MacPerl :lib:AutoLoader.pm'; Line 38
File 'Macintosh HD:Desktop
Folder:wwwperl:x86:blib:lib:LWP:Protocol:http.pm'; Line 111. This looks
like it's now failing on the URI component,. I have installed it (I am
again unsure of the right location. ) using the add path feature, but
that doesn't fix the problem. ..
I get the impression that I need to locate correctly the two additional
modules, - LWP and URI are the key components but I can't get a clear
indication from any of the documentation as to where these are to be
located. Any ideas? Has anyone managed to get showtimes working with a
Mac?
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Tue, 08 Jun 1999 20:50:53 -0400
From: avram@grumer.org (Avram Grumer)
Subject: Re: Problem with Mac Perl and showtimes
Message-Id: <avram-0806992050540001@manhattan.crossover.com>
In article <7jk4vp$2aa$1@nnrp1.deja.com>, quodling@my-deja.com wrote:
> I am installing MAC Perl, on my G3/300 Powerbook. running 8.5.1 And I am
> a little confused about setting it up.
>
> The reason for installing Perl is to run showtimes (from
> http://jrray.visionart.com/showtimes/showtimes.html
Thanks for pointing this out. It looks like a spiffy program.
> This is a movie download. It uses a Perl Script called getdata.pl, and
> from my debugging so far, it appears to need the lwp (libwww-perl) and
> URI components.
>
> I found the lwp and installed it, and also the URI Stuff, but I am not
> sure that I have installed it correctly.
Did you edit getdata.cfg the way it says to?
> Initially I was getting the following error message.
>
> # Can't locate object method "proxy_authorization_basic" via package
> "HTTP::Headers".
> File 'Macintosh HD:MacPerl :lib:HTTP:Message.pm'; Line 172
> Grabbing URL 1 of 3 from au.yahoo...
I didn't have any problems like this. I snooped around on Yahoo to find
the right URLs to use, entered them in the getdata.cfg file along with the
path to my Palm installation folder, and let it run. I got an "out of
memory" error, so I gave MacPerl another meg to play around with, and the
second time it worked fine. (I haven't actualy gotten around to doing a
HotSync, so I don't know yet if everything works, but the Perl script
appears to be working smoothly.)
> I get the impression that I need to locate correctly the two additional
> modules, - LWP and URI are the key components but I can't get a clear
> indication from any of the documentation as to where these are to be
> located. Any ideas? Has anyone managed to get showtimes working with a
> Mac?
I'm using a Mac. And I'm pretty sure that both URI and LWP came with my
MacPerl distribution, that they aren't things I had to install on my own.
--
Avram Grumer | Any sufficiently advanced
Home: avram@bigfoot.com | technology is indistinguishable
http://www.bigfoot.com/~avram/ | from an error message.
------------------------------
Date: 08 Jun 1999 21:08:04 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: question on split
Message-Id: <x7pv365ggb.fsf@home.sysarch.com>
>>>>> "s" == sceenu <sceenu@hotmail.com> writes:
s> Could some kind soul help me out with a question I have about "split"?
s> I have the following script that I am trying to run on Solaris 2.6 in
s> Bourne shell.
so what is your perl question?
s> $AWK -v dbname=$DBNAME -v this_day=$THIS_DAY `{
<snip awk>
s> when I try to run this script it is giving error on 'split'...
s> Could someone please explain what exactly this code piece is doing and
s> why is it a problem with 'split'?
s> Is split in this code piece a 'perl' call?
how could it be a perl call if you are running awk?
and why did you think we handle awk questions?
uri
--
Uri Guttman ----------------- SYStems ARCHitecture and Software Engineering
uri@sysarch.com --------------------------- Perl, Internet, UNIX Consulting
Have Perl, Will Travel ----------------------------- http://www.sysarch.com
The Best Search Engine on the Net ------------- http://www.northernlight.com
------------------------------
Date: Tue, 8 Jun 1999 15:05:56 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Regular Expresion
Message-Id: <kipjj7.uar.ln@magna.metronet.com>
Bob Trieger (sowmaster@juicepigs.com) wrote:
: [ courtesy cc sent by mail if address not munged ]
:
: Tom Lynch <tlynch@cisco.com> wrote:
: > foo\/foo_bar\/foobar\[15\]/foo
^^
^^
^^
: >
: > Note: the tailing /foo no longer contains
: > a backslash. I've tried:
: you're trying too hard.
But you're not trying hard enough. :-)
: Why not just say that you want to put a
: backwhack in front of your slashes?
Because that isn't what he wants to do.
heh, heh.
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: 8 Jun 1999 20:26:38 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Regular Expresion
Message-Id: <slrn7lrh6u.q8.abigail@alexandra.delanet.com>
Bob Trieger (sowmaster@juicepigs.com) wrote on MMCVII September MCMXCIII
in <URL:news:7jk6k6$np3$1@oak.prod.itd.earthlink.net>:
__ [ courtesy cc sent by mail if address not munged ]
__
__ Tom Lynch <tlynch@cisco.com> wrote:
__ >Greetings:
__ >
__ > I have the line:
__ >
__ > foo/foo_bar/foobar\[15\]/foo
__ >
__ > I need the line to look like:
__ >
__ > foo\/foo_bar\/foobar\[15\]/foo
__ >
__ > Note: the tailing /foo no longer contains
__ > a backslash. I've tried:
__ >
__ > $_ =~ s#(/).*/.*$#\\/#;
__ >
__ > Mistakenly thinking the ancore would take
__ > care of the match. Does anyone have a
__ > regular expression which would work here?
__
__ you're trying too hard. Why not just say that you want to put a
__ backwhack in front of your slashes?
__
__ s!/!\\/!g;
Because that's not what he wants. Read the part where he calls your
attention by saying "Note".
1) s{/(?=.*/)}{\\/}g;
2) s{/}{\\/}g; s{(.*)\\/}{$1/};
Abigail
--
perl -weprint\<\<EOT\; -eJust -eanother -ePerl -eHacker -eEOT
-----------== 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: Tue, 8 Jun 1999 15:19:15 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Search a list for an element
Message-Id: <jbqjj7.9dr.ln@magna.metronet.com>
Aaron Ginn (rp2885@email.sps.mot.com) wrote:
: Is there a function which will parse a list for a specific value,
: similar to how 'exists' works for hashes? I haven't found anything in
: the camel book that looks like this. I have a solution for this, but I
: would like to use a function that works this way if it exists.
Perl FAQ, part 4:
"How can I tell whether a list or array contains a certain element?"
: Thanks,
Uh huh.
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Wed, 09 Jun 1999 00:34:11 GMT
From: alastair@calliope.demon.co.uk (Alastair)
Subject: Re: Search a list for an element
Message-Id: <slrn7lrh7v.5g.alastair@calliope.demon.co.uk>
Aaron Ginn <rp2885@email.sps.mot.com> wrote:
>Is there a function which will parse a list for a specific value,
>similar to how 'exists' works for hashes?
I think you're after 'grep'.
HTH.
--
Alastair
work : alastair@psoft.co.uk
home : alastair@calliope.demon.co.uk
------------------------------
Date: 9 Jun 1999 00:04:28 GMT
From: ada@fc.hp.com (Andrew Allen)
Subject: Re: Sequently adding data to a hash with $x[x..x]???
Message-Id: <7jkb2c$n70$1@fcnews.fc.hp.com>
Mats Pettersson (mats.pettersson@falukuriren.se) wrote:
: Hi!
: I'm trying to sequently load a row of data into a hash array, like...
: while(<FILE>) {
: chomp;
: @line_of_data = split(/\,/); // Split data with ','.
: %hash_array = @line_of_data[2..6]; // Add a line of data into the hash.
: }
Well, you're putting five elements into %hash_array, which doesn't
make much sense, as a hash expects key=>value pairs. But you could
try
@hash_array{@line_of_data[2,4,6]}=@line_of_data[3,5,7];
or even
%hash_array=(%hash_array,@line_of_data[2..7]);
Note that you'll replace existing keys with these operations. This
whole operation looks fishy, though. You might get a more useful
answer by explaining what your data looks like, and what you're
_really_ trying to do with it.
Andrew
------------------------------
Date: 8 Jun 1999 20:27:27 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Syntax checking a Perl script
Message-Id: <slrn7lrh8f.q8.abigail@alexandra.delanet.com>
Erich Douglass (erd@rsn.hp.com) wrote on MMCVII September MCMXCIII in
<URL:news:Pine.GHP.4.05.9906081653320.4366-100000@medalion.rsn.hp.com>:
;; I'd like to syntax check a perl file before i execute it, but i need more
;; functionality than 'perl -c'. I would like to check for any sort of
;; statement that might cause a run-time error (refrences to functions that
;; don't exist, etc...) without actually running the file. Any ideas...
Halting Problem.
Abigail
--
perl -wlpe '}$_=$.;{' 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: 08 Jun 1999 22:17:00 +0200
From: kaih=7ITSyArmw-B@khms.westfalen.de (Kai Henningsen)
Subject: Re: The artistic license and perl:
Message-Id: <7ITSyArmw-B@khms.westfalen.de>
rra@stanford.edu (Russ Allbery) wrote on 06.06.99 in <yl3e04veqi.fsf@windlord.stanford.edu>:
> Russ Allbery <rra@stanford.edu> writes:
>
> > I've mailed Bruce Perens, Russ Nelson, and sent another message to Eric
> > Raymond on the subject.
>
> The response of both Bruce Perens and Russ Nelson was that per-usage fees
> are not specifically ruled out in the OSD but that no license that had
> such a provision would be granted the certification mark, and that the OSD
> is a set of guidelines rather than a strict legal document.
>
> Which makes sense to me.
Makes sense to me, too.
Kai
--
http://www.westfalen.de/private/khms/
"... by God I *KNOW* what this network is for, and you can't have it."
- Russ Allbery (rra@stanford.edu)
------------------------------
Date: 08 Jun 1999 22:17:00 +0200
From: kaih=7ITSyUi1w-B@khms.westfalen.de (Kai Henningsen)
Subject: Re: The artistic license and perl:
Message-Id: <7ITSyUi1w-B@khms.westfalen.de>
gbartels@xli.com (Greg Bartels) wrote on 07.06.99 in <375BF89D.233E100D@xli.com>:
> The Artistic license, meets the open source definition, if I remember,
It's specifically listed as an example :-)
Kai
--
http://www.westfalen.de/private/khms/
"... by God I *KNOW* what this network is for, and you can't have it."
- Russ Allbery (rra@stanford.edu)
------------------------------
Date: Tue, 08 Jun 1999 20:05:01 -0400
From: Mathieu Carpentier <mcarpent@total.net>
Subject: Using the Net::Ping Module
Message-Id: <375DAFAD.B0907BB9@total.net>
Hi,
I would like to use the Net::Ping module to ping hosts and retrieving
stats of the response time. How can I get the minimu, the maximum and
the average response time.
Thanks.
------------------------------
Date: Tue, 08 Jun 1999 23:15:34 GMT
From: acisconsulting@my-deja.com
Subject: Re: Web page redirect - Not working ?perl problem? Plse help!
Message-Id: <7jk86f$3f3$1@nnrp1.deja.com>
In article <3745E430.AC15359E@oz.net>,
"Kira S. Anastasia" <kirasa@oz.net> wrote:
> Hi Eric and thanks!
>
> > "Kira S. Anastasia" wrote:
> > > What I am *trying* to do: Take input from an HTML form,
> > > process the data and generate a new page and THEN go to it
> > > when the script finishes. Everything works, but the
> > > re-direct doesn't.
> > >
> > >
> > > Sigh, *what* have I missed here?
> >
> > Your script has output a complete Content-type header before your
> > Location header - and that's why you see the Location header in the
> > browser window.
>
> Sigh :-)...
>
> Just tried Janes suggesion above - no change.
>
> Then removed that and checked the source and I am *not*
> putting out any content type header at all.
>
> Starting to wonder if I don't have some other problem, I'm
> really confused / perplexed.
>
> THanks & Take care, Kira.
> --
> Respectfully, Kira Anastasia, kirasa@oz.net
> Without adventure, civilization is in full decay. Alfred
> Whitehead
>
Hi Kira, and All
Did you ever solve this problem? I am curious because I have a similar
problem.
My print("Location: $url\n\n") is actually printing the url name on the
browser window instead of redirecting to the specified url and showing
the page.
The funny thing is, I have another CGI that is interpreting this
statement and working correctly.
The main difference is that this CGI has
print "Content-type: text/html\n\n"; near the top of the program. The
one that is working doesn't have Content-type specified.
Any suggestions greatly appreciated...
Cheers
Efrem
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: 12 Dec 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Special: Digest Administrivia (Last modified: 12 Dec 98)
Message-Id: <null>
Administrivia:
Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing.
]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body. Majordomo will then send you instructions on how to confirm your
]subscription. This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V8 Issue 5926
**************************************