[8440] in Perl-Users-Digest
Perl-Users Digest, Issue: 2057 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Mar 9 14:17:46 1998
Date: Mon, 9 Mar 98 11:00:35 -0800
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, 9 Mar 1998 Volume: 8 Number: 2057
Today's topics:
Re: Another RegExp Question (Mike Stok)
Attempt to free unreferenced scalar during global destr (Peter Scott)
Re: Cookie extraction via Perl (brian d foy)
csh builtin - limit <Jonathan.O.Nichols@lmco.com>
Re: csh builtin - limit (Mike Stok)
Re: Executing a Korn Script from within Perl <jamesr@aethos.co.uk.nospam>
Re: Extract URL from search query (brian d foy)
Re: Invoke an editor (Mike Stok)
lowercase $lower = lc("aBcDe"); Blows UP!! (Christian@Sur-Tech.com)
Re: multi word unix commands and exec <jamesr@aethos.co.uk.nospam>
Re: Open to a device (Win32) ofer@reshuma.co.il
Re: Perl & Cookies: How do I delete once a person leave (brian d foy)
Re: Perl - Beginner question <edwardj@webpromote.com>
Re: Perl - Beginner question <edwardj@webpromote.com>
Re: Perl on MS Personal Web Server <Mark.English@tessella.co.uk>
Re: PERL-MSQL :HOW CAN I MAKE A QUERY IN MSQL FROM A PE (Steve Linberg)
Re: PERL-MSQL :HOW CAN I MAKE A QUERY IN MSQL FROM A PE (brian d foy)
Re: Perl:, cgi? Books? (brian d foy)
Re: Problem with "goto" in Perl <uri@sysarch.com>
Re: Problem with filenames on NT <zenin@best.com>
Re: Problem with filenames on NT <Tony.Curtis+usenet@vcpc.univie.ac.at>
Re: Retriving last item in array. <Jonathan.O.Nichols@lmco.com>
Re: Tom, grow up [Re: The -w switch (was Re: better way (I R A Aggie)
Re: Year 10000 Compliance <webmaster@fccjmail.fccj.cc.fl.us>
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 9 Mar 1998 18:23:09 GMT
From: mike@stok.co.uk (Mike Stok)
Subject: Re: Another RegExp Question
Message-Id: <6e1c2d$heg@news-central.tiac.net>
In article <35041A02.F445CB21@world.northgrum.com>,
Jim Stern <jstern@world.northgrum.com> wrote:
>> > while (@data) {
>
>Your problem isn't with the regex. It's with the 'while' condition.
>'while (@data)' does _not_ set $_ to each element of @data successively.
>'while (defined($_ = shift @data))' does that (destroying @data as
>it goes). Or use 'while(<>)' to read and parse the data in one go.
Beware of while (defined($_ = shift @data)) 'cos you can have undef as an
element of an array. One way to do it if you want to see everything in
the while's condition might be shown below:
#!/usr/local/bin/perl
@stuff = (0, 1, 2, undef, 4);
@copy = @stuff;
while (defined ($_ = shift @copy)) {
print "loop 1: $_\n";
}
@copy = @stuff;
while (@copy && (($_) = shift @copy)) {
print "loop 2: $_\n";
}
__END__
but I'd lean towards using foreach or, if you really want to use while,
putting the assignment outside the while condition usually (although a
destructive assignment like $_ = shift @copy in the loop may be a trap for
someone using redo later...)
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: 9 Mar 1998 18:38:56 GMT
From: pse@euclid.jpl.nasa.gov (Peter Scott)
Subject: Attempt to free unreferenced scalar during global destruction
Message-Id: <6e1d00$9fs@netline.jpl.nasa.gov>
A cron job that generally executes without incident produced a dozen
or so messages:
Attempt to free unreferenced scalar during global destruction.
the other day. The Camel suggests that this is due to a bug in the C module
I am developing; unfortunately, this script uses no C code of mine, the only
modules it does use that have any C in are DBI and DBD::Oracle. No other
messages were output.
Needless to say, the warning has not repeated itself. Nevertheless, it
is bad form to react to such a message by ignoring it.
I know this is extremely vague, but I have very little to go on here.
If anyone can give *any* suggestions for how to instrument the script
to provide useful data if the condition that caused this should reoccur,
I would be most grateful.
Oh, yeah:
This is perl, version 5.004_04 built for sun4-solaris
--
This is news. This is your | Peter Scott, NASA/JPL/Caltech
brain on news. Any questions? | (pse@euclid.jpl.nasa.gov)
Disclaimer: These comments are the personal opinions of the author, and
have not been adopted, authorized, ratified, or approved by JPL.
------------------------------
Date: Mon, 09 Mar 1998 13:02:04 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: Cookie extraction via Perl
Message-Id: <comdog-ya02408000R0903981302040001@news.panix.com>
Keywords: from just another new york perl hacker
In article <35034314.22E92CBF@sympatico.ca>, Brent Mondoux <brent@sympatico.ca> posted:
>I have two books on Perl and neither of them cover the extraction and
>reading of a cookie. Odd enough...
quite natural since it has nothing to do with Perl. should every Perl
book also cover every other stupid Nutscrape trick?
> anyhow I was wondering if anyone
>could be so kind to send me some code that can extract a cookie that I
my $cookie = $ENV{'HTTP_COOKIE'};
or you could just see the language specific section of the CGI Meta
FAQ, which would save you a post to usenet.
--
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>
------------------------------
Date: Mon, 09 Mar 1998 10:50:21 +0000
From: Jonathan Nichols <Jonathan.O.Nichols@lmco.com>
Subject: csh builtin - limit
Message-Id: <3503C6CE.1432@lmco.com>
I want to set the stacksize to unlimited for a child process called from
a perl script. Is there a way to pass the limit variables to child
processes in the same way that the @ENV array passes environment
variables to child processes? If I do this:
system("limit stacksize unlimited")
and then
system("command argument")
then of course, the limit only gets set for the shell spawned for the
limit command, and the value does not get propogated to the next
system() call.
Please respond by email.
thanks,
jon
------------------------------
Date: 9 Mar 1998 18:42:36 GMT
From: mike@stok.co.uk (Mike Stok)
Subject: Re: csh builtin - limit
Message-Id: <6e1d6s$heg@news-central.tiac.net>
In article <3503C6CE.1432@lmco.com>,
Jonathan Nichols <Jonathan.O.Nichols@lmco.com> wrote:
>I want to set the stacksize to unlimited for a child process called from
>a perl script. Is there a way to pass the limit variables to child
>processes in the same way that the @ENV array passes environment
>variables to child processes? If I do this:
>
>system("limit stacksize unlimited")
>
>and then
>
>system("command argument")
You might want to dee if the BSD::Resource module whose blurb in
ftp://ftp.iguide.com/pub/mirrors/packages/perl/CPAN/CPAN.html#os
includes:
BSD::Resource - If your operating system supports the BSD functions
getrusage(), getrlimit(), setrlimit(), getpriority(), and/or
setpriority(), the BSD::Resource module will make them available to your
Perl programs.
If that's not approprate or useful then you might consider whether using
pack and syscall and the appropriate constants from header files would
help (or better yet a small module using XS to help you glue calls to your
C library routines into a perl module.)
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: 9 Mar 98 13:19:22 GMT
From: "James Richardson" <jamesr@aethos.co.uk.nospam>
Subject: Re: Executing a Korn Script from within Perl
Message-Id: <01bd4b5f$1c5bda80$26c0a4c1@kitkat.aethos.co.uk>
chris_talley@ple.af.mil wrote in article
<6dpofo$i1d$1@nnrp1.dejanews.com>...
> I'm trying to execute a korn sh script
from inside a perl script. My syntax is as
follows:
system("pmq_lookup.com $vars");
pmq_lookup being the korn sh script. This script in turn executes Oracle
Driver and then executes a sql script which spools to a file. If I execute
this from a command prompt it works fine, however, when it is executed
through a cgi-bin, via the web, it seems as if the pmq_lookup.com file
isn't even called!!
>
Hmmm... quite often this sort of thing can happen because people forget
that the environment you get when you run stuff from the command line is
not necessarily the same as when you run as a cgi program. ((Nor should it
be either, I reckon))
What you could do is just print out your environment when you run the
program (cgi stylee), and check that your PATH, and any oracle specific
stuff is all set correctly.
Just to make this relevant to c.l.p.m I'll write some code to do this:
foreach $var (sort(keys(%ENV))) {
print "$var\t$ENV{$var}\n";
}
You really should check for errors, when you 'shell out' (try $!), and in
many cases its simply not necessary.....
James
------------------------------
Date: Mon, 09 Mar 1998 13:08:19 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: Extract URL from search query
Message-Id: <comdog-ya02408000R0903981308190001@news.panix.com>
Keywords: from just another new york perl hacker
In article <MIqPlCAID1A1EwcX@worsdall.demon.co.uk>, Mark Worsdall <hellNback@158.152.255.1> posted:
>In article <8CRc6xDxc0$0EwXE@worsdall.demon.co.uk>, Mark Worsdall
><scriptabuser@127.0.0.1> writes
>>Hi,
>>
>>I am trying to work out how to get url address to splitt. Note it could
>>be an address without subdirectorys or one with, i.e.:-
>>Below is an example of data given.
>>
>>$referer = "http://www.altavista.digital.com/cgi-bin/query?pg=q&stq=50&w
>>hat=web&kl=XX&q=building+the+core+muscles+of+the+athalete&navig60.x=7&na
>>vig60.y=11";
>>
>
>Has no one any ideas on this?
how about what you want the output to look like? is there some reason
that the documentation for URI::URL does not cover what you want to
do?
--
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>
------------------------------
Date: 9 Mar 1998 18:32:02 GMT
From: mike@stok.co.uk (Mike Stok)
Subject: Re: Invoke an editor
Message-Id: <6e1cj2$heg@news-central.tiac.net>
In article <Pine.LNX.3.95.980309121641.32002G-100000@alborz.dac.neu.edu>,
gambit <natoofi@alborz.dac.neu.edu> wrote:
>How can I to invoke an Editor in the middle of a perl program?
It depends on the environment you're running in. If you're running on a
unix system and you're run by a user on their terminal then it might be as
simple as checking some environment variables ($ENV{'VISUAL'}
$ENV{'EDITOR'} maybe) to see if they have a preference and then using
system to call it.
If you have a recent perl distribution installed then
perldoc -f system
should give you some useful information.
If you're familiar with C programming and the standard C libraries then
you can usually make an educated guess about what a function is called in
perl and then use perldoc to see if it's there. IF it isn't then it might
be worth browsing the FAQ to see if it's covered in there. The FAQ is on
http://www.perl.com
and can be accessed in recent perl distributions with
perldoc perlfaq
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, 09 Mar 1998 10:41:48 -0800
From: Christian@Sur-Tech.com (Christian@Sur-Tech.com)
Subject: lowercase $lower = lc("aBcDe"); Blows UP!!
Message-Id: <Christian-ya023580000903981041480001@nntp.best.com>
Hi All,
Lost here.. i'm new to perl.. so far most all in the SAMS book on perl-5 has
worked well.. i have version 5 running on freebsd.. 3.0 122597.. just before
the vm changes.. well i have built a little cgi that puts together a web page,
and it seems to work well, i had a line in there like so:
$sub = substr ($string,0,3);
but i also wanted to make sure a string was lower case
before i ran some comparisons, so i tried $sub = lc (substr ($string,0,3));
then the page did a crash/burn.. tried several different ways of putting
in "" marks etc.. finally tried a basic line like
$lower = lc("aBcDe");
this line is directly out of the book!! and if i put it anyplace in my prog,
it blows up!?.. error output just trying to run the prog looks like below..
"lc" may clash with future reserved word at ././item line 35syntax error in
file ././item at line 35
, next 2 tokens "lc("
this will happen anyplace!! i can put this line in after i setup variable some
variable defaults at top of prog, before i really get into anything, and it will
do the crash/burn.. my guess is that there is some typo in the book?? or that
the syntax has changed??
Can anybody send me the "Right" way to set a string to lower case??
Thanks, Christian Christian@Sur-Tech.com 1925 Grant St #4
Sur-Tech / Ami-Tech (408) 496-6348 Xt 247 Santa Clara CA 95050
www.Sur-Tech.com
------------------------------
Date: 9 Mar 98 13:37:13 GMT
From: "James Richardson" <jamesr@aethos.co.uk.nospam>
Subject: Re: multi word unix commands and exec
Message-Id: <01bd4b61$9a9e04c0$26c0a4c1@kitkat.aethos.co.uk>
Josh Kessler <jkessler@austx.tandem.com> wrote in article
<35007E38.64880EEB@austx.tandem.com>...
> I have run into a problem when trying to get a multi word system UNIX
> command to work via an 'exec' command. I am working on a sun4 platform
> with Perl 5.004. I am trying to alter the prompt using the 'set prompt='
> command. How is this feat accomplished?
>
> Works:
> exec (date);
>
> Does Not Work:
> exec (set prompt=$some_string);
Unfortunately your whole program is flawed.
1) set is from csh, and system will exec sh, which knows nothing about
'set'
2) If you wanted you could do
system('BLAH=blah');
However, this still wouldnt work, as you are forking a new process, and
a child can't modify its parents environment, so the new process (sh) would
get the changed environment, not the perl program.
3) You use $ENV{'VAR'} to get/set the value of ann environment variable
from within perl, but (I assume) that you want to change the environment of
the shell that you called the perl script from, which also wont work, as a
child process cant change the environment of its parent.
4) one thing that I have never tried is something like the following:
------------
#/opt/perl5/bin/perl
$ENV{"SOME_VAR"}="new value";
$shell = "/bin/csh";
exec $shell "-sh";
--------------
Then run it as
%exec env.pl
But I dont know if that would work....
James
------------------------------
Date: Mon, 09 Mar 1998 12:00:28 -0600
From: ofer@reshuma.co.il
Subject: Re: Open to a device (Win32)
Message-Id: <6e1aln$si2$1@nnrp1.dejanews.com>
John! open(DEVICE,">COM1") will do it for you. simple, isnt it?
in article <3500F6A6.15FC@tamu.edu>,
John Adamson <j-adamson@tamu.edu> wrote:
>
> In running scripts on either an NT or 95 box, all my experience in using
> the open() function has been in connection with files, not devices. I'm
> now interested in output to a com port, but can't find anything in any
> of my perl reference books explaining the appropriate syntax. (Or at
> least I don't recognize it as such! :-))
>
> Can anyone tell me what the correct syntax would be for, say,
> open(OUTPUT,">COM2:") (which, obviously, doesn't work).
>
> Your indulgence with this trifling question will be appreciated! TIA
> --
> John Adamson
> TX Ag. Extension Svc/Texas A&M Univ System
> j-adamson@tamu.edu
>
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/ Now offering spam-free web-based newsreading
------------------------------
Date: Mon, 09 Mar 1998 12:59:22 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: Perl & Cookies: How do I delete once a person leaves my site?
Message-Id: <comdog-ya02408000R0903981259220001@news.panix.com>
Keywords: from just another new york perl hacker
[follow-ups set]
In article <Pine.BSI.3.96.980308201850.13476A-100000@xanadu.io.com>, Chocolate <poohba@io.com> posted:
>Is it possible to delete a cookie once a person leaves my domain? If so
>how?
read the cookie specification, as referenced in the CGI Meta FAQ.
then, next time, choose an appropriate newsgroup for such questions.
--
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>
------------------------------
Date: Mon, 09 Mar 1998 18:37:58 GMT
From: Ed Jamison <edwardj@webpromote.com>
To: webmaster@csx.com
Subject: Re: Perl - Beginner question
Message-Id: <350436D0.AA64E37E@webpromote.com>
Try this. It's ugly, but it works for what you're trying to do... Let
me know if you have any additional problems. Also, if you are using
these from the llama book, just copy them exactly as they are displayed,
don't mess with them until after you get them to work...
HTH,
Edward Jamison
bhendeNOSPAM@ibm.net wrote:
> In the following construct, 'while' does not work as I think it
> should. Any ideas on why ? Please e-mail the response to
> 'Arundhati_Bhende@csx.com' along with the post, if possible.
>
> Thanks
>
> ------------------------------------------------------------
>
> #!/usr/bin/perl -w
> $secretword = "llama";
> print ("What is your name ?");
> chomp($name = <STDIN>);
> #$name = <STDIN>;
> #chomp ($name);
> if ($name eq "Eric"){
> print ("Hello $name! How good of you to be here! \n");
> }else{
> print ("Hello, $name!\n");
> print ("Secret word ?");
chomp($guess);
> while ($guess ne $secretword){
> print ("Wrong. Try again.");
> $guess = <STDIN>;
> chomp ($guess);
> }
> }
------------------------------
Date: Mon, 09 Mar 1998 18:40:05 GMT
From: Ed Jamison <edwardj@webpromote.com>
To: edwardj@webpromote.com
Subject: Re: Perl - Beginner question
Message-Id: <35043755.CC58489C@webpromote.com>
Oops, here's the code I meant to send...
#!/usr/bin/perl -w
$secretword = "llama";
print ("What is your name ?");
chomp($name = <STDIN>);
if ($name eq "Eric"){
print ("Hello $name! How good of you to be here! \n");
}else{
print ("Hello, $name!\n");
print ("Secret word? ");
chomp($guess = <STDIN>);
while ($guess ne $secretword){
print ("Wrong. Try again: ");
chomp($guess = <STDIN>);
}
}
Ed Jamison wrote:
> Try this. It's ugly, but it works for what you're trying to do...
> Let
> me know if you have any additional problems. Also, if you are using
> these from the llama book, just copy them exactly as they are
> displayed,
> don't mess with them until after you get them to work...
>
> HTH,
> Edward Jamison
>
> bhendeNOSPAM@ibm.net wrote:
>
> > In the following construct, 'while' does not work as I think it
> > should. Any ideas on why ? Please e-mail the response to
> > 'Arundhati_Bhende@csx.com' along with the post, if possible.
> >
> > Thanks
> >
> > ------------------------------------------------------------
> >
> > #!/usr/bin/perl -w
> > $secretword = "llama";
> > print ("What is your name ?");
> > chomp($name = <STDIN>);
> > #$name = <STDIN>;
> > #chomp ($name);
> > if ($name eq "Eric"){
> > print ("Hello $name! How good of you to be here! \n");
> > }else{
> > print ("Hello, $name!\n");
>
> > print ("Secret word ?");
>
> chomp($guess);
>
> > while ($guess ne $secretword){
> > print ("Wrong. Try again.");
> > $guess = <STDIN>;
> > chomp ($guess);
> > }
> > }
------------------------------
Date: Mon, 9 Mar 1998 13:43:25 GMT
From: "Mark English" <Mark.English@tessella.co.uk>
Subject: Re: Perl on MS Personal Web Server
Message-Id: <01bd4b60$51aa49a0$431e70c1@pentagon>
Steven Savage <badger@infinet.com> wrote in article
<6djnsn$41r@news1.infinet.com>...
>
> I've been wrestling with getting PERL to work on an MS Personal Web
> Server to demo a PERL search engine. Does anyone know how to get this to
> work? it seems my file associations just aren't enough.
>
>From memory...so excuse minor (or major) slip-ups...
Assuming you are running Win95:
Start Button/Run : Regedit
Follow the registry keys:
HKEY_LOCAL_MACHINE/system/CurrentControlSet/services/W3svc/Parameters/Script
map
Make a new entry:
.pl c:\perl\bin\perl.exe %s %s
Exit Regedit (I can't remember if you are prompted to save, or
even if you have to)
You will need to reboot your machine.
When the server is running again there shoudl be no problem
with the perl executing as expected.
Enjoy...
Mark
------------------------------
Date: Mon, 09 Mar 1998 13:24:44 -0500
From: linberg@literacy.upenn.edu (Steve Linberg)
Subject: Re: PERL-MSQL :HOW CAN I MAKE A QUERY IN MSQL FROM A PERL SCRITP? [FAQ]
Message-Id: <linberg-0903981324440001@projdirc.literacy.upenn.edu>
In article <3503E16E.6413@xures.ei.uvigo.es>, agro@xures.ei.uvigo.es wrote:
> MY QUESTION IS:
> FROM A PERL SCRIPT , HOW CAN I MAKE A QUERY TO A MSQL
DATABASE ?
You can start by reading the reams of Perl documentation that is sitting
on your hard drive right now. Additionally, you can go to
http://www.perl.com and visit the extensive documentation sections,
including the FAQs, which this is. Then you can tackle platform-specific
issues that only you know about.
Don't forget deja news as a source for answers to (very) frequently asked
questions: http://www.dejanews.com.
_____________________________________________________________________
Steve Linberg National Center on Adult Literacy
Systems Programmer &c. University of Pennsylvania
linberg@literacy.upenn.edu http://www.literacyonline.org
------------------------------
Date: Mon, 09 Mar 1998 12:57:19 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: PERL-MSQL :HOW CAN I MAKE A QUERY IN MSQL FROM A PERL SCRITP?
Message-Id: <comdog-ya02408000R0903981257190001@news.panix.com>
Keywords: from just another new york perl hacker
In article <3503E16E.6413@xures.ei.uvigo.es>, agro@xures.ei.uvigo.es posted:
>MY QUESTION IS:
> FROM A PERL SCRIPT , HOW CAN I MAKE A QUERY TO A MSQL DATABASE
yes. get the relevant modules from CPAN.
--
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>
------------------------------
Date: Mon, 09 Mar 1998 13:03:28 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: Perl:, cgi? Books?
Message-Id: <comdog-ya02408000R0903981303280001@news.panix.com>
Keywords: from just another new york perl hacker
In article <350403EF.4A4F@best.com>, bchapman@best.com posted:
>I notice sometimes perl programs (.pl) are described as "cgi-scripts",
>but there's also something called ".cgi". What is this? Where do I
>find out about this language? Somebody please give me the lowdown on
>this stuff?
see the CGI Meta FAQ.
--
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>
------------------------------
Date: 09 Mar 1998 13:46:03 -0500
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Problem with "goto" in Perl
Message-Id: <x7hg57vh1w.fsf@sysarch.com>
aml@world.std.com (Andrew M. Langmead) writes:
>
> Another example in perl is eval. The function "eval STRING" should be
> avoided, but "eval BLOCK" is important and useful.
i disagree. eval STRING is VERY useful to generate closures, fast
multi-regex subs, and other dynamic code objects. eval BLOCK is mostly
used for run time error handling. they are very different animals which
share the same name (unfortunately)
uri
--
Uri Guttman SYStems ARCHitecture and Software Engineering
uri@sysarch.com Have Perl, Will Hack
http://www.sysarch.com (781) 643-7504 x*2 FAX: (781) 643-2710
Try the Best Search Engine on the Net --------> http://www.northernlight.com
------------------------------
Date: 9 Mar 1998 17:57:18 GMT
From: Zenin <zenin@best.com>
Subject: Re: Problem with filenames on NT
Message-Id: <889466616.94744@thrush.omix.com>
Craig Ciquera <craig@mathworks.com> wrote:
: If you use #, $, or % characters in a filename, http will choke on them.
Maybe, if the httpd is writen badly.
: Some OS's won't even read files with these characters (i.e., UNIX won't read
: $ in a filename).
$ echo foo > \$foo
$ cat \$foo
foo
$ rm \$foo
$
"Unix" will take pretty much anything but '/' as a valid filename
character, including 8 bit ("High" ASCII) values and excape
sequences. Getting them past a brain dead shell such as csh may
take some work at times, but it's still vaild and we aren't talking
shells here.
: > Microsoft IIS server says: File Not
: > Found. I think the reason is HTTP, but I must use filenames with such
: > characters. Is there an idea how I can do it?
Get a real httpd server. Apache for Win32 comes to mind. Failing
that, post your question to a group that cares about MS IIS since
this question has nothing to do with perl.
--
-Zenin
zenin@best.com
------------------------------
Date: 09 Mar 1998 19:05:37 +0100
From: Tony Curtis <Tony.Curtis+usenet@vcpc.univie.ac.at>
Subject: Re: Problem with filenames on NT
Message-Id: <7xafazagem.fsf@beavis.vcpc.univie.ac.at>
Re: Problem with filenames on NT, Craig
<craig@mathworks.com> said:
Craig> Some OS's won't even read files with these characters
Craig> (i.e., UNIX won't read $ in a filename).
I think you mean `/'
tony
------------------------------
Date: Mon, 09 Mar 1998 10:52:20 +0000
From: Jonathan Nichols <Jonathan.O.Nichols@lmco.com>
To: mhanson@arrowweb.com
Subject: Re: Retriving last item in array.
Message-Id: <3503C746.5C78@lmco.com>
try
$last_value=$array[$#array]
$#array is the index of the last entry in the array.
I'm sure there's a better way, but this works.
------------------------------
Date: Mon, 09 Mar 1998 11:50:51 -0500
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: Tom, grow up [Re: The -w switch (was Re: better way to do this?)]
Message-Id: <fl_aggie-0903981150510001@aggie.coaps.fsu.edu>
In article <6e10h7$46k@news.service.uci.edu>, "Eric D. Friedman"
<friedman@uci.edu> wrote:
+ [mailed, posted]
+
+ In article <6dus00$33a$1@cyprus.atlantic.net>,
+ Chip Salzenberg <chip@pobox.com> wrote:
+ <According to John Callender <jbc@west.net>:
+
+ <I don't expect Tom to get much special treatment in the moderated group.
+ <There is a difference between "Perl stuff" and "stuff of possible interest
+ <to Perl people." The plan is for the moderated group to cover the former,
+ <while leaving the unmoderated group for the latter.
+
+ That's not what the charter says. It reserves a specific exclusion
+ for the Perl Institute that allows its board (of which Tom is
+ surely a member) to post unmoderated "stuff of possible interest to
+ Perl people." Amazingly, the charter openly acknowledges that TPI
+ may have a commercial interest in making such announcements, and yet
+ guarantees that, should a TPI-competitor someday emerge, it would
+ be moderated out of existence. It's positively Microsoftian!
That's one strict reading. And if you're going to quote from
the RFD, make sure you copy it right! Quote [emphasis mine]:
(EXCEPTION: The Perl Insitute may post
_commercials_ that its board deems to be of general interest
to the Perl community, _such as announcements of upcoming
Perl-oriented conferences_.)
"general interest" is a lot different from "possible interest". But
you're right, a TPI competitor would not be able to post announcements
of commercial, Perl-oriented conferences. By a strict reading of the
charter.
This should be revised such that the language remains neutral to originating
party, and final authority should be turned over to the moderators in this
case.
Of course, that is why its only an RFD...
James
--
Consulting Minister for Consultants, DNRC
The Bill of Rights is paid in Responsibilities - Jean McGuire
To cure your perl CGI problems, please look at:
<url:http://www.perl.com/CPAN-local/doc/FAQs/cgi/idiots-guide.html>
------------------------------
Date: Mon, 09 Mar 1998 17:40:14 GMT
From: Bill Jones <webmaster@fccjmail.fccj.cc.fl.us>
Subject: Re: Year 10000 Compliance
Message-Id: <35042839.8C88AF19@fccjmail.fccj.cc.fl.us>
You killed Kenny!
twod@not.valid wrote:
> : We don't need to worry about this, by then we'll all be assimilated as part
> : of the BORG collective. No need to worry about trivial computers...
>
> Actually I watch more South Park than Star Trek (+ derivatives) and can
> assure you that large flaming anal probes are far more likely in the given
> timeframe.
>
> IAP :)
------------------------------
Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 8 Mar 97)
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.
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 2057
**************************************