[8481] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 2098 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Mar 14 11:07:23 1998

Date: Sat, 14 Mar 98 08:00:37 -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           Sat, 14 Mar 1998     Volume: 8 Number: 2098

Today's topics:
        [Q] texi --> text or html perl script? <jari.aalto@poboxes.com>
    Re: Contents of a file into checkbox's [CGI.pm] <rmcvay@acm.org>
        Counter-Script dirk.ebeling@welfen-netz.de
        Does not work on NT (perl -e) <mikeloni@altair.com>
    Re: Does not work on NT (perl -e) <jdf@pobox.com>
    Re: Does STDIN ever close? (Martin Vorlaender)
        Email - Text formatting problem <javaneese@hotmail.com>
    Re: Email - Text formatting problem <Tony.Curtis+usenet@vcpc.univie.ac.at>
    Re: File::Find and -w (Martin Vorlaender)
    Re: Help: Getting rid of warning messages (Martin Vorlaender)
    Re: Is there a "Newsgroup" for Newbies to Perl? <merlyn@stonehenge.com>
    Re: Is there a "Newsgroup" for Newbies to Perl? <merlyn@stonehenge.com>
    Re: Is there any way to evaluate a string as a variable (Jonathan Stowe)
    Re: learn <sutok@gmx.de>
    Re: learn <jdf@pobox.com>
    Re: MS PWS won't run CGI (Jonathan Stowe)
        NT option pack 4 <Art@aacs.com>
    Re: NT option pack 4 <sowmaster@juicepigs.com>
    Re: NT option pack 4 <jdf@pobox.com>
    Re: Perl - mySQL - Precompiler <agr30@uni-koeln.de>
    Re: Perl4 vs Perl 5 (Matt Elrod)
    Re: Perl4 vs Perl 5 <chasecreek.systemhouse@usa.net>
    Re: PGP / $PGPPASS <dformosa@st.nepean.uws.edu.au>
    Re: Redirect to another url <Tony.Curtis+usenet@vcpc.univie.ac.at>
    Re: Redirecting to a script on another server. (Jonathan Stowe)
    Re: Redirecting to a script on another server. <G.S.Cooper@iti.salford.ac.uk>
    Re: rsh hanging... <ariels@mangal.cs.huji.ac.il>
    Re: Run subroutines from another CGI file? (Martin Vorlaender)
    Re: splitting by one or more values <Tony.Curtis+usenet@vcpc.univie.ac.at>
    Re: tainted glob confusion <flavell@mail.cern.ch>
    Re: tainted glob confusion <dformosa@st.nepean.uws.edu.au>
    Re: What command Calls a prog on the web? (Peter Caffin)
    Re: Wierd redirection problem with Location: <sowmaster@juicepigs.com>
        Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: 14 Mar 1998 17:43:58 +0200
From: Jari Aalto <jari.aalto@poboxes.com>
Subject: [Q] texi --> text or html perl script?
Message-Id: <ptrogz9tgzl.fsf@uta.fi>



    Hi, [CC, welcomed]

    Where can I find .texi file converters? I'd like to have
    texi2html and texi2text filters in perl.

    jari

    


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

Date: Sat, 14 Mar 1998 09:05:40 -0600
From: Ray McVay <rmcvay@acm.org>
Subject: Re: Contents of a file into checkbox's [CGI.pm]
Message-Id: <350A9CC4.F7597ACC@acm.org>

tony wrote:

> $input=catlist;   # 'catlist' is a space seperated file in a single line
>             # consisting of: eenie meenie minie
>             # the actual file might be tab seperated though
>             # depends on whether I can work it out with spaces first

Bare strings are bad form so use 'catlist' instead, ok?

> 
> open (INPUT, $input) ;

open INPUT, $input or die "Couldn't open $indput: $!\n";

You're ASSUMING you opened the file.  I don't think you did and you
didn't let Perl TELL you that it couldn't.




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

Date: 14 Mar 1998 03:05:46 -0800
From: dirk.ebeling@welfen-netz.de
Subject: Counter-Script
Message-Id: <6edoaa$6at@edrn.newsguy.com>

Hi,
is anybody out there, who can help me by visualisation a counter Service.
Programming the scripts and so on.

Offers to dirk.ebeling@welfen-netz.de


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

Date: Sat, 14 Mar 1998 08:59:49 -0500
From: "Peter P. Mikelonis" <mikeloni@altair.com>
Subject: Does not work on NT (perl -e)
Message-Id: <350A8D55.BE544903@altair.com>

The following does not work on NT4.0 with perl5, but it works on unix
just fine.

Can someone help with the syntax.

perl -e 'print "kdkdk\n"'
Can't find string terminator "'" anywhere before EOF at -e line 1.

Please email a respone if you can.
--
==================================================================
  Pete Mikelonis            |   Url  :   http://www.altair.com
  Altair Computing, Inc.    |   Email:   mikeloni@altair.com
  1757 Maplelawn Drive      |   Phone:   (248) 614-2400  ext 239
  Troy, MI  48084-4004      |   Fax  :   (248) 614-2411
==================================================================




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

Date: 14 Mar 1998 10:45:20 -0500
From: Jonathan Feinberg <jdf@pobox.com>
To: "Peter P. Mikelonis" <mikeloni@altair.com>
Subject: Re: Does not work on NT (perl -e)
Message-Id: <67lhnunj.fsf@news.concentric.net>

"Peter P. Mikelonis" <mikeloni@altair.com> writes:

> The following does not work on NT4.0 with perl5, but it works on unix
> just fine.

> perl -e 'print "kdkdk\n"'

The NT shell doesn't know what to do with single quotes.  You'll have
to get used to a different style of one-liner, e.g.,

  perl -e "print qq(An interpolated string in $ENV{OS}.\n);"


-- 
Jonathan Feinberg   jdf@pobox.com   Sunny Brooklyn, NY


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

Date: Sat, 14 Mar 1998 08:08:34 +0100
From: martin@RADIOGAGA.HARZ.DE (Martin Vorlaender)
Subject: Re: Does STDIN ever close?
Message-Id: <350a2cf2.524144494f47414741@radiogaga.harz.de>

Rik Turnbull (rik@csc.liv.ac.uk) wrote:
: Question is: how do you know when there's no more input
: to STDIN? Surely the above should just return immediately
: when it's called with a GET URL? I can't even use alarm()
: to time it out...

: So what's the obvious thing that I'm missing here?

You want to leave the details of getting CGI input to CGI.pm.
It will do The Right Thing(tm).

cu,
  Martin
--
                          | Martin Vorlaender | VMS & WNT programmer
 Ceterum censeo           | work: mv@pdv-systeme.de
 Redmondem delendam esse. |       http://www.pdv-systeme.de/users/martinv/
                          | home: martin@radiogaga.harz.de


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

Date: Sat, 14 Mar 1998 12:24:29 +0100
From: Daniel <javaneese@hotmail.com>
Subject: Email - Text formatting problem
Message-Id: <350A68ED.25A6BEAF@hotmail.com>

Hi all PERL gurus :-)

I have a problem with formatting text when using a form to send an
e-mail. I want to be able to print out the content in leftaligned tables
like this:

Name:             Bill Clinton
Address:         White House
Profession:      President

Does anyone know how to solve this?  All help will be highly
appreciated!

/Daniel



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

Date: 14 Mar 1998 14:37:47 +0100
From: Tony Curtis <Tony.Curtis+usenet@vcpc.univie.ac.at>
Subject: Re: Email - Text formatting problem
Message-Id: <7x90qdqtp0.fsf@beavis.vcpc.univie.ac.at>

Re: Email - Text formatting problem, Daniel
<javaneese@hotmail.com> said:

Daniel> Hi all PERL gurus :-) I have a problem with
Daniel> formatting text when using a form to send an
Daniel> e-mail. I want to be able to print out the content
Daniel> in leftaligned tables

perldoc perlform

hth
-- 
Tony Curtis, Systems Manager, VCPC,      | Tel +43 1 310 93 96 - 12; Fax - 13
Liechtensteinstrasse 22, A-1090 Wien, AT | http://www.vcpc.univie.ac.at/

"Everything I am, I learned on the back of cereal boxes" ~ RJ, "Over the Hedge"


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

Date: Sat, 14 Mar 1998 08:51:49 +0100
From: martin@RADIOGAGA.HARZ.DE (Martin Vorlaender)
Subject: Re: File::Find and -w
Message-Id: <350a3715.524144494f47414741@radiogaga.harz.de>

Kent E. Holsinger (kent@darwin.eeb.uconn.edu) wrote:
: Running the following very simple script with appropriate command line
: arguments: 
[...snip...]
: produces the following output

:    Use of unitialized value at /usr/local/lib/perl5/File/Find.pm line 150

: Looking at the relevant line in Find.pm, I suspect that the culprit is
: the variable $Is_VMS. Have I done something wrong in building the
: installation (probably), or is this something that needs to be fixed
: in File::Find (unlikely)?

Doc not read error:

  File::Find assumes that you don't alter the $_ variable.  If you do then
  make sure you return it to its original value before exiting your function.

Re-write the while(<FILE>) loop in mygrep().

cu,
  Martin
--
                          | Martin Vorlaender | VMS & WNT programmer
 Ceterum censeo           | work: mv@pdv-systeme.de
 Redmondem delendam esse. |       http://www.pdv-systeme.de/users/martinv/
                          | home: martin@radiogaga.harz.de


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

Date: Sat, 14 Mar 1998 08:48:25 +0100
From: martin@RADIOGAGA.HARZ.DE (Martin Vorlaender)
Subject: Re: Help: Getting rid of warning messages
Message-Id: <350a3649.524144494f47414741@radiogaga.harz.de>

Adam Reeves (areeves@us.ibm.com) wrote:
: So I guess, the next question is am I supposed to use the
: 'use vars' pragma to solve this problem?

Yep.

: If so how?

perldoc vars

cu,
  Martin
--
                          | Martin Vorlaender | VMS & WNT programmer
 Ceterum censeo           | work: mv@pdv-systeme.de
 Redmondem delendam esse. |       http://www.pdv-systeme.de/users/martinv/
                          | home: martin@radiogaga.harz.de


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

Date: 14 Mar 1998 08:03:08 -0700
From: Randal Schwartz <merlyn@stonehenge.com>
To: Mark Stackhouse <stackhou@execpc.com>
Subject: Re: Is there a "Newsgroup" for Newbies to Perl?
Message-Id: <8c7m5xgvrn.fsf@gadget.cscaper.com>

>>>>> "Mark" == Mark Stackhouse <stackhou@execpc.com> writes:

Mark> I R A Aggie wrote:

>> In article <3508c605.180930773@news.xmission.com>, doswald@xmission.com wrote:
>> 
>> + A newbie newsgroup would indeed be a nightmare; a zillion questions
>> + (not unlike this group's current state of affairs) and a half zillion
>> + wrong answers.
>> 
>> Worse than that, tho. The newbies would avoid such a newsgroup and
>> go looking for the perl wizards newsgroup.
>> 

Mark> Are you being facetious here, or do you really stand behind this
Mark> statement?  Newbies and intermediates would eventually get
Mark> things hashed out (pun intended)...  and learn along the way.

Not at all.  He speaks the truth.  For years, comp.unix.wizards
(before it became moderated) was *infested* with newbies, no matter
how many FAQs and notices were posted.  A newbie immediately posts in
 .wizards because he/she thinks "I need to talk to a wizard about how
to add a newline to this print!"  So, the moderated group's criterion
became "don't post here if you need to talk to a wizard -- post here
if YOU ARE a wizard -- and we'll know if you aren't".

print "Just another Perl hacker," # but not what the media calls "hacker!" :-)
## legal fund: $20,990.69 collected, $186,159.85 spent; just 171 more days
## before I go to *prison* for 90 days; email fund@stonehenge.com for details

-- 
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: 14 Mar 1998 08:09:23 -0700
From: Randal Schwartz <merlyn@stonehenge.com>
To: Josh Carter <josh@removethis.spies.com>
Subject: Re: Is there a "Newsgroup" for Newbies to Perl?
Message-Id: <8c3eglgvh8.fsf@gadget.cscaper.com>

>>>>> "Josh" == Josh Carter <josh@removethis.spies.com> writes:

Josh> I think Mark has a very valid request; many of us are professional
Josh> engineers working on deadlines, and when someone gets stuck, it would be
Josh> nice to have a no-flames forum for Q&A.

If you need that kind of support, buy a support contract.  Usenet is
not that.  Don't confuse the two.

Josh>  Sure, there's no guarantee the
Josh> poster will get a correct and timely answer, but it's better than
Josh> thrashing around and not getting *any* understandable answer.

If the question is WORD FOR WORD something right out of the FAQ, and
yet still gets posted here, just exactly how much research did you do
before wasting this free resource?

This is the point the experts are making here OVER and OVER again.
There are FAR too many WORD FOR WORD FROM THE FAQ questions being
posted here.

Josh> This is something the "wizards" need to understand clearly: not everyone
Josh> is at the same level of expertise, and not everyone learns the same way.

We *completely* understand that.  We just don't understand why people
can't do about 15 minutes of research on their own, before wasting at
least 30 seconds time of 1000 people that are reading this group
wanting to help.  Do the math.

Josh> I'm not arguing in favor of not using the docs when they answer the
Josh> question -- I personally find almost all the answers I need on the
Josh> various O'Reilly books -- but if someone finds the something confusing,
Josh> I don't think he/she should be flamed for asking about it.

I would certainly easily help someone if they were asking a non-FAQ
(or asking a question about a FAQ's answer), and had a cogent,
well-formed question.  And I think most of the other experts here
agree.  We never flame those. :)

But what exactly *is* the excuse for asking a FAQ?  Laziness (of the
non-Larry kind :-).  This *begs* a flame.

print "Just another Perl hacker," # but not what the media calls "hacker!" :-)
## legal fund: $20,990.69 collected, $186,159.85 spent; just 171 more days
## before I go to *prison* for 90 days; email fund@stonehenge.com for details

-- 
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: Wed, 11 Mar 1998 18:32:04 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: Is there any way to evaluate a string as a variable name?
Message-Id: <3506d6e9.5280379@news.btinternet.com>

On 14 Mar 1998 00:15:04 GMT, "John Hibscher" <john@apte.com> wrote:


>Is there any way to evaluate a string as a variable name? For example, I
>have a dynamic number of form fields, each named wc1, wc2, wc3, ..., wcn
>and I know the value of n. Now how do I refer to these fields in perl? I
>tried variations on the following, but I think I'm in error:
>
>for ($i=1; $i<=$wcnum; $i++) {
>  $wcname = 'wc'.$i;
>  print MAIL "$FORM{$wcname}\n\n";
>}
>

I'm not entirely certain what you are trying to achieve here but as
far as evaluating a string as a variable name goes you can do
something like this:

$wcnum = 5;
$wc1= "foo";
$wc2= "bar";
$wc3= "splat";
$wc4= "woof";
$wc5= "meow";
for ($i=1; $i<=$wcnum; $i++) {
  $wcname = 'wc'.$i;
  print "${$wcname}\n\n";
}

which behaves as expected.
You almost certainly want to refer to the perlref manpage for more and
some caveats on this approach.

Have fun

Jonathan Stowe
See the MetaFaq at http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm


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

Date: 14 Mar 1998 11:12:15 GMT
From: Florian Kuehnert <sutok@gmx.de>
Subject: Re: learn
Message-Id: <6edomf$60d$2@babelon.in-brb.de>

ROBERT DOOKS schrieb/wrote/icrivait:
>Where can I go to learn Perl free on-line?  Any websites that have free
>tutorials etc?

The documentation of perl is quite good. (perldoc perl is good for a
first start).

  Florian


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

Date: 14 Mar 1998 08:46:05 -0500
From: Jonathan Feinberg <jdf@pobox.com>
Subject: Re: learn
Message-Id: <ogz9peqq.fsf@news.concentric.net>

ROBERT DOOKS <DOOKS@netcom.ca> writes:

> Where can I go to learn Perl free on-line?  Any websites that have free
> tutorials etc?

Although http://www.perl.com is a good starting point, there is no
substitute for the book _Learning Perl_.  You'll have to pay for it,
unless you're devious and amoral, but it's worth its weight in
pearls.

-- 
Jonathan Feinberg   jdf@pobox.com   Sunny Brooklyn, NY


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

Date: Wed, 11 Mar 1998 18:32:19 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: MS PWS won't run CGI
Message-Id: <3506d429.4807145@news.btinternet.com>

On Fri, 13 Mar 1998 17:42:03 -0600, dbreedlo@ix.netcom.com wrote:

<snip>
>
>The following should cause my script (Cgi.exe) to execute, yes?
><P><A HREF="http://localhost/cgi-bin/cgi.exe">Cgi.exe</A></P>
>
 .exe ? EXE?  that aint perl at all!!
>My question: Where in Personal Web Server do I turn on CGI execution?
>Are there any docs available for PWS?
>
<snip>

However from memory so probably utterly incorrect - in regedit
HKEY_LOCAL_MACHINE/CurrentControlSet/Sevices/W3SVC/Parameters/ScriptMap

then add extension and the interpreter for that type of file.

Have fun.
Jonathan Stowe
See the MetaFaq at http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm


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

Date: Sat, 14 Mar 1998 12:31:53 GMT
From: "Ethan" <Art@aacs.com>
Subject: NT option pack 4
Message-Id: <ZMuO.89820$Ly.1287734@news.internetMCI.com>

I have an NT server that NT Option pack 4 was applied to recently. This
seems to have made two of our Perl scripts stop working. The scripts are
used to request a new user be created and e-mail be created as well. When
run from a browser it simply gives you a cgi error.

The perl script follows. Any help in identifying the error would be great.

@rem = '
# @echo off
perl %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
goto endofperl
@rem ';

# print "HTTP/1.0 200 OK\n";
# print "Content-Type: text/html\n\n";

# This perl program parses the E-Mail requests and sends them to the
administrator.
# Written 8-9-96     psmail.pl

$webmaster = "user@mailsrv.com";
$client = $ENV{'REMOTE_ADDR'};
&parse_form_data (*simple_form);
$Name = $simple_form{'Name'};
$file = 'c:\inetpub\scripts\email.txt';

if ($Name) {
   open(EMAIL, ">$file");
   close(EMAIL);
   open(EMAIL, ">>$file");
   print EMAIL "Please add the following new E-mail account:", "\n\n";
   print EMAIL "Name: $simple_form{'Name'}", "\n";
   print EMAIL "Phone: $simple_form{'Phone'}", "\n";
   print EMAIL "Department: $simple_form{'Dept'}", "\n";
   print EMAIL "Location: $simple_form{'Location'}", "\n";
   print EMAIL "Requested by: $simple_form{'Requested+By'}", "\n";
   print EMAIL "Supervisor: $simple_form{'Super'}", "\n";
   print EMAIL "Request Date: $simple_form{'Request+Date'}", "\n";
   print EMAIL "PC or Terminal: $simple_form{'pcterm'}", "\n";
   print EMAIL "On Network: $simple_form{'On+Network'}", "\n";
   print EMAIL "Terms Prompt: $simple_form{'Terms'}", "\n";
   print EMAIL "Remote Dial: $simple_form{'Remote+Dial'}", "\n";
   close(EMAIL);
   @runfile = ('c:\inetpub\scripts\email.bat');
   system(@runfile);
   print "\n";
   print "<H4>The following email information has been forwarded to the
Administrator: </H4>", "\n";
   print "<H4>Name: $simple_form{'Name'}</H4>", "\n";
   print "<H4>Phone: $simple_form{'Phone'}</H4>", "\n";
   print "<H4>Department: $simple_form{'Dept'}</H4>", "\n";
   print "<H4>Location: $simple_form{'Location'}</H4>", "\n";
   print "<H4>Requested by: $simple_form{'Requested+By'}</H4>", "\n";
   print "<H4>Supervisor: $simple_form{'Super'}</H4>", "\n";
   print "<H4>Request Date: $simple_form{'Request+Date'}</H4>", "\n";
   print "<H4>PC or Terminal: $simple_form{'pcterm'}</H4>", "\n";
   print "<H4>On Network: $simple_form{'On+Network'}</H4>", "\n";
   print "<H4>Terms Prompt: $simple_form{'Terms'}</H4>", "\n";
   print "<H4>Remote Dial: $simple_form{'Remote+Dial'}</H4>", "\n";
} else

   print "<H4>Your request was not complete...Please Reenter information.
</H4>", "\n\n";
}
print "<H4>Click on [BACK] to return to the E-mail Request Form...</H4>",
"\n";
exit(0);

sub parse_form_data
{
local (*FORM_DATA) = @_;

local ( $request_method, $query_string, @key_value_pairs,
                         $key_value, $key, $value);

$request_method = $ENV{'REQUEST_METHOD'};

if ($request_method eq "GET") {
   $query_string = $ENV{'QUERY_STRING'};
} elsif ($request_method eq "POST") {
   read (STDIN, $query_string, $ENV{'CONTENT_LENGTH'});
} else {
   &return_error (500, "Server Error",
                 "Server uses unsupported method");
}

@key_value_pairs = split (/&/, $query_string);

foreach $key_value (@key_value_pairs) {
    ($key, $value) = split (/=/, $key_value);
    $value =~ tr/+/ /;
    $value =~ s/%([\dA-Fa-f] [\dA-Fa-f])/pack ("C", hex ($1))/eg;
    if (defined($FORM_DATA{$key})) {
       $FORM_DATA{$key} = join ("\0", $FORM_DATA{$key}, $value);
    } else {
       $FORM_DATA{$key} = $value;
    }
  }
}

sub return_error
{
    local ($status, $keyword, $message) = @_;

    print "Content_type: text/html", "\n";
    print "Status: ", $status, " ", $keyword, "\n\n";

    print <<End_of_Error;

<title>CGI Program - Unexpected Error</title>
<h1>$keyword</h1>
<hr>$message</hr>
Please contact $webmaster for more information.

End_of_Error

exit(1);
}

__END__
:endofperl





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

Date: Sat, 14 Mar 1998 09:14:01 -0500
From: Bob Trieger <sowmaster@juicepigs.com>
To: Ethan <Art@aacs.com>
Subject: Re: NT option pack 4
Message-Id: <350A90A9.3DE8@juicepigs.com>

Ethan wrote:
> 
> I have an NT server that NT Option pack 4 was applied to recently. This
> seems to have made two of our Perl scripts stop working. The scripts are
> used to request a new user be created and e-mail be created as well. When
> run from a browser it simply gives you a cgi error.

It sounds like Option Pack 4 had a current version of Perl in it and
your old perl 4 code needs modifications. Do a "perl -v" at the DOS
prompt to get the version of perl you are running.

	 $webmaster = "user@mailsrv.com";

you have to escape the @ in perl 5;

	 $file = 'c:\inetpub\scripts\email.txt';

You have to back whack the backwhacks;

If you run this script with the -w flag it will point out the errors for
you and you can fix them.


HTH
Bob Trieger
sowmaster@juicepigs.com


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

Date: 14 Mar 1998 10:47:02 -0500
From: Jonathan Feinberg <jdf@pobox.com>
Subject: Re: NT option pack 4
Message-Id: <3eglnukp.fsf@news.concentric.net>

Bob Trieger <sowmaster@juicepigs.com> writes:


> 	 $file = 'c:\inetpub\scripts\email.txt';
> 
> You have to back whack the backwhacks;

Backwhacks are wack, jack.  Use regular slashes; they'll work just
fine, and are more legible to other Perlers IMHO.

   $file = 'c:/path/to/some/file';

-- 
Jonathan Feinberg   jdf@pobox.com   Sunny Brooklyn, NY


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

Date: 14 Mar 1998 13:46:43 +0100
From: Martin Bialasinski <agr30@uni-koeln.de>
Subject: Re: Perl - mySQL - Precompiler
Message-Id: <877m5x4ez0.fsf@haitech.martin.home>

maf@nordrhein.net (Martin Funke) writes:

> I red about that Perl-script which include SQL-commandos have to be
> pre-compiled before they will run. Is that right? 

No.

> Or is there another trick behind?

No. Just "use Mysql;" and check out perldoc Mysql

Ciao,
	Martin


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

Date: 14 Mar 1998 02:47:36 -0800
From: creator@islandnet.com (Matt Elrod)
Subject: Re: Perl4 vs Perl 5
Message-Id: <j1lC10kbMsMG092yn@islandnet.com>

Ronald J Kimball <rjk@coos.dartmouth.edu> wrote:

}I'd be interested in hearing what reasons the other team could possibly come
}up with for why you *should* go with Perl 4.

Perl4 is faster and uses less overhead than Perl5? I mean, I am no guru but
why fireup the entire Perl5 interpreter for something as simple as an
access counter? Suppose you don't *need* all the modules and bells and
whistles. My favorite ISP provides both 4 and 5 for this very reason.

Matt


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

Date: Sat, 14 Mar 1998 15:46:23 GMT
From: Sneex <chasecreek.systemhouse@usa.net>
Subject: Re: Perl4 vs Perl 5
Message-Id: <350AA4FF.EF513BDA@usa.net>

Hmmmm...
Are there actual users on this system where Perl 4 lives?
May I have an account there as well?

In a few days you will wish you were
on Perl 5.004 :)

Perl 4 is NOT worth having a living breathing security
hole in an otherwise intelligently build network :)

C'Ya,
Sneex :)



Matt Elrod wrote:

> Ronald J Kimball <rjk@coos.dartmouth.edu> wrote:
>
> }I'd be interested in hearing what reasons the other team could possibly come
> }up with for why you *should* go with Perl 4.
>
> Perl4 is faster and uses less overhead than Perl5? I mean, I am no guru but
> why fireup the entire Perl5 interpreter for something as simple as an
> access counter? Suppose you don't *need* all the modules and bells and
> whistles. My favorite ISP provides both 4 and 5 for this very reason.
>
> Matt





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

Date: 14 Mar 1998 13:12:41 GMT
From: ? the platypus {aka David Formosa} <dformosa@st.nepean.uws.edu.au>
Subject: Re: PGP / $PGPPASS
Message-Id: <889881160.406890@cabal>

In <35094472.7708284F@muc.de> Lutz Albers <lutz@muc.de> writes:

>kozo wrote:

>> pgp -z pass_phrase +batchmode +force blabla

> ... which is an EXTREMLY dangerous advice. Your passphrase will be part of your
>command line and can therefore be sniffed. It's better to use PGPPASS ...

Which will put it in the enviroment and can theerfor be sniffed.  Its
better to use PGPPASSFD.



--
Please excuse my spelling as I suffer from agraphia see the url in my header. 
Never trust a country with more peaple then sheep. 
Support NoCeM http://www.cm.org/                   
I'm sorry but I just don't consider 'because its yucky' a convincing argument


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

Date: 14 Mar 1998 14:36:54 +0100
From: Tony Curtis <Tony.Curtis+usenet@vcpc.univie.ac.at>
Subject: Re: Redirect to another url
Message-Id: <7xafatqtqh.fsf@beavis.vcpc.univie.ac.at>

Re: Redirect to another url, wongkl <wongkl@singnet.com.sg>
said:

wongkl> To:comp.lang.perl.misc I learning how to use Perl
wongkl> redirect cgi can anyone help me , how to use Perl
wongkl> redirect script that can redir you to another url
wongkl> like
wongkl> http://www.Domain.com/cgi-bin/redir.cgi?Link=Page_html

use CGI;

and then the redirect() method.

-- 
Tony Curtis, Systems Manager, VCPC,      | Tel +43 1 310 93 96 - 12; Fax - 13
Liechtensteinstrasse 22, A-1090 Wien, AT | http://www.vcpc.univie.ac.at/

"Everything I am, I learned on the back of cereal boxes" ~ RJ, "Over the Hedge"


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

Date: Wed, 11 Mar 1998 18:32:17 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: Redirecting to a script on another server.
Message-Id: <3506d1c0.4190722@news.btinternet.com>

On Fri, 13 Mar 1998 15:14:54 +0000, Grahame S Cooper
<G.S.Cooper@iti.salford.ac.uk> wrote:

<snip>

>I want to redirect from a Perl CGI script to another one
>on a different server.
>
<snip>

You would probably benefit from the use of the LWP modules from CPAN
specifically LWP::UserAgent which would enable you to do this.

The lwpcook document that comes with the distribution is a very good
starting point.

Have fun

Jonathan Stowe
See the MetaFaq at http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm


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

Date: Sat, 14 Mar 1998 12:27:19 +0000
From: Grahame S Cooper <G.S.Cooper@iti.salford.ac.uk>
Subject: Re: Redirecting to a script on another server.
Message-Id: <350A77A7.66B2634C@iti.salford.ac.uk>

Please accept my most humble apologies. I have just picked up
my jacket from the dry cleaners' and lo and behold, my brain
was in the pocket all the time!

I have seen the silly error now and everything works fine.

Cheers,

Grahame

Sneex wrote:

> Off topic, see CGI-related ng:
>
> However, I have several security scripts
> which like to play tennis with each other; so
> if you could post some code of how you
> are trying this maybe we could point
> out something.
>
> The short answer is it works for me,
> what are you doing wrong or otherwise?
>
> Could be a firewall issue, or any number of
> other things...
>
> HTH,
> Sneex :)
>
> Grahame S Cooper wrote:
>
> > This could be a Perl question or a CGI question.
> > Apologies if it is off topic.
> >
> > I want to redirect from a Perl CGI script to another one
> > on a different server.
> >
> > I have tried using the Location: directive, but it
> > doesn't seem to work for this purpose, and I can't see
> > how I would specify whether to use PUT or GET, etc.
> >
> > Has anyone done this themselves and have a quick answer?
> >
> > Cheers
> >
> > --
> > --------------------------------------------------
> > Dr Grahame S Cooper
> > Director
> > Information Technology Institute
> > University of Salford
> > Salford, M5 4WT, ENGLAND
> >
> > (Remove the anti spam field to EMail me.)
> > ==================================================



--
--------------------------------------------------
Dr Grahame S Cooper
Director
Information Technology Institute
University of Salford
Salford, M5 4WT, ENGLAND

(Remove the anti spam field to EMail me.)
==================================================




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

Date: 14 Mar 1998 12:43:49 +0200
From: Ariel Scolnicov <ariels@mangal.cs.huji.ac.il>
Subject: Re: rsh hanging...
Message-Id: <7zwwdx4knu.fsf@mangal.cs.huji.ac.il>

Tom.Grydeland@phys.uit.no (Tom Grydeland) writes:

> On Fri, 06 Mar 1998 23:40:23 GMT,
> Kim Kiat Tan <kktan@concentric.net> wrote:
> > I have the following code :
> 
> > $out = `rsh rmthost .\test`;
> 
> Are you absolutely sure you have a program named .<tab>test ?

Of course, this should be ".<tab>est".  To original poster (anyone
named "Tom" already knows far too much Perl...): Backslash-t in
backquoted (and quoted) strings gets converted to a tab.  The use of
rsh makes me suspect you wanted "./test", anyways...

> 
> 
> -- 
> //Tom Grydeland <Tom.Grydeland@phys.uit.no>


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

Date: Sat, 14 Mar 1998 11:15:31 +0100
From: martin@RADIOGAGA.HARZ.DE (Martin Vorlaender)
Subject: Re: Run subroutines from another CGI file?
Message-Id: <350a58c3.524144494f47414741@radiogaga.harz.de>

Ben (ben@wallroyds.demon.co.uk) wrote:
: I tried to run it via Telnet - But got some errors. The errors were ...

: /www/htdocs/interhawk/s-center/sub.cgi did not return a true value at
: email.cgi line 6.

: Do anyone know how to do this in the right way?

'require' tests the return value of do()ing the required file, which can
signal failure to load successfully by returning a False value. The easiest
way to apease 'require' is to have

  1;  # return True to signal successful loading

as the last line in the require'd file.

: Why was the language named Perl?

"Practical Extraction and Report Language"

: Where to post questions about .htaccess and Perl?

I guess a newsgroup about the web server the .htaccess file belongs to
would be the most appropriate.

cu,
  Martin
--
                          | Martin Vorlaender | VMS & WNT programmer
 Ceterum censeo           | work: mv@pdv-systeme.de
 Redmondem delendam esse. |       http://www.pdv-systeme.de/users/martinv/
                          | home: martin@radiogaga.harz.de


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

Date: 14 Mar 1998 14:41:03 +0100
From: Tony Curtis <Tony.Curtis+usenet@vcpc.univie.ac.at>
Subject: Re: splitting by one or more values
Message-Id: <7x7m5xqtjk.fsf@beavis.vcpc.univie.ac.at>

Re: splitting by one or more values, Oosterom
<oosterom@e-mark.nl> said:

Oosterom> Hi, I am trying to extract the date from the
Oosterom> localtime value. I have to split this value, but
Oosterom> if the daynumber is smaller than 10, there are two
Oosterom> spaces before this number in the localtime
Oosterom> value. This means I have to split by one or more
Oosterom> spaces. The codes below don't work:

localtime in an array context returns an array with all the
localtime(3) fields.

perldoc -f localtime
perldoc POSIX (for strftime and localtime)
man localtime

hth
-- 
Tony Curtis, Systems Manager, VCPC,      | Tel +43 1 310 93 96 - 12; Fax - 13
Liechtensteinstrasse 22, A-1090 Wien, AT | http://www.vcpc.univie.ac.at/

"Everything I am, I learned on the back of cereal boxes" ~ RJ, "Over the Hedge"


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

Date: Sat, 14 Mar 1998 14:13:55 +0100
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: tainted glob confusion
Message-Id: <Pine.A41.3.95a.980314140707.52844A-100000@rsplus10.cern.ch>

On 13 Mar 1998, Greg Bacon wrote:

> : > Note to the wise: be extremely careful with filenames returned from
> : > readdir.  Treat them as though they were tainted (else someone will
> : > hand you filenames like `rm -f *|').
> : 
> : I understand the problem!  In this particular application, though,
> : the filenames (and the patterns being used for matching the filenames)
> : are entirely under the designer's control.
> 
> Famous last words.  If you're running with -T, trust nothing from
> the outside world.

Yes, Sir, the message was well taken the first time.  What I hadn't
mentioned was that the file names will be used for nothing more than
to generate a URL in some HTML that the script will be returning to 
the invoking client (this is a CGI script, as it happens).

If someone had managed to subvert the directory containing the relevant
filenames, in the way that you imply, things would be bad enough
already, before I even start to write my script.  But if harm can be
done by writing a URL with "rm -fr *|" in it, then something is
seriously wrong with the HTTPD! 

If I were as careless a programmer as you seem to fear, then I wouldn't
have been using -T in the first place ;-)

cheers




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

Date: 14 Mar 1998 14:22:06 GMT
From: ? the platypus {aka David Formosa} <dformosa@st.nepean.uws.edu.au>
Subject: Re: tainted glob confusion
Message-Id: <889885326.4778@cabal>

In <6ebsho$hom$10@info.uah.edu> gbacon@cs.uah.edu (Greg Bacon) writes:

>In article <Pine.A41.3.95a.980313172132.86824A-100000@rsplus10.cern.ch>,
>	"Alan J. Flavell" <flavell@mail.cern.ch> writes:

[...]

>: I understand the problem!  In this particular application, though,
>: the filenames (and the patterns being used for matching the filenames)
>: are entirely under the designer's control.

>Famous last words.  If you're running with -T, trust nothing from
>the outside world.

May I point out that the outside may be diffrent in diffrent applications.
If I am running on a secure server being called remotly my concept of out
side may be "What is not on this server".  While if I'm running local
outside may be "What is not a part of this program."

 
--
Please excuse my spelling as I suffer from agraphia see the url in my header. 
Never trust a country with more peaple then sheep. 
Support NoCeM http://www.cm.org/                   
I'm sorry but I just don't consider 'because its yucky' a convincing argument


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

Date: Sat, 14 Mar 1998 14:04:46 GMT
From: UCE-trap_synic@omen.net.au (Peter Caffin)
Subject: Re: What command Calls a prog on the web?
Message-Id: <35128241.16758305@news.omen.net.au>

psiberjack@aol.com (Psiberjack) did cunningly address to comp.lang.perl.misc..
:This is probably a very basic question.
:I want to know how to write a standard Perl program that will call a
:program on the web i(e cgi script)and store the results in a text file?
:Also is it possible to store results in standard text format and not HTML?

What you're after calls for the ability to use the concepts developed in:

 [1] The ORA camel book (Programming Perl),
 [2] The ORA pelican book (Web Client Programming),
 [3] The ORA owl book (Regular Expressions).

I'd seriously suggest you pick up copies of these from where-ever it is you do
your technical book shopping. They're well worth their price and are well
structured.

If this sort of effort is going to be a bit much, I'd suggest you go out and
hire someone for the job. There are a number of things you're asking for here
which aren't 'Hello World' beginners material.

--:     _         ___  _    _ _ 
 _oo__ |_|_ |__  _ |  |  _ |_|_' _   synic at omen dot net dot a u
//`'\_ | (/_|(/_| .|. |_(_|| | || |  http://www.omen.net.au/~synic
/              PO Box 869, Hillarys WA 6923, AUSTRALIA


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

Date: Sat, 14 Mar 1998 10:19:15 -0500
From: Bob Trieger <sowmaster@juicepigs.com>
To: culrich@i2000.net
Subject: Re: Wierd redirection problem with Location:
Message-Id: <350A9FF3.7ABF@juicepigs.com>

culrich@i2000.net wrote:
> 
> I have a quirky problem...  The following works fine:
> 
> print "Content-type: text/html\n";
> print "Location: /page1.htm\n\n";
> 

Time for my stupid question:

 Why are you printing a Content-type at all if you are going to
redirect?


Bob Trieger
sowmaster@juicepigs.com


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

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 2098
**************************************

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