[11362] in Perl-Users-Digest
Perl-Users Digest, Issue: 4961 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Feb 26 11:19:46 1999
Date: Fri, 26 Feb 99 08:14:25 -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 Fri, 26 Feb 1999 Volume: 8 Number: 4961
Today's topics:
Calling functions from another file <jalil@corp.home.net>
Re: Calling functions from another file (Clay Irving)
Re: Calling functions from another file <jalil@corp.home.net>
Re: Calling functions from another file <jalil@corp.home.net>
Re: Calling functions from another file (Ronald J Kimball)
calling subroutines from within itself (Cybernetic Bear)
Re: calling subroutines from within itself (Bart Lateur)
can control statements from a calling block be issued b <lee.ramirez@westgroup.com>
Re: can control statements from a calling block be issu <tchrist@mox.perl.com>
Re: can control statements from a calling block be issu (M.J.T. Guy)
Can perl do this? <jhan@cisco.com>
Re: Can perl do this? <jglascoe@giss.nasa.gov>
Re: Can perl do this? <geoff@gdreyer.com>
Re: Can perl do this? (Abigail)
Re: Can perl do this? (Tad McClellan)
Re: Can perl do this? (Karlon West)
Re: Can perl do this? <tchrist@mox.perl.com>
Re: Can perl do this? (Clay Irving)
Re: Can perl do this? <aqumsieh@matrox.com>
Re: Can perl do this? <mpersico@erols.com>
Re: Can perl do this? (Greg Ward)
Can't Locate File/Path.pm <maxwong@my-dejanews.com>
Re: Can't Locate File/Path.pm nguyen.van@imvi.bls.com
cgi files with iis http server <karenl@security7.com>
cgi files with iis http server <karenl@security7.com>
CGI Scripts Paths On icom.com? tatabu@my-dejanews.com
Re: CGI Scripts Paths On icom.com? (Clay Irving)
CGI w/ perl times 2?!? mbrito@duffyshanley.com
Re: CGI w/ perl times 2?!? <jeromeo@atrieva.com>
Re: CGI w/ perl times 2?!? <Tony.Curtis+usenet@vcpc.univie.ac.at>
cgi with iis http server <karenl@security7.com>
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 22 Feb 1999 22:50:41 GMT
From: "Jalil Feghhi" <jalil@corp.home.net>
Subject: Calling functions from another file
Message-Id: <919723841.189221@zeppelin.svr.home.net>
I have two perl files and want to call functions across files. I do not want
to create any package/module/class/... Just a simple way to call a function
defined in one file from another file. Is this possible?
By the way, I could not find this topic on faq, searching faq 0 (index) on
language.perl.com
-Jalil
------------------------------
Date: 22 Feb 1999 17:53:30 -0500
From: clay@panix.com (Clay Irving)
Subject: Re: Calling functions from another file
Message-Id: <slrn7d3nva.jco.clay@panix.com>
On Mon, 22 Feb 1999 22:50:41 GMT, Jalil Feghhi <jalil@corp.home.net> wrote:
>I have two perl files and want to call functions across files. I do not want
>to create any package/module/class/... Just a simple way to call a function
>defined in one file from another file. Is this possible?
>
>By the way, I could not find this topic on faq, searching faq 0 (index) on
>language.perl.com
Cool. Second time today I posted this answer.
http://language.perl.com/newdocs/pod/perlfaq8.html
What's the difference between require and use?
--
Clay Irving <clay@panix.com>
Witchcraft always has a hard time, until it becomes respectable and
changes its name.
- Charles Fort
------------------------------
Date: Tue, 23 Feb 1999 01:57:48 GMT
From: "Jalil Feghhi" <jalil@corp.home.net>
Subject: Re: Calling functions from another file
Message-Id: <919735068.636719@zeppelin.svr.home.net>
Thanks. But it looks under %INC and cannot load my file. I like to load
something from the current directory. How should I do that?
-Jalil
Clay Irving wrote in message ...
>On Mon, 22 Feb 1999 22:50:41 GMT, Jalil Feghhi <jalil@corp.home.net> wrote:
>
>>I have two perl files and want to call functions across files. I do not
want
>>to create any package/module/class/... Just a simple way to call a
function
>>defined in one file from another file. Is this possible?
>>
>>By the way, I could not find this topic on faq, searching faq 0 (index) on
>>language.perl.com
>
>Cool. Second time today I posted this answer.
>
>http://language.perl.com/newdocs/pod/perlfaq8.html
>
>What's the difference between require and use?
>
>--
>Clay Irving <clay@panix.com>
>Witchcraft always has a hard time, until it becomes respectable and
>changes its name.
>- Charles Fort
>
------------------------------
Date: Tue, 23 Feb 1999 02:01:39 GMT
From: "Jalil Feghhi" <jalil@corp.home.net>
Subject: Re: Calling functions from another file
Message-Id: <919735299.755988@zeppelin.svr.home.net>
Never mind my previous question. It seems @INC is used instead of %INC and
it does include the current directory.
-Jalil
Jalil Feghhi wrote in message <919735068.636719@zeppelin.svr.home.net>...
>Thanks. But it looks under %INC and cannot load my file. I like to load
>something from the current directory. How should I do that?
>
>-Jalil
>
>
>Clay Irving wrote in message ...
>>On Mon, 22 Feb 1999 22:50:41 GMT, Jalil Feghhi <jalil@corp.home.net>
wrote:
>>
>>>I have two perl files and want to call functions across files. I do not
>want
>>>to create any package/module/class/... Just a simple way to call a
>function
>>>defined in one file from another file. Is this possible?
>>>
>>>By the way, I could not find this topic on faq, searching faq 0 (index)
on
>>>language.perl.com
>>
>>Cool. Second time today I posted this answer.
>>
>>http://language.perl.com/newdocs/pod/perlfaq8.html
>>
>>What's the difference between require and use?
>>
>>--
>>Clay Irving <clay@panix.com>
>>Witchcraft always has a hard time, until it becomes respectable and
>>changes its name.
>>- Charles Fort
>>
>
>
------------------------------
Date: Mon, 22 Feb 1999 23:46:40 -0500
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: Calling functions from another file
Message-Id: <1dnngqi.1q7xjsw1ewi1tgN@bay1-200.quincy.ziplink.net>
Jalil Feghhi <jalil@corp.home.net> wrote:
> Never mind my previous question. It seems @INC is used instead of %INC and
> it does include the current directory.
@INC contains the list of paths to search for require'd files. %INC
contains the list of require'd files (as keys) and the paths where they
were found (as values).
--
_ / ' _ / - aka - rjk@linguist.dartmouth.edu
( /)//)//)(//)/( Ronald J Kimball chipmunk@m-net.arbornet.org
/ http://www.ziplink.net/~rjk/
perl -e 'for(@ARGV){require $_;print "$_\n $INC{$_}\n"}' File/Find.pm
------------------------------
Date: Tue, 23 Feb 1999 00:09:42 GMT
From: cybear_x[nospam]@geocities.com (Cybernetic Bear)
Subject: calling subroutines from within itself
Message-Id: <36d1ed86.26526135@news.webhart.net>
I am trying to write my own search engine for a web server. I am using
Novell so no modules etc are available to me.
I haven't coded anything yet, but the basic strategy I am thinking of
using is this: I scan the root directory for a list of files and
directories. If I find a file, I call a subroutine (sub fileSearch)
which ignores binary files, but scans text files for my search
criteria, and add any matches to my 'hits' list.
If I find a directory, I want to pass the directory name to a
subroutine (sub subDirScan) which scans the subdrectory for files and
more subdirectories. If I find a file, I call the fileSearch
subroutine, but if I find a subdirectory, I want to call subDirScan
again and pass it the new subdirectory name to scan the
sub-subdirectory for files etc.
A rough 'code' would look like.
scan root directory
if subdirectory found, call subDirScan, pass root.subdirectory name
if file found, call fileSearch
sub fileSearch
if text file, scan for match
if binary file, ignore
return match value;
sub subDirScan
scan subdir
if subdirectory found, call subDirScan, pass
root.subdir.newsubdir
if file found, call fileSearch
Can you call the same subroutine from within itself and pass it
diferent data? Also, can I keep the list of matches global so I don't
have to pass them back thru multiple subroutines? I'm not looking for
complete code examples, but a fairly simplistic yes/no, and any advice
you may have will be greatly appreciated.
Note: I have looked for thiese answers, but I haven't been able to
find it.
Thanks
Dave
------------------------------
Date: Tue, 23 Feb 1999 21:04:39 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: calling subroutines from within itself
Message-Id: <36d511a4.2295205@news.skynet.be>
cybear_x wrote:
>Can you call the same subroutine from within itself and pass it
>diferent data?
Yes. BTW the official name is "recursion".
You do need to localize your variabales though (through local() or
my()).
>Also, can I keep the list of matches global so I don't
>have to pass them back thru multiple subroutines?
Maybe pass a reference to that array. But yes, you could use a global
array, and push() new matches. Don't forget to clear the array before
you start though.
I think I would call the main scan sub from within a block, where you
first use local() on the matches array. That way, all called subs can
access it, while it still doesn't clutter any globals. Do return the
entire array at the end though, and not just a reference to it (that
doesn't work).
Bart.
------------------------------
Date: Tue, 23 Feb 1999 09:06:05 -0600
From: "Lee Ramirez" <lee.ramirez@westgroup.com>
Subject: can control statements from a calling block be issued by a subroutine?
Message-Id: <36d2c31c@wwwproxy3.westgroup.com>
Here's what I want to do:
#Main program
LABEL for ($i = 0; $i < n; $i++)
{ commands }
sub exception_handler # gets called anytime an error occurs in Main
{
commands
next LABEL
}
I don't think I can do this from a subroutine, but is there anyway I can get the loop to move on to the next value of $i from the subroutine?
There are many spots in the loop that can call the exception_handler subroutine, and I would rather not return values and perform a bunch of IF checks. But if it must be then I guess that's life.
Thanks,
Lee
------------------------------
Date: 23 Feb 1999 08:08:33 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: can control statements from a calling block be issued by a subroutine?
Message-Id: <36d2c471@csnews>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc,
"Lee Ramirez" <lee.ramirez@westgroup.com> writes:
:I don't think I can do this from a subroutine, but is there anyway I<SNIP>
:There are many spots in the loop that can call the exception_handler<SNIP>
First, your newsreader is miconfigured. Your lines are not of
regulation lenght.
Second, did you *try*?
Lastly, -w will carp a bit.
--tom
--
"It's later than you don't think." --Larry Wall
------------------------------
Date: 24 Feb 1999 00:10:36 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: can control statements from a calling block be issued by a subroutine?
Message-Id: <7avg1s$9d1$1@pegasus.csx.cam.ac.uk>
Lee Ramirez <lee.ramirez@westgroup.com> wrote:
>#Main program
>LABEL for ($i = 0; $i < n; $i++)
>{ commands }
>
>sub exception_handler # gets called anytime an error occurs in Main
>{
> commands
> next LABEL
>}
>
>I don't think I can do this from a subroutine, but is there anyway I
>can get the loop to move on to the next value of $i from the subroutine?
>
>There are many spots in the loop that can call the exception_handler
>subroutine, and I would rather not return values and perform a bunch
>of IF checks. But if it must be then I guess that's life.
Did you try it, and/or read the documentation? It does in fact work,
although it'll cause -w to grumble. But you can keep the peace by
turning off warnings, for example:
%perl -w
sub thing { local $^W=0; next };
for (1..3) {
thing if /2/;
print;
}
__END__
which prints
13
Turning off -w is hardly elegant (or wise), but the alternatives aren't
elegant either as you remark. Take your pick.
Mike Guy
------------------------------
Date: Tue, 23 Feb 1999 13:35:08 -0800
From: Jimmy Han <jhan@cisco.com>
Subject: Can perl do this?
Message-Id: <36D31F0C.D0814C49@cisco.com>
Hi,
$a = 1;
$b = "a";
print $$b;
I know $$b is wrong here. But what should I do if I know the variable
name as a string and I want to get its value? Does perl support
this?
--
Jimmy Han
------------------------------
Date: Tue, 23 Feb 1999 17:08:17 -0500
From: Jay Glascoe <jglascoe@giss.nasa.gov>
To: jhan@cisco.com
Subject: Re: Can perl do this?
Message-Id: <36D326D0.A4F7B369@giss.nasa.gov>
[courtesy copy sent to cited author via email]
Jimmy Han wrote:
>
> Hi,
>
> $a = 1;
> $b = "a";
> print $$b;
urgh. This is a FAQ. It's gotta be! ;)
see Tom Christiansen's post:
http://www.dejanews.com/getdoc.xp?AN=447086382
Jay Glascoe
--
beep beep!
------------------------------
Date: Tue, 23 Feb 1999 14:42:20 -0800
From: Geoff Dreyer <geoff@gdreyer.com>
Subject: Re: Can perl do this?
Message-Id: <36D32ECC.150B7594@gdreyer.com>
Jimmy Han wrote:
> Hi,
>
> $a = 1;
> $b = "a";
> print $$b;
>
> I know $$b is wrong here. But what should I do if I know the variable
> name as a string and I want to get its value? Does perl support
> this?
> --
> Jimmy Han
Yes, $b is a symbolic reference. You can also modify $a via $b:
$a = 1; $b = "a"; $$b = "foo";
print $a, "\n"; #prints "foo"
It won't work if you have "use strict;" and $a must be global.
-geoff dreyer
------------------------------
Date: 24 Feb 1999 00:53:00 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Can perl do this?
Message-Id: <7avihc$ao5$4@client2.news.psi.net>
Jimmy Han (jhan@cisco.com) wrote on MMII September MCMXCIII in
<URL:news:36D31F0C.D0814C49@cisco.com>:
@@ Hi,
@@
@@ $a = 1;
@@ $b = "a";
@@ print $$b;
@@
@@ I know $$b is wrong here. But what should I do if I know the variable
@@ name as a string and I want to get its value? Does perl support
@@ this?
What makes you thing $$b is wrong?
$ perl -wle '$a = 1; $b = "a"; print $$b'
1
$
Abigail
--
perl5.004 -wMMath::BigInt -e'$^V=Math::BigInt->new(qq]$^F$^W783$[$%9889$^F47]
.qq]$|88768$^W596577669$%$^W5$^F3364$[$^W$^F$|838747$[8889739$%$|$^F673$%$^W]
.qq]98$^F76777$=56]);$^U=substr($]=>$|=>5)*(q.25..($^W=@^V))=>do{print+chr$^V
%$^U;$^V/=$^U}while$^V!=$^W'
------------------------------
Date: Tue, 23 Feb 1999 13:58:01 -0500
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Can perl do this?
Message-Id: <pntua7.gu5.ln@magna.metronet.com>
Jimmy Han (jhan@cisco.com) wrote:
: $a = 1;
: $b = "a";
: print $$b;
: I know $$b is wrong here.
You are wrong. It is right. :-)
What happened when you tried it?
Don't tell me you didn't even try it before posting...
BTW: You don't want to be doing that ("that" is called a "symbolic
reference").
Use a hash instead.
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: 23 Feb 1999 22:32:17 GMT
From: karlon@bnr.ca (Karlon West)
Subject: Re: Can perl do this?
Message-Id: <7ava9h$2e6$1@crchh14.us.nortel.com>
Jimmy Han (jhan@cisco.com) wrote:
> Hi,
> $a = 1;
> $b = "a";
> print $$b;
> I know $$b is wrong here.
You "know", eh? Did you try it?
$ perl -we '$a=1;$b="a";print "$$b\n";'
1
$
Looks like it works to me.
> But what should I do if I know the variable
> name as a string and I want to get its value? Does perl support
> this?
Karlon
------------------------------
Date: 23 Feb 1999 19:56:12 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Can perl do this?
Message-Id: <36d36a4c@csnews>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc, jhan@cisco.com writes:
:$a = 1;
:$b = "a";
:print $$b;
:
:I know $$b is wrong here. But what should I do if I know the variable
:name as a string and I want to get its value? Does perl support
:this?
Another one? I answer this question every day! Why why why?
--tom
=head2 How can I use a variable as a variable name?
Beginners often think they want to have a variable contain the name
of a variable.
$fred = 23;
$varname = "fred";
++$$varname; # $fred now 24
This works I<sometimes>, but it is a very bad idea for two reasons.
The first reason is that they I<only work on global variables>.
That means above that if $fred is a lexical variable created with my(),
that the code won't work at all: you'll accidentally access the global
and skip right over the private lexical altogether. Global variables
are bad because they can easily collide accidentally and in general make
for non-scalable and confusing code.
Symbolic references are forbidden under the C<use strict> pragma.
They are not true references and consequently are not reference counted
or garbage collected.
The other reason why using a variable to hold the name of another
variable a bad idea is that the question often stems from a lack of
understanding of Perl data structures, particularly hashes. By using
symbolic references, you are just using the package's symbol-table hash
(like C<%main::>) instead of a user-defined hash. The solution is to
use your own hash or a real reference instead.
$fred = 23;
$varname = "fred";
$USER_VARS{$varname}++; # not $$varname++
There we're using the %USER_VARS hash instead of symbolic references.
Sometimes this comes up in reading strings from the user with variable
references and wanting to expand them to the values of your perl
program's variables. This is also a bad idea because it conflates the
program-addressable namespace and the user-addressable one. Instead of
reading a string and expanding it to the actual contents of your program's
own variables:
$str = 'this has a $fred and $barney in it';
$str =~ s/(\$\w+)/$1/eeg; # need double eval
Instead, it would be better to keep a hash around like %USER_VARS and have
variable references actually refer to entries in that hash:
$str =~ s/\$(\w+)/$USER_VARS{$1}/g; # no /e here at all
That's faster, cleaner, and safer than the previous approach. Of course,
you don't need to use a dollar sign. You could use your own scheme to
make it less confusing, like bracketed percent symbols, etc.
$str = 'this has a %fred% and %barney% in it';
$str =~ s/%(\w+)%/$USER_VARS{$1}/g; # no /e here at all
Another reason that folks sometimes think they want a variable to contain
the name of a variable is because they don't know how to build proper
data structures using hashes. For example, let's say they wanted two
hashes in their program: %fred and %barney, and to use another scalar
variable to refer to those by name.
$name = "fred";
$$name{WIFE} = "wilma"; # set %fred
$name = "barney";
$$name{WIFE} = "betty"; # set %barney
This is still a symbolic reference, and is still saddled with the
problems enumerated above. It would be far better to write:
$folks{"fred"}{WIFE} = "wilma";
$folks{"barney"}{WIFE} = "betty";
And just use a multilevel hash to start with.
The only times that you absolutely I<must> use symbolic references are
when you really must refer to the symbol table. This may be because it's
something that can't take a real reference to, such as a format name.
Doing so may also be important for method calls, since these always go
through the symbol table for resolution.
In those cases, you would turn off C<strict 'refs'> temporarily so you
can play around with the symbol table. For example:
@colors = qw(red blue green yellow orange purple violet);
for my $name (@colors) {
no strict 'refs'; # renege for the block
*$name = sub { "<FONT COLOR='$name'>@_</FONT>" };
}
All those functions (red(), blue(), green(), etc.) appear to be separate,
but the real code in the closure actually was compiled only once.
So, sometimes you might want to use symbolic references to directly
manipulate the symbol table. This doesn't matter for formats, handles, and
subroutines, because they are always global -- you can't use my() on them.
But for scalars, arrays, and hashes -- and usually for subroutines --
you probably want to use hard references only.
--
/* This is the one truly awful dwimmer necessary to conflate C and sed. */
--Larry Wall, from toke.c in the v5.0 perl distribution
------------------------------
Date: 24 Feb 1999 10:37:19 -0500
From: clay@panix.com (Clay Irving)
Subject: Re: Can perl do this?
Message-Id: <slrn7d875e.1jb.clay@panix.com>
On 23 Feb 1999 19:56:12 -0700, Tom Christiansen <tchrist@mox.perl.com> wrote:
>Another one? I answer this question every day! Why why why?
Because you're special.
--
Clay Irving <clay@panix.com>
An adventure is only an inconvenience rightly considered. An inconvenience
is an adventure wrongly considered.
- G. K. Chesterton
------------------------------
Date: Wed, 24 Feb 1999 09:48:17 -0500
From: Ala Qumsieh <aqumsieh@matrox.com>
Subject: Re: Can perl do this?
Message-Id: <x3y3e3veu32.fsf@tigre.matrox.com>
Jimmy Han <jhan@cisco.com> writes:
> $a = 1;
> $b = "a";
> print $$b;
>
> I know $$b is wrong here. But what should I do if I know the variable
> name as a string and I want to get its value? Does perl support
> this?
Did you try it? If yes, what happened? If not, why not?
It should work, but it's unadvisable to use it.
Read perlref for more info.
HTH,
Ala
------------------------------
Date: Wed, 24 Feb 1999 21:54:22 -0500
From: "Matthew O. Persico" <mpersico@erols.com>
Subject: Re: Can perl do this?
Message-Id: <36D4BB5E.A348551D@erols.com>
Tom Christiansen wrote:
>
> Another one? I answer this question every day! Why why why?
>
A theory:
Because a good number of people starting off in Perl are graduating from
shell programming where this type of nonsense is used lots of times to
emulate arrays. Like (not syntactically correct, but you get the idea)
foo_$i
where "foo" is the "array" and $i is the index, sometimes even
associative.
Of course, ksh has had numerically indexed one-dim arrays for years now
if anyone would just spend more than thirty seconds scrolling through
man ksh.
And if the person is graduating to perl because of the idiocies of
assoc. arrays in shell, they should abandon the shell methods and use
hashes.
My 0.02US
--
Matthew O. Persico
http://www.erols.com/mpersico
http://www.digistar.com/bzip2
------------------------------
Date: 25 Feb 1999 18:58:41 GMT
From: gward@cnri.reston.va.us (Greg Ward)
Subject: Re: Can perl do this?
Message-Id: <7b46h1$pg6$1@news0-alterdial.uu.net>
Jimmy Han (jhan@cisco.com) wrote:
> Hi,
> $a = 1;
> $b = "a";
> print $$b;
> I know $$b is wrong here.
No, you're wrong, Perl *can* do this. Read the perlref man page
("perldoc perlref") for details, and search for "symbolic references".
To (mis-)quote Larry (not sure of the exact wording): "It works this way
because people expect it to".
However, this is usually a Bad Thing to do -- something of a Perl
anti-pattern. You could go search Dejanews for "symbolic reference" --
Tom Christiansen recently wrote an extended diatribe on why not to use
symbolic references. Or you could just follow this URL for the article
I'm thinking of:
http://x10.dejanews.com/getdoc.xp?AN=437136474&CONTEXT=919969004.482476318&hitnum=6
Greg
--
Greg Ward - software developer gward@cnri.reston.va.us
Corporation for National Research Initiatives
1895 Preston White Drive voice: +1-703-620-8990 x287
Reston, Virginia, USA 20191-5434 fax: +1-703-620-0913
------------------------------
Date: Fri, 26 Feb 1999 00:48:34 GMT
From: Newbie <maxwong@my-dejanews.com>
Subject: Can't Locate File/Path.pm
Message-Id: <7b4r0v$uo9$1@nnrp1.dejanews.com>
Hi,
When I execute a test script using
'use File::mkpath' and it sent out an error message 'Can't
Locate File/Path.pm in @INC ( @INC contains .... /usr/local/lib/perl5
...).But I found 'Path.pm' in /usr/local/lib/perl5/File directory.
Is there something wrong?
Thanks
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Fri, 26 Feb 1999 14:06:16 GMT
From: nguyen.van@imvi.bls.com
Subject: Re: Can't Locate File/Path.pm
Message-Id: <7b69og$5im$1@nnrp1.dejanews.com>
Hi,
you have to add an additional path to Perl Lib. If not, use as following:
use lib ( /usr/local/lib/perl5/File );
Good Luck !!!
In article <7b4r0v$uo9$1@nnrp1.dejanews.com>,
Newbie <maxwong@my-dejanews.com> wrote:
> Hi,
> When I execute a test script using
> 'use File::mkpath' and it sent out an error message 'Can't
> Locate File/Path.pm in @INC ( @INC contains .... /usr/local/lib/perl5
> ...).But I found 'Path.pm' in /usr/local/lib/perl5/File directory.
> Is there something wrong?
>
> Thanks
>
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
>
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Thu, 25 Feb 1999 14:59:50 +0200
From: "Karen Soudry" <karenl@security7.com>
Subject: cgi files with iis http server
Message-Id: <7b3hjb$bd7$1@news.netvision.net.il>
HI
I wrote a html file that sends an ID parameter to a cgi file.
I installed the IIS HTTP SERVER and it can't seem to run the cgi file.
how can you configure the http server that it can read cgi files???
I wrote the url to the cgi file in the html file but I get a message
"HTTP/1.0 500 Server Error (The system cannot find the path specified. ) .
HELP!!!!
thanks!!!
------------------------------
Date: Thu, 25 Feb 1999 15:01:12 +0200
From: "Karen Soudry" <karenl@security7.com>
Subject: cgi files with iis http server
Message-Id: <7b3hlt$bem$1@news.netvision.net.il>
HI
I wrote a html file that sends an ID parameter to a cgi file.
I installed the IIS HTTP SERVER and it can't seem to run the cgi file.
how can you configure the http server that it can read cgi files???
I wrote the url to the cgi file in the html file but I get a message
"HTTP/1.0 500 Server Error (The system cannot find the path specified. ) .
HELP!!!!
thanks!!!
------------------------------
Date: Tue, 23 Feb 1999 08:55:31 GMT
From: tatabu@my-dejanews.com
Subject: CGI Scripts Paths On icom.com?
Message-Id: <7atqe1$s1n$1@nnrp1.dejanews.com>
I cannot figure out the CGI paths on icom.com.
The ones given by icom.com don't work.
They are as follows:
If your script outputs html, references to images and html pages must begin
with a "/", such as <img src="/images/logo.jpg">. The full system path to
your Web hosting directory is
/usr/local/etc/httpd/htdocs/LOGINNAME
where "LOGINNAME" is your web hosting login name. The system path to your
hosting directory is the operating system's equivalent to the URL
http://www.yourdomain.com
where "yourdomain.com" is your registered domain. The full system path to
your local cgi-bin directory is
/usr/local/etc/httpd/htdocs/LOGINNAME/cgi-bin.
The system path to the
cgi-bin directory is equivalent to the URL
http://www.yourdomain.com/cgi-bin
where "yourdomain.com" is your registered domain.
Thanks!
tatabu@ix.netcom.com
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: 23 Feb 1999 08:30:15 -0500
From: clay@panix.com (Clay Irving)
Subject: Re: CGI Scripts Paths On icom.com?
Message-Id: <slrn7d5bb5.n9e.clay@panix.com>
On Tue, 23 Feb 1999 08:55:31 GMT, tatabu@my-dejanews.com
<tatabu@my-dejanews.com> wrote:
>I cannot figure out the CGI paths on icom.com.
>The ones given by icom.com don't work.
You accidentally posted a question about Web server setup in the Perl
newsgroup...
--
Clay Irving <clay@panix.com>
Most religions do not make men better, only warier.
- Elias Canetti
------------------------------
Date: Tue, 23 Feb 1999 19:34:33 GMT
From: mbrito@duffyshanley.com
Subject: CGI w/ perl times 2?!?
Message-Id: <7auvs9$siq$1@nnrp1.dejanews.com>
Hey,
Here is a hell of a dillema:
There is this company we will call 'Silly Inc.' who wants a form that will
send it's contents to an e-mail address and append a file with one particular
field from the form. This situation gets sticky like this: there is a HUGE
amount of politics going on and they refuse to use any other 'mailto' but the
one they had written in VB running on their NT machine which I cannot modify.
Obviously I cannot simply add some code to satisfy their second need, so I
wrote a perl script to complete the append. Now, is there any way to launch 2
scripts from the same HTML document? Can I send the results of one form to 2
programs? Can I send the results to my perl script and the script pass them
along to and launch the VB 'mailto'? Am I dreaming?
*mike
P.S. Yes, I already asked in www.authoring.html(whatever) and they have no
clue.
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Tue, 23 Feb 1999 12:04:25 -0800
From: Jerome O'Neil <jeromeo@atrieva.com>
To: mbrito@duffyshanley.com
Subject: Re: CGI w/ perl times 2?!?
Message-Id: <36D309C9.E1BD3656@atrieva.com>
I hope you are billing them an admirable rate.
Do this:
#!/usr/bin/psuedocode -w
do_append();
setup_proper_environment();
exec VB_mailto;
play_golf() until new_clubs_are_paid_for();
Good Luck!
mbrito@duffyshanley.com wrote:
>
> Hey,
>
> Here is a hell of a dillema:
>
> There is this company we will call 'Silly Inc.' who wants a form that will
> send it's contents to an e-mail address and append a file with one particular
> field from the form. This situation gets sticky like this: there is a HUGE
> amount of politics going on and they refuse to use any other 'mailto' but the
> one they had written in VB running on their NT machine which I cannot modify.
> Obviously I cannot simply add some code to satisfy their second need, so I
> wrote a perl script to complete the append. Now, is there any way to launch 2
> scripts from the same HTML document? Can I send the results of one form to 2
> programs? Can I send the results to my perl script and the script pass them
> along to and launch the VB 'mailto'? Am I dreaming?
>
> *mike
>
> P.S. Yes, I already asked in www.authoring.html(whatever) and they have no
> clue.
>
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
--
Jerome O'Neil, Operations and Information Services
Atrieva Corporation, 600 University St., Ste. 911, Seattle, WA 98101
jeromeo@atrieva.com - Voice:206/749-2947
The Atrieva Service: Safe and Easy Online Backup http://www.atrieva.com
------------------------------
Date: 24 Feb 1999 10:54:40 +0100
From: Tony Curtis <Tony.Curtis+usenet@vcpc.univie.ac.at>
Subject: Re: CGI w/ perl times 2?!?
Message-Id: <83d8309len.fsf@vcpc.univie.ac.at>
Re: CGI w/ perl times 2?!?, mbrito
<mbrito@duffyshanley.com> said:
mbrito> There is this company we will call 'Silly
mbrito> Inc.' who wants a form that will send it's
mbrito> contents to an e-mail address and append a
mbrito> file with one particular field from the
mbrito> form. [...snip...]
mbrito> Now, is there
mbrito> any way to launch 2 scripts from the same
mbrito> HTML document?
There is no way to launch any server-side "script"
from any HTML document.
mbrito> form to 2 programs? Can I send the results
mbrito> to my perl script and the script pass them
mbrito> along to and launch the VB 'mailto'? Am I
mbrito> dreaming?
`perldoc LWP` has all the answers. Or maybe
`perldoc perlipc` too.
mbrito> P.S. Yes, I already asked in
mbrito> www.authoring.html(whatever) and they have
mbrito> no clue.
Well, since it doesn't really have anything to do
with HTML...
hth
tony
--
Tony Curtis, Systems Manager, VCPC, | Tel +43 1 310 93 96 - 12; Fax - 13
Liechtensteinstrasse 22, A-1090 Wien. | <URI:http://www.vcpc.univie.ac.at/>
"You see? You see? Your stupid minds! | private email:
Stupid! Stupid!" ~ Eros, Plan9 fOS.| <URI:mailto:tony_curtis32@hotmail.com>
------------------------------
Date: Thu, 25 Feb 1999 14:57:46 +0200
From: "Karen Soudry" <karenl@security7.com>
Subject: cgi with iis http server
Message-Id: <7b3hfh$b2t$1@news.netvision.net.il>
HI
I wrote a html file that sends an ID parameter to a cgi file.
I installed the IIS HTTP SERVER and it can't seem to run the cgi file.
how can you configure the http server that it can read cgi files???
I wrote the url to the cgi file in the html file but I get a message
"HTTP/1.0 500 Server Error (The system cannot find the path specified. ) .
HELP!!!!
thanks!!!
------------------------------
Date: 12 Dec 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Special: Digest Administrivia (Last modified: 12 Dec 98)
Message-Id: <null>
Administrivia:
Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing.
]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body. Majordomo will then send you instructions on how to confirm your
]subscription. This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V8 Issue 4961
**************************************