[9814] in Perl-Users-Digest
Perl-Users Digest, Issue: 3407 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Aug 10 15:08:04 1998
Date: Mon, 10 Aug 98 12:00:23 -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 Mon, 10 Aug 1998 Volume: 8 Number: 3407
Today's topics:
Re: $form_data{'$variable'} question <robmoral@cisco.com>
Re: [Q] Problems building perl 5.004_4 on SGI (I R A Aggie)
Re: Access, ODBC and Linux <thaynes@openlinksw.co.uk>
Re: c2a: A bash prompt design helper <foltzj@timken.com>
Re: Can't make flock work as described... <grant.griffin@nospam.com>
Re: comp.lang.perl.announce redux <jdporter@min.net>
Re: Help Help Please Help ! <rick.delaney@shaw.wave.ca>
How to extract HTTP headers sent by a browser that use techbull@mailexcite.com
Re: Is this an unstable version? (Joe McMahon)
oraperl ==> perl5 + DBI + DBD <dan@ukonline.net>
os/2, modules, filenames <dummy@bloodgate.com>
Re: perl -w compile and run time checking <r.goeggel@atos-group.de>
Re: perl 5.005: Binary Distribution for Win32? (Dane Jackson)
PERL and HTACCESS <sme@planetpod.com>
Re: PERL and HTACCESS (brian d foy)
Re: Perl Docs.. forget the original post (Dave Till)
Re: Perl, http and save (brian d foy)
Re: perlfaq - frequently asked questions about Perl (pa <uri@sysarch.com>
Re: Possible bug in RE handling - NOT a bug in Perl (John D. Hardin)
Re: pretty perl editor for linux <qcoldiron@yahoo.com>
Re: Search Engine (John Heidemann)
Self-printing code <robin.houston@guardian.co.uk>
Re: Self-printing code <robin.houston@guardian.co.uk>
Re: Self-printing code <merlyn@stonehenge.com>
SSI Perl Script <victor@hrmarketing.com>
Re: SSI Perl Script (brian d foy)
Re: strings <r.goeggel@atos-group.de>
Re: Test Results - Asking a question <jdporter@min.net>
UserAdmin Module under new Activestate Build <kvietmei@mines.edu>
Re: variable interpolation (Mike Stok)
Re: What is the purpose of Perl <jdporter@min.net>
Re: What is the purpose of Perl tigger@io.nospaam.com
Re: What is the purpose of Perl <merlyn@stonehenge.com>
Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 10 Aug 1998 12:50:10 -0400
From: Roberto Morales <robmoral@cisco.com>
To: bfredett@my-dejanews.com
Subject: Re: $form_data{'$variable'} question
Message-Id: <35CF24C2.85851D76@cisco.com>
You should use semicolons:
for($i=1;$i<=$total;$i++)
HTH - Roberto
bfredett@my-dejanews.com wrote:
>
> Greetings.
>
> I have a form with several text fields. These fields are named
> editcol1,editcol2,editcol3 ... and so on.
>
> I want to check if these fields are blank, if they are not then the value of
> $new_data will equal the value of $form_data{'editcoln'} ... where n is the
> number 1,2,3...
>
> I am trying to set this up in a loop such as:
>
> for($i=1,$i<=$total,$i++) { # $total is set earlier
> $new_data = $form_data{'editcol$i'};
> } /|\
> |
> |
> Most likely the trouble is ---| I can't get the $i to
> work inside the $form_data.
>
> Any suggestions?
>
> Thanks,
> Brian
>
> -----== Posted via Deja News, The Leader in Internet Discussion ==-----
> http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: Mon, 10 Aug 1998 13:31:04 -0500
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: [Q] Problems building perl 5.004_4 on SGI
Message-Id: <fl_aggie-1008981331040001@aggie.coaps.fsu.edu>
In article <6qn2n7$jqh$2@info.uah.edu>, Greg Bacon <gbacon@cs.uah.edu> wrote:
+ % perl -V
+ Summary of my perl5 (5.0 patchlevel 5 subversion 0) configuration:
+ Platform:
+ osname=irix, osvers=6.2, archname=IP22-irix
+ uname='irix mork 6.2 06101030 ip22 '
+ cc='cc -n32', optimize='-O3', gccversion=
How in blazes did you get this to work? Ok, I'm convinced we have a
"non-standard" installation of...well, something -- Configure can't find the
'cc -n32', so I'm forced back into using 'cc -32'. Configure can at
least complete.
It completes, it starts the 'make' process, then barfs on the contents
of perlvars.h. :( So, until I can figure out what, exactly, is the problem,
I'm stuck with 5.004_4. I get junk like:
cfe: Error: ./perlvars.h, line 51: Syntax Error
extern U16 PL_##Gop_seqmax;
------- ---------^
Of course, I'm half convinced our BOFH should just trash the contents
of / on our big machines and do a clean install of irix 6.2. Its pretty
obvious to me that something is broken, and it ain't the perl installation
process...
+ IRIX sucks, and I can't wait for the Linux port! :-)
Heh. The Configure/make/make test/make install takes less time on my
linux box at home than it does on our biggest, meanest, fastest 4
processor SGI (IP25)...
James - ok, single user vs. multi-user, 1 300 mHz Pentium II vs. 4 196 mHz
R10k's, 64 mb vs. 1gb of memory...
------------------------------
Date: Mon, 10 Aug 1998 16:45:47 GMT
From: Tim Haynes <thaynes@openlinksw.co.uk>
Subject: Re: Access, ODBC and Linux
Message-Id: <6qn83r$rq2$1@nnrp1.dejanews.com>
Hi,
IS going to happen!
OpenLink do exactly this: we take your existing ODBC driver connections (using
the native Access driver) and enable connections over respectable TCPIP
networks using our ODBC Agent.
Try browsing around http://www.openlinksw.com/ .
Regards,
~Tim
In article <35cb3935.0@news.new-era.net>,
scott@softbase.com wrote:
> Stiphane Dupille (sdupille@yahoo.com) wrote:
>
> > I try to access Access database on WinNT from a linux
> > workstation.
>
> Isn't going to happen. Access is not a database like Oracle and DB2
> which can be accessed over a network. Access is a single-machine
> small-time database not meant for client/server applications. (That
> doesn't stop people from *thinking* Access is capable of doing more
> than it does, but anyone who tries to use it for anything other than a
> mailing list will quickly discover the truth!)
>
> Going backwards, from a server platform like UNIX to a client platform
> like Windows, is bizarre and unnatural. It can only be done at great
> expense and pain using middleware. Access can't even be used over a
> normal network -- a database file can be shared on a Microsoft
> Networking peer-to-peer network, but Access is not capable of being a
> network server.
>
> I've never used this DBD-ODBC stuff, but I know it can't possibly be an
> ODBC driver that can connect to databases without an ODBC driver.
> There's no way.
>
> Scott
> --
> Look at Softbase Systems' client/server tools, www.softbase.com
> Check out the Essential 97 package for Windows 95 www.skwc.com/essent
> All my other cool web pages are available from that site too!
> My demo tape, artwork, poetry, The Windows 95 Book FAQ, and more.
>
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: Mon, 10 Aug 1998 17:30:49 -0000
From: "Jim Foltz" <foltzj@timken.com>
Subject: Re: c2a: A bash prompt design helper
Message-Id: <01bdc484$a116e000$9c0ab993@foltzj-w95.timken.com>
John Porter <jdporter@min.net> wrote in article <35CB5055.3EA2@min.net>...
>
> Hey, you might also be interested in the Term::AnsiColor module
> available on CPAN.
>
> --
> John Porter
>
Thanks John,
I will have a look at it.
Also, thanks for the help with Jotto, it's working great.
------------------------------
Date: Mon, 10 Aug 1998 13:00:42 -0500
From: Grant Griffin <grant.griffin@nospam.com>
Subject: Re: Can't make flock work as described...
Message-Id: <35CF354A.9F2AA262@nospam.com>
Todd B wrote:
> i have noticed that several of the "high profile" users in this group appear
> to be very short on patience and long on rudeness.
>
> i keep reading very curt, offensive replies, which appear to be building up
> the egos of the senders, and making the rest of us feel stupid.
Careful, now: you might hurt Tom C.'s feelings!
=g2
------------------------------
Date: Mon, 10 Aug 1998 13:13:34 -0400
From: John Porter <jdporter@min.net>
Subject: Re: comp.lang.perl.announce redux
Message-Id: <35CF2A3E.38E8@min.net>
Grant Griffin wrote:
>
> Do you think it is too late to send back my "Webster's New World
> Dictionary of the AMERICAN LANGUAGE" which I have had for twenty years?
> ;-)
Yes, but it's not too soon to throw it out. It should be
"Webster's Old World Dictionary of the American Language".
:-)
--
John Porter
------------------------------
Date: Mon, 10 Aug 1998 18:36:55 GMT
From: Rick Delaney <rick.delaney@shaw.wave.ca>
Subject: Re: Help Help Please Help !
Message-Id: <35CF3F35.DB1B69D3@shaw.wave.ca>
John Porter wrote:
>
> Rick Delaney wrote:
> >
> > @xx = map $_ x 2, @x;# should be a bit faster
>
> Not only is it not faster (according to your benchmark),
> but it is wrong. That produces
> ('00','11','22','33','44','55')
>
> You meant to say ($_) x 2
Actually, I was thinking of the problem only in terms of printing
"001122334455" at the end, in which case the intermediate array need not
contain (0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5).
Your point is well taken though, since the original poster probably
wanted a "doubled" array for more than just printing.
> The parens confuse map a little, so you'd need to
> leave in the parens that Neil had; thus:
>
> @xx = map( ($_) x 2, @x );
>
The nice thing about this is that the '2' can be generalized to any
desired value.
--
Rick Delaney
rick.delaney@shaw.wave.ca
------------------------------
Date: Mon, 10 Aug 1998 16:51:11 GMT
From: techbull@mailexcite.com
Subject: How to extract HTTP headers sent by a browser that use SSL?
Message-Id: <6qn8du$tv1$1@nnrp1.dejanews.com>
Hi there,
I am trying to write a script to fetch information stored
on a web server that use SSL (instead of using the browser).
I am basically trying to simulate the browser action from
the perl script. I have installed all the SSLeay perl module.
For non-SSL pages, I can run a proxy server and track down
the HTTP headers sent, however this won't work for SSL pages
which is encrypted after being sent out.
My question is, short of hacking the browser code and print
out the HTTP headers, is there any tools that I can readily
use to print out the HTTP headers sent out by a browser to
a web page using SSL?
thanks,
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: Mon, 10 Aug 1998 13:58:44 -0400
From: joe.mcmahon@gsfc.nasa.gov (Joe McMahon)
Subject: Re: Is this an unstable version?
Message-Id: <joe.mcmahon-1008981358440001@prtims.stx.com>
In article <35cd357b.0@news.mediacity.com>, "Philip Thomas"
<phil@aireus.net> wrote:
>Hello all,
>
>I just need to know is this an unstable version, and if so would it be
>recommend to upgrade to version 5 asap ?
>
>kids2@home001>perl -v
>
>This is perl, version 4.0
>
Unstable, no. Full of interesting security holes, yes.
--- Joe M.
------------------------------
Date: Mon, 10 Aug 1998 18:48:09 +0100
From: "Dan Hopkins" <dan@ukonline.net>
Subject: oraperl ==> perl5 + DBI + DBD
Message-Id: <6qnbpf$gl8$1@morse.news.easynet.net>
We've recently been moving a bunch of oraperl scripts over to a AIX 4.1.3
box blessed with Perl 5.004. Most of the scripts have been happily converted
to Perl 5 using the DBI (v0.93) and DBD::Oracle v0.46 module to emulate
oraperl.
Unfortunately, most (if not all) of the calls to ora_bind() seem to fall
over for no apparent reason. Replacing ora_open() and ora_bind() pairs with
ora_do() 's seems to work quite happily.
Just wondered if anyone else had come across this problem (with a solution
:-)
Cheers,
Dan.
------------------------------
Date: Mon, 10 Aug 1998 19:25:51 +0100
From: Tels <dummy@bloodgate.com>
Subject: os/2, modules, filenames
Message-Id: <35CF3B2F.5810@bloodgate.com>
Hi,
is there a newer (than 5.002) port for OS/2? hobbes.mnsu.edu has only
5.002, and the CPAN dir is empty! if not, what do i need o get it ported
and where do i get the source code to do this?
I try to build a program using md5. since perl seems to be the only
language where i can traverse entire filetrees on many platforms without
custom tailored code, i choose perl. (and because the entire program is
only 100 lines long, thank to regular expressions :-)
is there a newer md5 module than 1996 and preferable a perl-only
version, so that a user doesnt have to compile/install the md5 module?
(running speed doesnt matter)
my program should run on many platforms as possible, i would like to get
it as "out-of-the-box" solution.
linux is no problem, except that the user has to compile/install the MD5
module and this is hairy (even for me, i had to copy manually some files
to make it work, the average user will not be able to do that) linux
would be able to read os/2 and ntfs partitions as well as win95.
os/2: i cannot install the md5 module. the makemake.pl is simple
missing. I found a replacement package, and copied it over, then tweaked
around and copied some missing files from a linux box. now i can fire up
the md5 compile, but it fails because the perl.h and other source code
files are missing and the config.pl is entirely wrong. the configure.pl
on the os/2 part is simple missing. perldoc is missing, too.
dos: i could make a dos boot floppy with dos perl and md5 preinstalled.
would be very nice, but the dos version will not see long filenames on a
win95 FAT partition, right? and i think it is not possible to install
modules on a dos perl version.
win95: making a win95-perl boot disk would work for dos and win95, but
does it fit on one floppy? and it wouldnt see os/2 or linux
partitions...
can anybody enlighten me what course is best for this project? thanx!
Regards,
Tels
--
!! DONT reply to dummy@bloodgate.com !!
Design & Coding: http://bloodgate.com/
You can reach me per mail as "tels".
"Torture helps you pass the time until you die."
------------------------------
Date: Mon, 10 Aug 1998 18:14:28 +0200
From: "Ronald Gvggel" <r.goeggel@atos-group.de>
Subject: Re: perl -w compile and run time checking
Message-Id: <6qn6c3$pn5$1@news.pop-stuttgart.de>
RonaldWS schrieb in Nachricht
<1998080919214600.PAA18403@ladder01.news.aol.com>...
>The following short code snippet
>
>$x = 1;
>$y = ${ 'x' };
>print "$y\n";
>
>yields the following error when run with perl -w
>
>Name "main::x" used only once: possible typo at c:\temp.pl line 1.
>
>This is understandable in terms of perl doing compile time error
>detection but does not really appear to be desireable behavior.
>
>Is there any way to control perl's selection of warnings (eg turn
>them off as with some 'C' compilers. Can this be construed as
>a bug?
>
You can swith the -w on or off. In addition you can include "use
diagnostics;" to get more information.
If you don't like the upper warning: just double the first line.
$x=1;
$x=1;
or if you "use strict;":
use vars qw($x);
HTH
------------------------------
Date: 10 Aug 1998 16:58:01 GMT
From: dpj@ddt.occ.uc.edu (Dane Jackson)
Subject: Re: perl 5.005: Binary Distribution for Win32?
Message-Id: <6qn8qp$1f9$1@malgudi.oar.net>
: Michael Schilli wrote:
:
: > Hi 5.005 gurus,
: >
: > I understand 5.005 compiles well on Win32 - but since I don't have a C
: > Compiler on my Windows box: is there a binary distribution for Win32?
Also, If you want a freeware compiler (though I understand the joys of
just getting a working binary from someone else), www.cygnus.com has a freeware
compiler available. Perl 5.005 has directions for using it also.
--
Dane Jackson - zuvembi@mindless.com
"Never draw fire; it irritates the people around you."
------------------------------
Date: Mon, 10 Aug 1998 11:11:39 -0700
From: Stewart Eastham <sme@planetpod.com>
Subject: PERL and HTACCESS
Message-Id: <35CF37D9.A2317D8C@planetpod.com>
I am trying to get a user through a .htaccess protected directory
through PERL. (i.e. I want to have the user enter their name and
password into a HTML form instead of the htaccess pop-up box.). Is this
possible?
The other thing I am wondering, along the same lines, is it possible for
PERL to retrieve the name and password that a user has entered into a
.htaccess pop-up box? Then, based on their login, I could output a
page, through a PERL script, with conditional outputs.
Thanks a lot for your help.
stewart eastham
sme@planetpod.com
------------------------------
Date: Mon, 10 Aug 1998 14:42:36 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: PERL and HTACCESS
Message-Id: <comdog-ya02408000R1008981442360001@news.panix.com>
Keywords: from just another new york perl hacker
In article <35CF37D9.A2317D8C@planetpod.com>, sme@planetpod.com posted:
>I am trying to get a user through a .htaccess protected directory
>through PERL. (i.e. I want to have the user enter their name and
>password into a HTML form instead of the htaccess pop-up box.). Is this
>possible?
yes. did you have another question about it?
>The other thing I am wondering, along the same lines, is it possible for
>PERL to retrieve the name and password that a user has entered into a
>.htaccess pop-up box? Then, based on their login, I could output a
>page, through a PERL script, with conditional outputs.
with mod_perl you can get both.
good luck :)
--
brian d foy <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>
Perl Conference Quiz Show <URL:http://tpj.com/tpj/quiz-show>
------------------------------
Date: 10 Aug 1998 14:36:02 -0400
From: davet@angel.uunet.ca (Dave Till)
Subject: Re: Perl Docs.. forget the original post
Message-Id: <6qneii$ntu@angel.uunet.ca>
In article <35C92381.11801B20@spider.herston.uq.edu.au>,
Jaime Metcher <metcher@spider.herston.uq.edu.au> wrote:
>Maybe it's something in the culture. I've just spent a week with the
>Linux docs, and I've come up with this rule of thumb - you must *read*
>(not just scan) *every* piece of documentation on <insert task here> you
>can find *before* you start <task>. That's just the way it is. Of
>course, that's what the perl gurus have been saying all along.
I don't think you have to read all the Perl man pages before using Perl.
To quote from the Preface to the Camel:
Most important, you don't have to know everything there is to know
about Perl before you can write useful programs. You can learn Perl
"small end first". [...] Many of the ideas in Perl are borrowed from
natural language, and one of the best ideas is that it's okay to use
a subset of the language as long as you get your point across. Any
level of language proficiency is acceptable in Perl culture.
What the Perl gurus *have* been saying all along is that the answers
to many questions can be found in the man pages or in the FAQs. (From
my own experience, I've found this to be true.)
>It helps to understand that the people that write this documentation are
>*NOT* writing it for: quick gratification; casual users; ease of use;
>shallow understanding. Essentially, they are writing it for themselves
>and people like them, as a way to express and share the depth and
>breadth of their knowledge.
Some documents are reference guides, others are tutorials; a particular
piece of documentation can't be both. The Perl man pages are intended
as reference guides (as far as I can tell) - they completely cover a
specific topic, and assume a certain amount of familiarity with the
language.
------------------------------
Date: Mon, 10 Aug 1998 14:30:28 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: Perl, http and save
Message-Id: <comdog-ya02408000R1008981430280001@news.panix.com>
Keywords: from just another new york perl hacker
In article <35CEE838.AEB02A31@mannheim-netz.de>, lars <lars.schonert@mannheim-netz.de> posted:
>i have a little problem. I need a program to do that:
>
>- i give him a url in the command line
>- the program go to the url
>- the page behind the url will save on my disk
>
>Can you help me ?
no, but LWP can.
#!/usr/bin/perl
use LWP::Simple qw(getstore);
getstore('http://www.pm.org', 'perl_mongers.html');
__END__
--
brian d foy <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>
Perl Mongers Travel Deals! <URL:http://www.pm.org/travel.html>
------------------------------
Date: 10 Aug 1998 13:05:06 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: perlfaq - frequently asked questions about Perl (part 0 of 9)
Message-Id: <x790kw6a4c.fsf@sysarch.com>
>>>>> "JP" == John Porter <jdporter@min.net> writes:
JP> We're not talking html here. roff and its derivatives are
JP> full-blown, ugly languages, not unlike PostScript. You would be
JP> writing an interpreter. Why reinvent that particular wheel? More
JP> critically, not all systems ship with man pages in *roff source
JP> format. And even those that do, each has its own variation. If
JP> you're really interested in this, check out PolyglotMan (formerly
JP> known as RosettaMan), which is one example of a program that
JP> converts between *roff variants and many other text document
JP> formats.
and check out tkman which uses polyglotman internally. i think tk will
run on winblows so you could run this. it is an excellent gui viewer of
man pages and texinfo pages.
uri
--
Uri Guttman ----------------- SYStems ARCHitecture and Software Engineering
Perl Hacker for Hire ---------------------- Perl, Internet, UNIX Consulting
uri@sysarch.com ------------------------------------ http://www.sysarch.com
The Best Search Engine on the Net ------------- http://www.northernlight.com
------------------------------
Date: Mon, 10 Aug 1998 10:09:43 -0700
From: jhardin@wolfenet.com (John D. Hardin)
Subject: Re: Possible bug in RE handling - NOT a bug in Perl
Message-Id: <ng9nq6.1jm.ln@gypsy.wolfenet.com>
In article <m72hq6.tfs.ln@gypsy.wolfenet.com>,
jhardin@wolfenet.com (John D. Hardin) writes:
> In my procmail+perl email sanitizing filters the following regular
> expression occurs:
>
> s/<BODY\s+(([^">]+("(\\.|[^"])*")?)*)ONLOAD/<BODY $1 DEFANGED-ONLOAD/gi;
>
> I have had a report that it fails to exit on SunOS 4.1.3 + Perl 5.004,
> causing high CPU loads. I have tested it on Linux 2.0.33 + Perl 5.004_01,
> SunOS 4.1.4 + Perl 5.004_04 and Alpha OSF/1 V3.0 + Perl 5.004_04
>
> Can anyone confirm this for me?
>
> Test it by running the following text through "perl -p -e 'above-RE'":
>
> <body>
> <body junk>
> <body onload="">
> <body junk onload="">
> <body junk=">" onload="">
> <body junk="\">" onload="">
>
> Perl should *not* hang.
Thirty whacks with the stupid stick for me. The test data I was using
(of which the above is a sample) didn't tickle the RE parser into
backtracking.
I have changed the RE to a form that does not backtrack, and it now exits
quickly.
Thanks to everyone who responded, and sorry for wasting your time.
--
John Hardin KA7OHZ jhardin@wolfenet.com
pgpk -a finger://gonzo.wolfenet.com/jhardin PGP key ID: 0x41EA94F5
PGP key fingerprint: A3 0C 5B C2 EF 0D 2C E5 E9 BF C8 33 A7 A9 CE 76
-----------------------------------------------------------------------
Your mouse has moved. Windows NT must be restarted for the change
to take effect. Reboot now? [ OK ]
-----------------------------------------------------------------------
76 days until Daylight Savings Time ends
------------------------------
Date: Mon, 10 Aug 1998 12:17:07 -0500
From: Quinn P. Coldiron <qcoldiron@yahoo.com>
Subject: Re: pretty perl editor for linux
Message-Id: <902769448.1843289036@crcnews.unl.edu>
XEmacs will do this.
www.xemacs.org
quinn
On Fri, 07 Aug 1998, Greg Dickson wrote:
>Does anyone know of a color syntax editor for perl preferably
>
>I know this is pretty naff but Ive got used to this in
>my other programing environments and it would just be nice
>
> Greg Dickson
>
> **** Witchcliffe WA
>freelance programing
>* ;) *** witchy@netserv.net.au
>(java & perl)
> ***** http://www.netserv.net.au/witchy/
>Linux System Admin
>************
> "I've been boiling this egg for hours and it's still not
>soft"
--
------------------------------------------
Quinn P. Coldiron
DEAL Lab
03 AG Comm
472-5249
qcoldiro@unlinfo.unl.edu
******* http://citv.unl.edu/linux/ *******
------------------------------------------
------------------------------
Date: 10 Aug 1998 09:37:22 -0700
From: johnh@dash.isi.edu (John Heidemann)
Subject: Re: Search Engine
Message-Id: <johnh.902766850@dash.isi.edu>
"Thomas Barnwell" <thomas@marathoncom.com> writes:
>Does any know a good meta search script? Preferably one that returns results
>to a new document and dosen't just forward you to the other search engine's
>pages.
The WWW::Search module has parsers for several search engines and has
been used to make meta-search scripts. (No such script is currently
included in the distribution, though :-( ). You may want to check
CPAN for the module and the subscribe to the mailing list via
<info-www-search-request@isi.edu>.
-John Heidemann
------------------------------
Date: Mon, 10 Aug 1998 17:17:13 GMT
From: Robin Houston <robin.houston@guardian.co.uk>
Subject: Self-printing code
Message-Id: <6qn9un$d0t$1@nnrp1.dejanews.com>
Last week there was a thread about perl programs which print their
own source (without reading it in). Someone perceptively pointed
out that the shortest such program was the null script - a
zero-length file.
Aside from this trivial case, what's the shortest such program?
I've found two short, fairly neat examples.
The first is a one-liner:
print map "$_, q{$_}\n", q{print map "$_, q{$_}\n"}
and the second is a slightly shorter three-liner
(the third line is blank):
print<<''x2,"\n"
print<<''x2,"\n"
Are there any shorter such programs?
.robin.
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: Mon, 10 Aug 1998 18:44:41 GMT
From: Robin Houston <robin.houston@guardian.co.uk>
Subject: Re: Self-printing code
Message-Id: <6qnf2p$99i$1@nnrp1.dejanews.com>
Randal Schwartz <merlyn@stonehenge.com> wrote:
> Well, there's the old standby:
> seek DATA,0,0;print<DATA>__END__
Oh, but that's cheating :-)
It reads its own source
.robin.
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: Mon, 10 Aug 1998 18:29:35 GMT
From: Randal Schwartz <merlyn@stonehenge.com>
Subject: Re: Self-printing code
Message-Id: <8caf5cu1vf.fsf@gadget.cscaper.com>
>>>>> "Robin" == Robin Houston <robin.houston@guardian.co.uk> writes:
Robin> Last week there was a thread about perl programs which print their
Robin> own source (without reading it in). Someone perceptively pointed
Robin> out that the shortest such program was the null script - a
Robin> zero-length file.
Robin> Aside from this trivial case, what's the shortest such program?
Well, there's the old standby:
seek DATA,0,0;print<DATA>__END__
--
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@teleport.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me
------------------------------
Date: Mon, 10 Aug 1998 14:31:27 +0000
From: Victor Szilagyi <victor@hrmarketing.com>
Subject: SSI Perl Script
Message-Id: <35CF043B.CD21067D@hrmarketing.com>
I have a SSI script for a random image displayer. I want to test the
script out before I actually post it. Can anyone recommend a free
utility to do this??
------------------------------
Date: Mon, 10 Aug 1998 14:41:14 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: SSI Perl Script
Message-Id: <comdog-ya02408000R1008981441140001@news.panix.com>
Keywords: from just another new york perl hacker
In article <35CF043B.CD21067D@hrmarketing.com>, victor@hrmarketing.com posted:
>I have a SSI script for a random image displayer. I want to test the
>script out before I actually post it. Can anyone recommend a free
>utility to do this??
one of the free web browsers would work.
--
brian d foy <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>
Perl Conference Quiz Show <URL:http://tpj.com/tpj/quiz-show>
------------------------------
Date: Mon, 10 Aug 1998 18:22:54 +0200
From: "Ronald Gvggel" <r.goeggel@atos-group.de>
Subject: Re: strings
Message-Id: <6qn6rn$puo$1@news.pop-stuttgart.de>
EkimicraD schrieb in Nachricht <35cdec51.0@news.wgn.net>...
>
>Ok, I am new to perl, But do make a good effort I think.
>
>Anyways, here is my problem:
>
>$price = "2,450";
>
>if ($price <= "99")
> {
> ....
> ....
> }
>
>what happend is it thinks 2,450 is smaller than 99, i know this is
>becouse of the comma.
>
>My question is how do i remove the comma from a string?
>
The problem is not the comma.
Problem 1 is: you don't use the -w option.
-w would tell you: Argument "2,450" isn't numeric in le at ...
So you can rewrite the code to
$price = 2,450;
if ($price <= 99)
{
....
....
}
This will cause then error: Useless use of a constant in void context
at ...
So you can rewrite the code to
$price = 2450; # or $price = 2.450; ?
if ($price <= 99)
{
....
....
}
Ronald
------------------------------
Date: Mon, 10 Aug 1998 12:58:08 -0400
From: John Porter <jdporter@min.net>
Subject: Re: Test Results - Asking a question
Message-Id: <35CF26A0.38E9@min.net>
Ronald J Kimball wrote:
>
> So, if you've looked for an answer in the manual and the FAQ,
> be sure to mention it when you ask your question!
I *would* gripe about giving away this secret to the unwashed
masses; after all, you only *claimed* to have read the docs;
you didn't give any evidence that you actually *had*.
In fact, in this example at least, you showed that you
actually had *not* read the docs. A FAQ is still a FAQ.
But instead, I'm consoled by the fact that you only gave it away
to those who already know. You're "preaching to the choir".
"The poor PoBs you will always have with you" -- to paraphrase a
famous saying.
--
John Porter
------------------------------
Date: Mon, 10 Aug 1998 12:30:05 -0600
From: Karl Vietmeier <kvietmei@mines.edu>
Subject: UserAdmin Module under new Activestate Build
Message-Id: <35CF3C2D.F914F2ED@mines.edu>
Has anyone else had a problem getting this module to work with the new
build?
I realize it isn't included as part of the distribution, but simply
copying the .pm file into the include path doesn't seem to work, I still
get the compilation error message and my scripts die.
Karl Vietmeier
kvietmei@mines.edu
------------------------------
Date: 10 Aug 1998 16:54:18 GMT
From: mike@stok.co.uk (Mike Stok)
Subject: Re: variable interpolation
Message-Id: <6qn8jq$rm8@news-central.tiac.net>
Keywords: perl cgi variable
In article <6qn6od$83e$2@engnews2.Eng.Sun.COM>,
Brian Day <bday@cbr.eng.sun.com> wrote:
>Does anyone know if there is a way to have a variable name interpolated inside
>another variable name ? i.e.:
>
>tally(sandwich);
>tally(drink);
>
>print "$sandwich_count";
>print "$drink_count";
>
>
>sub tally
>{"$$_[0]_count";
>}
Perl has "soft" references as of perl 5 (though you could be imaginitive
with type globs in older perls) so you could say something like:
sub tally {
my ($name, $value) = @_;
${$name . '_count'} += $value;
}
but this style will cause the use strict pragma to grumble unless you
specifically ask for no strict 'refs', and it only works for variables
which live in symbol tables, so if you have lexically scoped counters
(declared as "my" variables) they will not be touched by this.
One way to do it is to have a hash whose keys are the things you're
counting.
Hope this helps,
Mike
--
mike@stok.co.uk | The "`Stok' disclaimers" apply.
http://www.stok.co.uk/~mike/ | PGP fingerprint FE 56 4D 7D 42 1A 4A 9C
http://www.tiac.net/users/stok/ | 65 F3 3F 1D 27 22 B7 41
stok@colltech.com | Collective Technologies (work)
------------------------------
Date: Mon, 10 Aug 1998 13:57:30 -0400
From: John Porter <jdporter@min.net>
Subject: Re: What is the purpose of Perl
Message-Id: <35CF348A.75C3@min.net>
I R A Aggie wrote:
>
> + It has mapped the universe and created an exact duplicate.
>
> %universe_2 = %universe;
No, that's a shallow copy, and doesn't use map.
#!/usr/local/bin/perl -w
use Data::Dumper
use universe; # load the current definition
my %alternate_universe = map {
my $u;
eval Data::Dumper
->new([$universe{$_}],['u'])
->Purity(1)
->Dump;
$_ => $u
} keys %universe;
(I know this doesn't actually work, but you get my drift...)
--
John Porter
------------------------------
Date: 10 Aug 1998 18:47:35 GMT
From: tigger@io.nospaam.com
Subject: Re: What is the purpose of Perl
Message-Id: <6qnf87$20j$1@hiram.io.com>
> + It has mapped the universe and created an exact duplicate.
> %universe_2 = %universe;
> James - from empirical evidence, I'd say the universe is a hash... ;)
I thought the universe was a *hack*. 8-)
(And probably the result of some obfuscated code contest at that. I mean
all those bits with fractals--sheesh!)
Paul Archer
--
_________________________________________________________________
* Tech Support: "I need you to boot the computer."
* Customer: (THUMP! Pause.) "No, that didn't help."
_________________________________________________________________
------------------------------
Date: Mon, 10 Aug 1998 18:26:33 GMT
From: Randal Schwartz <merlyn@stonehenge.com>
Subject: Re: What is the purpose of Perl
Message-Id: <8cg1f4u20h.fsf@gadget.cscaper.com>
>>>>> "John" == John Porter <jdporter@min.net> writes:
John> No, that's a shallow copy, and doesn't use map.
John> #!/usr/local/bin/perl -w
John> use Data::Dumper
John> use universe; # load the current definition
John> my %alternate_universe = map {
John> my $u;
John> eval Data::Dumper
-> new([$universe{$_}],['u'])
-> Purity(1)
-> Dump;
John> $_ => $u
John> } keys %universe;
John> (I know this doesn't actually work, but you get my drift...)
Or even simpler (and it *does* work :-):
use Storable;
$deepclone = dclone($original);
Of course, it can only hold on to scalars, arrays, and hashes, but
that's gonna be about as good as you can get.
--
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@teleport.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me
------------------------------
Date: 12 Jul 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 Mar 98)
Message-Id: <null>
Administrivia:
Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.
If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu.
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 3407
**************************************