[13253] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 663 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Aug 27 15:07:48 1999

Date: Fri, 27 Aug 1999 12:05:12 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Fri, 27 Aug 1999     Volume: 9 Number: 663

Today's topics:
        bizarre PERL/CGI behavior question rancid@best.com
        Can anyone lend a hand please? <richard@madchicken.com>
    Re: Can anyone lend a hand please? <ralphcf@home.com>
        Debug question <richard@madchicken.com>
    Re: Debug question <tchrist@mox.perl.com>
    Re: Debug question <bobklin@idt.net>
    Re: Debug question <flavell@mail.cern.ch>
    Re: FormMail problem recognizing <form name> attribute <cassell@mail.cor.epa.gov>
        http download <eamorosi@hotmail.com>
    Re: http download <bobklin@idt.net>
    Re: Images <jimmy@blackhole-designs.com>
        new perl user : probs w/ processes <nileshdm@isha.cis.upenn.edu>
    Re: new perl user : probs w/ processes (Anno Siegel)
        objects in memory <kangas@anlon.com>
    Re: Perl Jargon Question <tchrist@mox.perl.com>
    Re: Perl Jargon Question (Anno Siegel)
    Re: perl on linux (James R. Goodfriend)
    Re: Perlshop Modules <cassell@mail.cor.epa.gov>
    Re: Please help me <cassell@mail.cor.epa.gov>
    Re: Project Manager wanted <cassell@mail.cor.epa.gov>
    Re: recovering the query string while using CGI.pm <cassell@mail.cor.epa.gov>
    Re: Spawn a Web process <cassell@mail.cor.epa.gov>
    Re: The extent of double-quotish interpolation (M.J.T. Guy)
    Re: The extent of double-quotish interpolation <cassell@mail.cor.epa.gov>
    Re: The extent of double-quotish interpolation (Anno Siegel)
    Re: Timeing out "new Net::FTP" <claytons@nortelnetworks.com>
    Re: Timeing out "new Net::FTP" (Donovan Rebbechi)
        URL-Encoded Format with LWP? <dchurch@kabana.net>
    Re: Using a customized debugger. (M.J.T. Guy)
        Using stream 2 ways <jkuplins@rcc.com>
    Re: Why use Perl when we've got Python?! (Factory)
        Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Fri, 27 Aug 1999 18:15:30 GMT
From: rancid@best.com
Subject: bizarre PERL/CGI behavior question
Message-Id: <37c6cd93.138209076@nntp.best.com>


I have flat-file "database" containing record labels and the URL of
their web page that consists of 3 fields delimited by the pipe
character (|). The first field is for alphabetization purposes, the
second field is the name of the label, and the third field is the URL.
To speed lookup (users can retrieve labels by the first letter),
there's another file that contains the byte location of where each
chunk of the alphabet begins and for how many lines that chunk
continues. 

Basically when the user asks for all the labels that begin with A, the
script looks up the byte location of the As and how many lines there
are of them, then pulls them all into a hash, sorts them, and outputs
them to the screen with their URLs embedded. Simple enough, right?

Well, strangely, this concept works fine on all 4000+ labels in the
"database" except for one which the script refuses to output. When it
gets to that particular label, it just leaves a blank space on the
screen where the name/URL shoud go and continues on successfully
through the rest of the labels following it.

The URL of the label it's choking on is
http://www.hnhrockvillemusic.com/ad.htm
I've found that if I remove the period between 'ad' and 'htm'
(resulting in .../adhtm), or modify it to be .../add.htm, the script
will print the label/URL. Modifying the URL to end in ad.html (as
opposed to .htm) has no effect on the bug. It's as if having a period
in that specific byte location is a problem (which seems like voodoo
in action to me).

Can anyone shed any light on why this is happening?

Here's some of the Perl code which I suspect might lend a clue.

This piece of code reads in the byte location and number of lines then
pulls that chunk of the alphabet into a hash (readindex() is a
subroutine that grabs the byte location and number of lines):

$letter = $ENV{'QUERY_STRING'};
($letter =~ /[a-z0]/) ? ($bytes, $lines) = readindex ($letter) : die
"\n";
open (database, "labeldatabase");
seek (database, $bytes, 0);
foreach (1..$lines)
{
        ($alphaorder, $name, $url) = split (/[|]/, <database>);
        chomp $url;
        push (@{$labelhash{$alphaorder}}, $name, $url);
}
close (database);

This is the loop in the midst of the HTML code that sorts the chunk of
labels and prints out each label/URL:

foreach $key (sort {lc($a) cmp lc($b)} keys %labelhash)
{
        print "<a
href=\"$labelhash{$key}[1]\">$labelhash{$key}[0]</a><br>\n";
}

You can see the lack of output in action at
http://www.arancidamoeba.com/lettersearch.cgi?a
Scroll down the page to where the label Audible Deafenings ought to be
located.

Thanks for any help you can provide! This has me scratching my head
verging on pulling hair out.

chanel
rancid@best.com


------------------------------

Date: Fri, 27 Aug 1999 18:42:20 +0100
From: "Richard" <richard@madchicken.com>
Subject: Can anyone lend a hand please?
Message-Id: <37c6ce56_2@newsread3.dircon.co.uk>

Hi All,

My name is Richard and I'm 17 years old. I'm frantically trying to get to
grips with Perl. I can get it to do the more simple tasks, such as return
values from a form when submitted and then act on the contents of a hidden
field, eg..

if ($in{'action'} eq "gotonextstage") { &some_sub }

I'm Ok with that. But where I really need help is being able to 'register' a
user. For example, visitor fills out a form that has Username, Password and
Full Name as fields. This stuff is stuck in one large user database which is
used to validate users when they try to 'log in'. When they try to log in -
if they are successful - they are given access to a specific subroutine
within a cgi-program, perhaps containing HTML or such to be protected.

Does anyone know how I can do this? Or maybe you have a sub-routine that
would be of use to me?

Thanks very much for your time and help.

Best Regards,

Richard.




------------------------------

Date: Fri, 27 Aug 1999 18:37:52 GMT
From: Ralph Christopher Furmaniak <ralphcf@home.com>
Subject: Re: Can anyone lend a hand please?
Message-Id: <37C6DB6E.CC39C737@home.com>

Richard wrote:

> But where I really need help is being able to 'register' a
> user. For example, visitor fills out a form that has Username, Password and
> Full Name as fields. This stuff is stuck in one large user database which is
> used to validate users when they try to 'log in'.

You can just open a file for appending and write the form data to it, just as
you checked it in that line you wrote.

open(FILE,">>SomeFile");
print FILE  $in{'action'};     # And so on
close FILE;

    Sincerely,

        Ralph Furmaniak



------------------------------

Date: Fri, 27 Aug 1999 18:46:22 +0100
From: "Richard" <richard@madchicken.com>
Subject: Debug question
Message-Id: <37c6cf48_1@newsread3.dircon.co.uk>

My ISP has given me access and permission to create and run my own perl/cgi
scripts, but I can't telnet to the system in order to debug the scripts
using the perl -c function ( I think it's that). Telnet access is not
allowed. Is there some way I can view the output of what would have been at
the telnet prompt via the borwser? I'll tear my hair out if I see that
"Internal Server Error" message one more time!!

Thanks,

Richard.







------------------------------

Date: 27 Aug 1999 11:57:02 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Debug question
Message-Id: <37c6d16e@cs.colorado.edu>

     [courtesy cc of this posting mailed to cited author]

In comp.lang.perl.misc, 
    "Richard" <richard@madchicken.com> writes:
:My ISP has given me access and permission to create and run my own perl/cgi
:scripts, but I can't telnet to the system in order to debug the scripts
:using the perl -c function ( I think it's that). Telnet access is not
:allowed. Is there some way I can view the output of what would have been at
:the telnet prompt via the borwser? I'll tear my hair out if I see that
:"Internal Server Error" message one more time!!

Debug locally.

    % perl -w testscript

--tom
-- 
 "... the whole documentation is not unreasonably transportable in a
 student's briefcase." - John Lions describing Unix 6th Edition
 "This has since been fixed in recent versions." - Kernighan & Pike


------------------------------

Date: Fri, 27 Aug 1999 14:13:48 -0400
From: "Bob Kline" <bobklin@idt.net>
Subject: Re: Debug question
Message-Id: <7q6kh8$o9f@nnrp4.farm.idt.net>

Richard <richard@madchicken.com> wrote in message
news:37c6cf48_1@newsread3.dircon.co.uk...
> My ISP has given me access and permission to create and run my own
perl/cgi
> scripts, but I can't telnet to the system in order to debug the scripts
> using the perl -c function ( I think it's that). Telnet access is not
> allowed. Is there some way I can view the output of what would have been
at
> the telnet prompt via the borwser? I'll tear my hair out if I see that
> "Internal Server Error" message one more time!!

use CGI::Carp qw(fatalsToBrowser);




------------------------------

Date: Fri, 27 Aug 1999 20:19:00 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: Debug question
Message-Id: <Pine.HPP.3.95a.990827200712.24393I-100000@hpplus03.cern.ch>

On Fri, 27 Aug 1999, Richard wrote:

> My ISP has given me access and permission to create and run my own perl/cgi
> scripts, but I can't telnet to the system in order to debug the scripts

Same answer as plenty before you got, I'd say.  Debugging from the
command line can take you so far, but there's no real substitute for
doing the final debugging of a CGI script via a web server. 

Installing Apache for this is no big deal (you might even get to like it
and use it as a real web server, rather than just as a test harness for
CGI scripts ;-)

Btw, if you're fighting the evil empire instead of a real OS, then
perhaps the following remark helps.  From a standing start, I'd say it
took little more than half an hour to install activestate perl and win32
apache on Win95, and get them to the point where they were running a
"hello world" CGI script in Perl.  That was just following the
instructions.  OK, I admit I was already familiar with Perl and Apache
under unix, but whether that really helped or hindered, I'm not sure.

> the telnet prompt via the borwser? I'll tear my hair out if I see that
> "Internal Server Error" message one more time!!

Exactly, and that's part of the reason that you'll want to debug via
a server.  But don't miss the Idiot's Guide to debugging CGI scripts, it
has certainly helped me on several occasions when I've missed some vital
point.

have fun  (as Jacqui says, if it isn't fun then you aren't doing
it right ;-)

Oh, could I steer you towards the more-relevant groups for questions
that aren't specific to Perl, i.e c.i.w.authoring.cgi or the 
appropriate c.i.w.servers.OS that's appropriate to the OS you are
running?  This here group tries to focus on Perl-specific matters.



------------------------------

Date: Fri, 27 Aug 1999 11:40:11 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: FormMail problem recognizing <form name> attribute
Message-Id: <37C6DB8B.67D30ACD@mail.cor.epa.gov>

Shawn Powell wrote:
> 
> Okay, I guess that's what I needed to know.  I thought maybe the problem was
> with how the Perl script was processing my form data, and I was hoping to get a
> suggestion from somebody who is familiar with FormMail.pl.  I'll try another
> newsgroup.  Thanks for reading, and I'm sorry if I mis-posted.

One more bit of advice: if that's Matt Wright's FormMail
script, get a better formmail program ASAP.

David
-- 
David Cassell, OAO                     cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician


------------------------------

Date: Fri, 27 Aug 1999 13:30:46 -0400
From: Beth Amorosi <eamorosi@hotmail.com>
Subject: http download
Message-Id: <37C6CB45.CBADD1C7@hotmail.com>

Could some tell me which module to use to donwload a file from http to
unix?  The one liners in the module list aren't helping me any.

thanks.



------------------------------

Date: Fri, 27 Aug 1999 14:16:40 -0400
From: "Bob Kline" <bobklin@idt.net>
Subject: Re: http download
Message-Id: <7q6kml$oah@nnrp4.farm.idt.net>


Beth Amorosi <eamorosi@hotmail.com> wrote in message
news:37C6CB45.CBADD1C7@hotmail.com...
> Could some tell me which module to use to donwload a file from http to
> unix?  The one liners in the module list aren't helping me any.

Look at LWP::Simple.





------------------------------

Date: Fri, 27 Aug 1999 17:56:15 GMT
From: Jimmy Humphrey <jimmy@blackhole-designs.com>
Subject: Re: Images
Message-Id: <37C6D12F.B35E063D@blackhole-designs.com>

Hey, I just hit the reply button on Netscape 4.6 and hit send.

Jimmy

Martien Verbruggen wrote:

> In article <37C55DE0.842A763B@blackhole-designs.com>,
>         Jimmy Humphrey <jimmy@blackhole-designs.com> writes:
> > Content-Type: text/plain; charset=us-ascii
>
> Please don't do that. Usenet is a plain text medium. Not a MIME
> circus.  And not a web application crappy thingy that deals with HTML.
> And don't put your message before what you quote, and don't quote your
> own message. It's not Jeopardy here.
>
> IOW: before posting again, please fix your usenet posting style.
>
> >              $myImage->copyResized($myImage,10,10,0,0,50,50,25,25);
>                 ^^^^^^^               ^^^^^^^
> Martien
> --
> Martien Verbruggen                  |
> Interactive Media Division          |
> Commercial Dynamics Pty. Ltd.       | Curiouser and curiouser, said Alice.
> NSW, Australia                      |



------------------------------

Date: Fri, 27 Aug 1999 13:22:38 -0400
From: NILESH D MANKAME <nileshdm@isha.cis.upenn.edu>
Subject: new perl user : probs w/ processes
Message-Id: <Pine.GSO.3.95.990827131726.12246A-100000@isha.cis.upenn.edu>

Hi!
 
I am learning Perl from Randal Schwartz's excellent 'llama' book.
I am trying to run software pkgs like ABAQUS (whic run from the Unix
command line) from inside a PERL code by the following..

#!/pkg/bin/perl4.036
print("\nFile $ARGV[0]1.inp exists\n") if (-r "$ARGV[0]1.inp");
$fil="$ARGV[0]"."1.inp";
unless(fork)
	{
	 exec("pico $fil")&& die("\nUnable to exec proc 1");
	 exit;
	}
wait;
print("\nDone\n");

If I replace "pico $fil" with "abaqus job=$fil" , I simply get the final
"Done" without any run of the process requested. pico $ fil runs perfectly
as also abaqus job=filename from the command line. Somehow I am unable to
get the same command run from the exec cmd in PERL.
Can someone help me locate my mistake?
ThanX
 - Nilesh
-------------------------------------------------------------------------------
Nilesh D. Mankame	

Dept of Mech Engg. & App. Mechanics.| 297, Towne Bldg, 220 S.33rd street, 
School of Engg. & App. Science.	    | Philadelphia, PA 19104-6315.USA 
University of Pennsylvania.         | Tel:(215) 898-4825 Fax:(215)573-633
--------------------------------------------------------------------------------



------------------------------

Date: 27 Aug 1999 18:30:52 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: new perl user : probs w/ processes
Message-Id: <7q6lgs$ke1$1@lublin.zrz.tu-berlin.de>

NILESH D MANKAME  <nileshdm@isha.cis.upenn.edu> wrote in comp.lang.perl.misc:
>Hi!
> 
>I am learning Perl from Randal Schwartz's excellent 'llama' book.
>I am trying to run software pkgs like ABAQUS (whic run from the Unix
>command line)

You'll have to look up the abaqus documentation to see how to run
it in a daughter process.

>                from inside a PERL code by the following..

Doesn't Randal mention that it's "Perl" (the language) or "perl" (the executable), but not "PERL"?

>#!/pkg/bin/perl4.036

Use the -w flag.  Your perl is ancient.  Get a new one.  After you've
done so, also put "use strict;" on the next line.

>print("\nFile $ARGV[0]1.inp exists\n") if (-r "$ARGV[0]1.inp");
>$fil="$ARGV[0]"."1.inp";

It would have been clever to set $fil first.  also, $fil =
"$ARGV[0]1.inp" is simpler.

>unless(fork)
>	{
>	 exec("pico $fil")&& die("\nUnable to exec proc 1");
>	 exit;

No need for an exit after exec.  The child dies when pico terminates.

>	}
>wait;
>print("\nDone\n");
>
>If I replace "pico $fil" with "abaqus job=$fil" , I simply get the final
>"Done" without any run of the process requested. pico $ fil runs perfectly
>as also abaqus job=filename from the command line. Somehow I am unable to
>get the same command run from the exec cmd in PERL.
>Can someone help me locate my mistake?

Not without knowing what abaqus does.

Anno
-- 
$,=$"; $\=$/; print map { m/(?<=")(\w*)(?=")/g } map { eval; $@ }
'another->Just', 'Hacker->Perl';


------------------------------

Date: Fri, 27 Aug 1999 08:43:29 -0500
From: Kangas <kangas@anlon.com>
Subject: objects in memory
Message-Id: <37C69600.A37E99E5@anlon.com>

Is is possible for a parent process to pass an object to its child in
Win32.
Such as


########### PARENT.PL #############
use Win32;
use Win32::ODBC;
$db = new Win32::ODBC("DSN");

# do a little database stuff here

Win32::Process::Create($ProcessObj,
                                     "d:\\perl\\bin\\perl.exe",
                                     "child.pl stuff stuff",
                                     1,
                                     NORMAL_PRIORITY_CLASS,
                                     ".");

$db->Close();

########### CHILD.PL #############
print "The child has started.\n";
foreach() { blah blah }

# This is where I want to use the same ODBC $db object
# that was created in the parent.

Thanks.
--
Michael Kangas
Anlon Systems, Inc.
kangas@anlon.com




------------------------------

Date: 27 Aug 1999 11:11:56 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Perl Jargon Question
Message-Id: <37c6c6dc@cs.colorado.edu>

     [courtesy cc of this posting mailed to cited author]

In comp.lang.perl.misc, kai_tham@hotmail.com writes:
:I am especially interested in how qq{""} and uc() work.
:Could you also reply to kai_tham@tigerfund.com?

uc() is documented in the standard perlfunc manpage.
qq// is documented in the standard perlop manpage.

--tom
-- 
    Just don't create a file called -rf.  :-)
            --Larry Wall in <11393@jpl-devvax.JPL.NASA.GOV>


------------------------------

Date: 27 Aug 1999 18:04:32 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Perl Jargon Question
Message-Id: <7q6jvg$k9p$1@lublin.zrz.tu-berlin.de>

Kai Tham  <kai_tham@hotmail.com> wrote in comp.lang.perl.misc:
>Hello there,
>
>
>Could someone explain what the following means?
>
>in Main.pl
>Utility->fn(\@array);
>
>in Utility.pm
>sub fn($) {
>    my $Class = shift;
>    $" = "|";
>    $ArrayRef = @_[0];
>
>    @$ArrayRef = (
>        qq{"$$ArrayRef[0]"},$",
>        $$ArrayRef[1],$",
>        uc(qq{"$$ArrayRef[2]"})
>    );
>    return 1;
>}

Sheesh... what does it mean?  Here's what it does:

Main.pl calls fn as a class method of class Utility.  fn is obviously
a method called for its side effect, because it doesn't return a
useful value.  First thing in fn, it sets the variable $" to '|'.
Next it does some re-arranging of the string contents (presumably)
of the input array.  Things look a bit messy there.  The necessary
enclosing-in-quotes and uppercasing and the splicing in of $" had better
been done in separate steps.

In summary, it takes a (reference to) an array of three elements as
input.  The array the reference points to is replaced by a new
array of five elements which are the elements of the original array
either put in quotes or capitalized, or both, or none, interspersed
with strings "|".  Well, that's what it does.

What it means, you'll have to ask the author.  While you're at it,
ask him why he didn't localize $", why $Class is a lexical variable
and $ArrayRef isn't, why he (or she) gets one parameter via shift
and the other via @_[0], which should be $_[0],  and why...  If
you're trying to learn Perl from this dreck get another teacher.

>I am especially interested in how qq{""} and uc() work.

You can look those up.  qq is in perldoc perlop and uc is in
perldoc -f uc.

>Could you also reply to kai_tham@tigerfund.com?

No.  Post here, read here.  Especially when you don't give your
real address in your header.

Anno
-- 
$,=$"; $\=$/; print map { m/(?<=")(\w*)(?=")/g } map { eval; $@ }
'another->Just', 'Hacker->Perl';


------------------------------

Date: 27 Aug 1999 18:22:42 GMT
From: GoodfriB@jntf.osd.mil (James R. Goodfriend)
Subject: Re: perl on linux
Message-Id: <7q6l1i$f9m$1@news1.rmi.net>

In article <x3yemh3rda0.fsf@tigre.matrox.com>, aqumsieh@matrox.com says...
>
>
>GoodfriB@jntf.osd.mil (James R. Goodfriend) writes:
>
>> % perl -pie 's/\r//g' script.pl
>
>That should really be:
>
>        % perl -pi -e 'y/\r//' script.pl
>
>If there is something after the '-i', perl takes it as the extension
>of the backup copy it creates. So it doesn't see the '-e'.

	Yes, um, I followed up my own post explaining my error, after 
T.Christiansen alerted me to my gaffe.  This was like, 3 weeks ago...

				-Bob



------------------------------

Date: Fri, 27 Aug 1999 11:27:42 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Perlshop Modules
Message-Id: <37C6D89E.B9345378@mail.cor.epa.gov>

Eric Otey wrote:
> 
> I'm the webmaster for a company trying to integrate real-time
> credit card verification with their on-line catalog, run by
> perlshop.  We are thinking about going with Authorize.Net.  I
> contacted Authorize.Net to see if they were compatible with
> Perlshop.  They replied saying that there were some modules out
> there that would make the connection with Authorize.Net.  I was
> wondering if anyone here could point me in the right direction to
> find these modules, if they actually do exist (so far I haven't
> found any).

This group has very little to do with the PerlShop app.
But there is a mailing list for PerlShop which might be 
able to help you.  You can subscribe to it by going to:

perlshop-subscribe@topica.com

HTH,
David
-- 
David Cassell, OAO                     cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician


------------------------------

Date: Fri, 27 Aug 1999 11:38:01 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Please help me
Message-Id: <37C6DB09.D065DAC3@mail.cor.epa.gov>

alexander.zinniker@trivadis.com wrote:
> 
> Hi
> 
> Maybe the user your web server is running with is not allowed to write
> in your directory. To see the reason use:
> 
> open (OUT, ">$myfile") || die print "content-type:text/plain\n\nError:
> $!\n";
> 
> $! contains the error which occurs, when your CGI tries to create your
> file.

A helpful answer.  Good.  You might want to put a space in 
between the 'content-type:' and the word 'text', though.

Now then, would you please do the following?
[1] Post your replies after the question in standard Usenet
    format, instead of jeopardy-style; and
[2] trim off the irrelevant parts of the original post,
    particularly the sig [unless you wish to comment on
    that also].

Thank you.  Your cooperation will make your experience in
this newsgroup a happier one, since you won't have annoying
posts [like this one] constantly harassing you.

David
-- 
David Cassell, OAO                     cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician


------------------------------

Date: Fri, 27 Aug 1999 11:31:04 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
To: Danny Wong <dannywong@hknet.com>
Subject: Re: Project Manager wanted
Message-Id: <37C6D968.B95C93D6@mail.cor.epa.gov>

[courtesy cc e-mailed to poster]

Danny Wong wrote:
> 
> We are a Network Consultancy Company in Central and have vacancy for the
> following post:
[snip]

Danny, this is the wrong place to post your job announcement.
Perhaps you know that by now.  ButI am writing you and placing
this reply in the newsgroup in the fond hope that the next
person who considers this might just see an unhappy reply and
realize that job announcements should go in newsgroups which
have the word 'jobs' in their titles.

There may be some sort of alt.perlcgi.freelance group
which accept your post too, but I can't say for certain.

David
-- 
David Cassell, OAO                     cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician


------------------------------

Date: Fri, 27 Aug 1999 11:33:52 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: recovering the query string while using CGI.pm
Message-Id: <37C6DA10.417040A8@mail.cor.epa.gov>

gmahler@my-deja.com wrote:
[big snip]
> I totally understand your incredulity (is that a word?),

yes, and a good one too.

> but alas, it is true.  Here's what I get when I type
> "perl -v" :
> 
> This is perl, version 5.003 with EMBED
>         built under solaris at Jul 15 1996 18:24:47
>         + suidperl security patch
> 
> Copyright 1987-1996, Larry Wall
[more snippage]

Ooh.  Do you have any other programming languages which you
have not upgraded for more than three years?  I hope not.
Please get the latest Perl and install it.  It is now a
pretty straightforward install on Solaris, and you won't have 
to worry about that suidperl security patch either. 

David
-- 
David Cassell, OAO                     cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician


------------------------------

Date: Fri, 27 Aug 1999 11:24:16 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Spawn a Web process
Message-Id: <37C6D7D0.ECBCA92E@mail.cor.epa.gov>

Lauren Smith wrote:
[snip]
> It's just as difficult for Abigail to know the problem with your code as
> it is for you to understand her answer.  Your question has something to
> do with the code that you assumed we already knew (D. Cassell might have
> known, he's been touting his PSI:ESP module, still in beta).  Abigail's

I knew you were going to say that.

> answer assumed that you had a line 17 in your program that was failing.

Or else Abigail was making the standard unixish how-can-I-know-where-
the-error-is-when-you-show-me-no-code joke to remind the poster of
his lapse...  Only the poster didn't know the background of the
joke and hence didn't get it.

> If you could be a lot more clear about what your problem is, maybe even
> *gasp* posting a small snippet of code that demonstrates the problem,
> your question would stand a much greater chance of being taken
> seriously.

And using the PSI::ESP module, I can see that the operative word
in that sentence is *small*.  Please keep that code snippet under
40 lines.  Under 10 if feasible.

Thank you,
David
-- 
David Cassell, OAO                     cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician


------------------------------

Date: 27 Aug 1999 17:21:10 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: The extent of double-quotish interpolation
Message-Id: <7q6he6$nhe$1@pegasus.csx.cam.ac.uk>

Randal L. Schwartz <merlyn@stonehenge.com> wrote:
>
>This is simple, when you remember the very simple rule:
>
>	Perl doesn't interpolate expressions, just variables.

That's exactly the answer I would have given, if Randal hadn't got there
first (or rather, with the qualification "scalar or array variables").
But it also caused me to predict the last example incorrectly:

       print "@a[2..$f->()]";

That isn't a variable.    It's a list of variables.    So it seems like
some fudging is needed.


Mike Guy


------------------------------

Date: Fri, 27 Aug 1999 11:26:19 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: The extent of double-quotish interpolation
Message-Id: <37C6D84B.59A27CE1@mail.cor.epa.gov>

elephant wrote:
> 
> David Cassell writes ..
> >elephant wrote:
> >[a nice, long, interesting discussion, followed by:]
> >> you're right there .. the doco seems to be quite sparse on this topic
> >
> >Well, you just wrote a good explication.  Why don't you submit
> >it, so it can go into the docs somewhere, in the near future?
> >
> >Perhaps it's more suitable for one of the FMTEYEWTK series...
> 
> why ? .. because I don't know that it's true .. I just guessed .. I
> don't think I could say absolutely unless I knew the Perl source -
> and I don't like looking at the Perl source code (a lot of Larry's
> comments make me nervous *8^) and I'm sure I wouldn't understand it if I
> did

Perhaps.  But your list of examples with discussion seems
to provide a clear set of working examples for a beginner
to use while building his/her intuition.  I think it could 
be an asset to have those somewhere in the docs or references,
even if it's a file at your website people can point others
to.

David
-- 
David Cassell, OAO                     cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician


------------------------------

Date: 27 Aug 1999 19:03:13 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: The extent of double-quotish interpolation
Message-Id: <7q6ndh$kgg$1@lublin.zrz.tu-berlin.de>

David Cassell  <cassell@mail.cor.epa.gov> wrote in comp.lang.perl.misc:
>elephant wrote:
>> 
>> David Cassell writes ..
>> >elephant wrote:
>> >[a nice, long, interesting discussion, followed by:]
>> >> you're right there .. the doco seems to be quite sparse on this topic
>> >
>> >Well, you just wrote a good explication.  Why don't you submit
>> >it, so it can go into the docs somewhere, in the near future?
>> >
>> >Perhaps it's more suitable for one of the FMTEYEWTK series...
>> 
>> why ? .. because I don't know that it's true .. I just guessed .. I
>> don't think I could say absolutely unless I knew the Perl source -
>> and I don't like looking at the Perl source code (a lot of Larry's
>> comments make me nervous *8^) and I'm sure I wouldn't understand it if I
>> did
>
>Perhaps.  But your list of examples with discussion seems
>to provide a clear set of working examples for a beginner
>to use while building his/her intuition.  I think it could 
>be an asset to have those somewhere in the docs or references,
>even if it's a file at your website people can point others
>to.

I agree.  The issue is murky and the original list has fooled me
and others in various places.  Just the examples with results and,
where necessary, an explanation what happened (not why it had to
happen, leave that to the rtfsource folks) would find a branch in
the document tree to roost on.

We're lucky to have MTOWTDI, and probably string interpolation should
generally be avoided, except for the most straightforward cases.  Come
to think of it, I rarely see it used in good code outside print's and
maybe building up of file names.

Anno
-- 
$,=$"; $\=$/; print map { m/(?<=")(\w*)(?=")/g } map { eval; $@ }
'another->Just', 'Hacker->Perl';


------------------------------

Date: Fri, 27 Aug 1999 14:09:02 -0400
From: Clayton Scott <claytons@nortelnetworks.com>
Subject: Re: Timeing out "new Net::FTP"
Message-Id: <37C6D43E.3D6AD57E@nortelnetworks.com>

Donovan Rebbechi wrote:
> 
> Hi. I am working on a program that uses Net::FTP
> 
> If I try to open an FTP connection when the machine is not connected,
> I get a hang ( probably because it's waiting for DNS to resolve )
> 
> So I've used an eval block to time it out:

What's wrong with the Timeout option?

From `perldoc Net::FTP`:

OPTIONS are passed in a hash like fashion, using key and value pairs. 
Possible options are:

Firewall - The name of a machine which acts as a FTP firewall.
This can be overridden by an environment variable FTP_FIREWALL. If
specified, and the given host cannot be directly connected to,
then the connection is made to the firewall machine and the string
@hostname is appended to the login identifier. This kind of setup
is also refered to as a ftp proxy.

Port - The port number to connect to on the remote machine for the
FTP connection

Timeout - Set a timeout value (defaults to 120)

Debug - debug level (see the debug method in the Net::Cmd manpage)

Passive - If set to a non-zero value then all data transfers will
be done using passive mode. This is not usually required except
for some dumb servers, and some firewall configurations. This can
also be set by the environment variable FTP_PASSIVE.

If the constructor fails undef will be returned and an error
message will be in $@



Clayton


------------------------------

Date: 27 Aug 1999 14:35:09 -0400
From: elflord@panix.com (Donovan Rebbechi)
Subject: Re: Timeing out "new Net::FTP"
Message-Id: <slrn7sdmis.hl1.elflord@panix3.panix.com>

On Fri, 27 Aug 1999 14:09:02 -0400, Clayton Scott wrote:
>Donovan Rebbechi wrote:

>What's wrong with the Timeout option?

It doesn't time out DNS lookups. ( I already use the timeout option ... ) 
It only times out ftp operations that stand
still for too long ( such as datastream connections, and ftp commands )

I am starting to think that anything that uses a hostname lookup can't be 
done asynchronously unless I use an implicit fork ( eg $foo=`nslookup $bar` )

-- 
Donovan


------------------------------

Date: Tue, 24 Aug 1999 11:30:11 -0600
From: "Linux GNUBEE" <dchurch@kabana.net>
Subject: URL-Encoded Format with LWP?
Message-Id: <7pukqr$8sc$1@macaw.cyberport.com>

I am grabbing some data from CGI.pm and trying to POST that data back to
another CGI form using LWP::UserAgent.

What is the best way to get the data into a format LWP can understand?
CGI.pm can put it into a URL-encoded format, but I can't seem to find any
references to that format when using LWP::UserAgent.

Thanks.

Dan Church
dchurch@kabana.net
church@spinn.net





------------------------------

Date: 27 Aug 1999 17:56:04 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: Using a customized debugger.
Message-Id: <7q6jfk$pbi$1@pegasus.csx.cam.ac.uk>

In article <37c69a6b.3341997@news.iglou.com>,
Greg Miller <gmiller@iglou.com> wrote:
>	I managed to get it to work by calling my custom debugger
>perl5db.pl, putting it in the current directory, and running perl
>with:
>
>perl -I. -d test.pl

See the description of   -d:foo   in  perlrun.   And lots more details
in perldebug  (but if you've written your own debugger, you probably
already know that).

But you have to put your debugger in Devel::something.


Mike Guy


------------------------------

Date: Fri, 27 Aug 1999 13:44:20 -0400
From: "Julio Kuplinsky" <jkuplins@rcc.com>
Subject: Using stream 2 ways
Message-Id: <DfAx3.1395$2k1.3365@client>

Consider this code fragment

        @files = <STDIN>;
        .......
        chomp ($ans = <STDIN>);

If I invoke this as

    grep -l foo * |  <myprogram>

then @files does get the filenames, but execution does *not* stop to
read the user response into $ans. No, saying

    close STDIN;

doesn't help.

Can anyone help? Thnx.





------------------------------

Date: Fri, 27 Aug 1999 15:33:04 +1000
From: faqtori@hotmail.com (Factory)
Subject: Re: Why use Perl when we've got Python?!
Message-Id: <MPG.122fcf84a811c6099896e8@news.melbpc.org.au>

In article <7putsq$3ql$1@lycaeus.calstatela.edu>, ramune@bigfoot.com 
says...
> In article <slrn7s2lb3.k6b.abigail@alexandra.delanet.com>,
> Abigail <abigail@delanet.com> wrote:
> [snip amusing rant]
> >Yeah, those math texts from the 16th and 17th century, they are sooooo easy
> >to read, because they lack all the symbols. Not to mention the original
> >Euclid and those other Greeks, who had no symbols at all!
> 
> <GRIN>
> Oh, but they're written with only symbols!  All those confusing greek symbols
> that mathematicians use are the basic building blocks for the language!  Why
> didn't they just use English?
> </GRIN>

  Hmm that might be a bit off, the anchient Greeks had no concept of 
variables, thus you would never see f(x)= 2y in any old greek 
mathematics. IIRC variables were discovered(?) by Al-Jabar sometime 
after.
  Thus the Greeks certainly did not use symbols, and it held back 
mathematics. Not that this applies to python vs. perl.


------------------------------

Date: 1 Jul 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 1 Jul 99)
Message-Id: <null>


Administrivia:

The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc.  For subscription or unsubscription requests, send
the single line:

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

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" from
almanac@ruby.oce.orst.edu. The real FAQ, as it appeared last in the
newsgroup, can be retrieved with the request "send perl-users FAQ" from
almanac@ruby.oce.orst.edu. 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" from
almanac@ruby.oce.orst.edu. 

For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V9 Issue 663
*************************************


home help back first fref pref prev next nref lref last post