[15606] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3019 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu May 11 18:09:28 2000

Date: Thu, 11 May 2000 15:05:23 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <958082723-v9-i3019@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Thu, 11 May 2000     Volume: 9 Number: 3019

Today's topics:
    Re: A Simple Question (Tad McClellan)
    Re: a stupid question. <andy@u2me3.com>
    Re: Accidental Creation of Static Variable nobull@mail.com
    Re: Accidental Creation of Static Variable nobull@mail.com
    Re: Accidental Creation of Static Variable (Abigail)
    Re: associating a filename with a FileHandle <lancon@mail.ce.utexas.edu>
    Re: associating a filename with a FileHandle (Randal L. Schwartz)
    Re: associating a filename with a FileHandle <lr@hpl.hp.com>
    Re: associating a filename with a FileHandle <lancon@mail.ce.utexas.edu>
        call by reference subroutine!! prakash_ojha@my-deja.com
    Re: call by reference subroutine!! <makarand_kulkarni@My-Deja.com>
    Re: Can a informix database manipulated by perl program <joydip_chaklader@my-deja.com>
    Re: CGI problems (but it IS a perl thing) simeon2000@my-deja.com
    Re: Converting a Perl script into an executable file (. tamiraw@my-deja.com
        Difficuly psting to a web site. Maybe a Port issue!!!!! <mkhan@crosscom.com>
    Re: Difficuly psting to a web site. Maybe a Port issue! <jeff@vpservices.com>
    Re: Difficuly psting to a web site. Maybe a Port issue! <mkhan@crosscom.com>
    Re: Difficuly psting to a web site. Maybe a Port issue! <jeff@vpservices.com>
    Re: Difficuly psting to a web site. Maybe a Port issue! <mkhan@crosscom.com>
    Re: Difficuly psting to a web site. Maybe a Port issue! <jeff@vpservices.com>
    Re: Difficuly psting to a web site. Maybe a Port issue! <mkhan@crosscom.com>
    Re: directory contents showing up ?!? <makarand_kulkarni@My-Deja.com>
    Re: DIVERTING TO A WEB PAGE <baughj@rpi.edu>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Thu, 11 May 2000 14:24:00 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: A Simple Question
Message-Id: <slrn8hlum0.krf.tadmc@magna.metronet.com>

On Thu, 11 May 2000 11:49:21 -0700, Chris <chris_heaton@mail.com> wrote:

>Could someone please send me the code 
                      ^^^^^^^^^^^^^^^^

We don't generally do that here.

Here we will help *you* to write code that does what you want...


>that I can enter into
>my Perl script that will once executed call a webpage. For
                                        ^^^^^^^^^^^^^^

 ... if we knew what that was supposed to mean.


>example after the script has run to call the webpage
>www.altavista.com


To get the page, use the LWP::Simple module, part of the
libwww bundle on CPAN.


To send it on to the browser, type:

   perldoc -f print



>Thanks in advance, this is urgent!
                    ^^^^^^^^^^^^^^


You want code written urgently?

In that case, you have come to altogether the wrong place!

Job postings should go in a newsgroup with "jobs" in their name.

But Usenet takes a long time to propagate articles, so it is
useless for truly urgent things.


Hire a contractor.



-- 
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


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

Date: Thu, 11 May 2000 21:35:01 +0100
From: "Andy Chantrill" <andy@u2me3.com>
Subject: Re: a stupid question.
Message-Id: <8ff5gt$d2j$1@uranium.btinternet.com>

The only stupid question is the one not asked.  :o)




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

Date: 11 May 2000 18:53:32 +0100
From: nobull@mail.com
Subject: Re: Accidental Creation of Static Variable
Message-Id: <u9aehxdlcz.fsf@wcl-l.bham.ac.uk>

abigail@ucan.foad.org (Abigail) writes:

> In article <u98zxlgeq0.fsf@wcl-l.bham.ac.uk>, nobull@mail.com wrote:

> >The line...
> >
> >my $test = 1;
> >
> >...does two things.  First it declares $test at compile time as
> >lexically scoped to the encosing block.  Secondly it assigns $test at
> >run time to one.
> >
> >my $test = 1 if $comp == 30;
> >
> >Still does the compile-time stuff but not the runtime stuff.
> >
> >> Is this behavior documented?
> >
> >Not that I know of, I'd call it a bug.
> 
> I wouldn't. It's a cute trick, and simpler to write than:

 ...but harder to read :-)

>     {my $test;
>      sub foo { .... }
>     }

If it were defined behaviour I can see a use for it.  However this is
undefined behaviour and so I'd class it as a dangerous trick.

> 
> >                                        You are probably accessing data
> >via an uninitialised pointer.
> 
> There are no pointers in Perl, so your remark doesn't make much sense.

There may be no pointers in Perl but that is irrelevant since I'm
talking about a program written in C - namely the Perl
compiler/interpreter.  My statement may be wrong because that it is
drawing a conclusion from a false premise but it does make sense.

-- 
     \\   ( )
  .  _\\__[oo
 .__/  \\ /\@
 .  l___\\
  # ll  l\\
 ###LL  LL\\


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

Date: 11 May 2000 19:14:27 +0100
From: nobull@mail.com
Subject: Re: Accidental Creation of Static Variable
Message-Id: <u98zxhdke4.fsf@wcl-l.bham.ac.uk>

abigail@foad.org (Abigail) writes:

> It should only be a warning or mentioned in perltrap if it does something
> else than you possibly expect. But I don't think that is the case here.
> 
> If you use 'my $foo = 3 if $bar == 16' what *do* you expect to happen
> that isn't happening now?

Well _I_ would expect an error as you get if you try to put a if
qualifier on use() in 5.5 and as happens if you write the analagous
code in C++.

Failing that I'd expect it to do:

  my $foo; $foo = 3 if $bar == 16

Since this is intutatively reasonable and does not contravene the
documentation:
                                                        ... lexical
  variables declared with C<my> are totally hidden from the outside
  world, including any called subroutines.  This is true if it's the
  same subroutine called from itself or elsewhere--every call gets
  its own copy.

I may be in a minority in expecting Perl to behave as documented but I
would not expect that I'm in an insignificantly small minority.

> Certainly, 'my $foo = 3 if $bar == 16' will be obscure to some
> people.  But that should never, ever be an excuse for a warning.

I agree, it should either have defined semantics or generate an error.

It is a bug.  Code bug or documention bug - take your pick.

-- 
     \\   ( )
  .  _\\__[oo
 .__/  \\ /\@
 .  l___\\
  # ll  l\\
 ###LL  LL\\


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

Date: 11 May 2000 19:16:04 GMT
From: abigail@foad.org (Abigail)
Subject: Re: Accidental Creation of Static Variable
Message-Id: <slrn8hm1nj.hsu.abigail@ucan.foad.org>

On 11 May 2000 19:14:27 +0100, nobull@mail.com <nobull@mail.com> wrote:
++ abigail@foad.org (Abigail) writes:
++ 
++ > It should only be a warning or mentioned in perltrap if it does something
++ > else than you possibly expect. But I don't think that is the case here.
++ > 
++ > If you use 'my $foo = 3 if $bar == 16' what *do* you expect to happen
++ > that isn't happening now?
++ 
++ Well _I_ would expect an error as you get if you try to put a if
++ qualifier on use() in 5.5 and as happens if you write the analagous
++ code in C++.

my() isn't 'use', and Perl isn't C++.

++ 
++ Failing that I'd expect it to do:
++ 
++   my $foo; $foo = 3 if $bar == 16

Really? 'my $foo = 3 if $bar == 16' contains one statement that does
an assignment to $foo, while 'my $foo; $foo = 3 if $bar == 16'
contain 2. I would not call that at all reasonable.

++ 
++ Since this is intutatively reasonable and does not contravene the
++ documentation:
++                                                         ... lexical
++   variables declared with C<my> are totally hidden from the outside
++   world, including any called subroutines.  This is true if it's the
++   same subroutine called from itself or elsewhere--every call gets
++   its own copy.
++ 
++ I may be in a minority in expecting Perl to behave as documented but I
++ would not expect that I'm in an insignificantly small minority.
++ 
++ > Certainly, 'my $foo = 3 if $bar == 16' will be obscure to some
++ > people.  But that should never, ever be an excuse for a warning.
++ 
++ I agree, it should either have defined semantics or generate an error.
++ 
++ It is a bug.  Code bug or documention bug - take your pick.


Where's the bug? Could you show an example where 'my $foo = 3 if $bar == 16'
causes $foo to be visible outside of the block? 

From the documentation:
     A `my' has both a compile-time and a run-time effect.  At
     compile time, the compiler takes notice of it.  The
     principle usefulness of this is to quiet `use strict
     'vars'', but it is also essential for generation of closures
     as detailed in the perlref manpage.  Actual initialization
     is delayed until run time, though, so it gets executed at
     the appropriate time, such as each time through a loop, for
     example.


And that, for me, explains *exactly* what 'my $foo = 3 if $bar == 16'
does. Once you understand the above paragraph, it's clear as crystal.

No bug - not in the code, and not in de documentation either.



Abigail


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

Date: Thu, 11 May 2000 14:19:22 -0500
From: Donald Lancon <lancon@mail.ce.utexas.edu>
Subject: Re: associating a filename with a FileHandle
Message-Id: <391B07BA.EC990157@mail.ce.utexas.edu>

The plot thickens...

I mused:

> Since a FileHandle object is just an anonymous glob, you should be able
> to use its hash member however you want, right?
>
> In particular, you could store the filename for an opened FileHandle in
> the hash and it would be passed around with the FileHandle:

Randal S. inquired:

> What
> problem are you solving?

I specified:

> Given a FileHandle, what's the name of the file it's associated with (if
> any)?

I am right, am I not, in thinking that there is no way of figuring this
out already?

> Of course, my "solution" assumed I was the one who opened it in the
> first place, so I could use any number of other ways of remembering the
> filename...

Here's another way:

Use the "trick" in URI::WithBase, which adds the base to the
pre-existing URI object by bundling them both in an anonymous array. 
The first element is the ordinary URI object and the second is the
base.  The entire array gets blessed as a URI::WithBase (or subclass).

Any URI method to be performed on the URI::WithBase object, except for
the few that URI::WithBase defines for itself, will (initially) not be
found since the latter doesn't inherit anything from the former (it's
_not_ a subclass).  Instead, an AUTOLOAD routine is provided in
URI::WithBase to perform the appropriate method on the first element of
the array, which is the plain old URI object.  Neat!

(Apologies if that explanation was a little rough.)

So... I could create a module that bundles a plain old FileHandle object
with its filename, or even with a hash full of parameters (whatever
those may be), and provide appropriate methods to work with the
filename/parameters and an AUTOLOAD routine to call the other FileHandle
methods on the FileHandle.

Right?

Only problem is, I don't completely understand everything in
URI::WithBase, short though it may be! :-)

-- 
Donald Lancon


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

Date: 11 May 2000 13:03:25 -0700
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: associating a filename with a FileHandle
Message-Id: <m1ln1g97n6.fsf@halfdome.holdit.com>

>>>>> "Donald" == Donald Lancon <lancon@mail.ce.utexas.edu> writes:

Donald> I am right, am I not, in thinking that there is no way of figuring this
Donald> out already?

Have you seen the FAQ?  You can't figure something out consistently
that doesn't have an answer some of the time. :)

Watch closely:

    open F, "+>/tmp/somefile_$$";
    unlink "/tmp/somefile_$$";

Now tell me the "filename" associated with the filehandle F.  What?
There *isn't* one!

Or this:

    open F, "+>/tmp/somefile_$$";
    rename "/tmp/somefile_$$", "/tmp/otherfile_$$";

What now?

That's why any attempt to give "the name of the file associated with a
filehandle" as a general solution WILL FAIL.

print "Just another Perl hacker,"

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!


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

Date: Thu, 11 May 2000 13:35:52 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: associating a filename with a FileHandle
Message-Id: <MPG.1384b987f3f6d7a898aa57@nntp.hpl.hp.com>

[Posted and a courtesy copy mailed.]

In article <m1ln1g97n6.fsf@halfdome.holdit.com> on 11 May 2000 13:03:25 
-0700, Randal L. Schwartz <merlyn@stonehenge.com> says...
> >>>>> "Donald" == Donald Lancon <lancon@mail.ce.utexas.edu> writes:
> 
> Donald> I am right, am I not, in thinking that there is no way of figuring this
> Donald> out already?
> 
> Have you seen the FAQ?  You can't figure something out consistently
> that doesn't have an answer some of the time. :)
> 
> Watch closely:
> 
>     open F, "+>/tmp/somefile_$$";
>     unlink "/tmp/somefile_$$";
> 
> Now tell me the "filename" associated with the filehandle F.  What?
> There *isn't* one!

 ... on Unix.

> Or this:
> 
>     open F, "+>/tmp/somefile_$$";
>     rename "/tmp/somefile_$$", "/tmp/otherfile_$$";
> 
> What now?
> 
> That's why any attempt to give "the name of the file associated with a
> filehandle" as a general solution WILL FAIL.

 ... on Unix.

> print "Just another Perl hacker,"

who, in accordance with the custom of several other original Perl 
hackers, generalizes the behavior of Unixish file systems to other 
systems.  Though it would obviously be nonportable to Unix, a 
Windows/DOS program could uniquely relate a filehandle back to the name 
of the file.  And by a simple addition to the appropriate I/O block, 
even a Unix system could uniquely relate a file handle back to the name 
of the file *by which it was opened*.

So this argument is just a copout on an implementation deficiency that 
no one has chosen to deal with, rather than to blow away with words.  
Granted that the programmer can do the appropriate bookkeeping to 
maintain this association in the application program, so it may not be a 
worthwhile enhancement.  But dismissing it as invalid is cavalier, at 
best.

-- 
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


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

Date: Thu, 11 May 2000 16:42:08 -0500
From: Donald Lancon <lancon@mail.ce.utexas.edu>
Subject: Re: associating a filename with a FileHandle
Message-Id: <391B2930.6CDC359C@mail.ce.utexas.edu>

Probably the last I'll say in this thread (we can only hope)...

I followed up on my own comment:

> > Given a FileHandle, what's the name of the file it's associated with (if
> > any)?
> 
> I am right, am I not, in thinking that there is no way of figuring this
> out already?

Randall S. whipped out his blackboard and scribbled: [;-)]

>     open F, "+>/tmp/somefile_$$";
>     rename "/tmp/somefile_$$", "/tmp/otherfile_$$";
> 
> What now?

Yeah, I thought about that.  I was a bit sloppy with my question, that's
all.  [BTW, WinNT (for example) wouldn't allow that rename.  You really
should check its return value. ;-)]

When you successfully open a FileHandle on a file, there is a filename
thereby associated with the FileHandle.  I just wanted to verify there's
no way of recovering that filename later on, given only the still-open
FileHandle.

Anyway, I guess the best solution is just to bite the bullet and keep
the filename(s) in a global variable of some sort (as Tom P.
suggested).  Dammit. ;-)

-- 
Donald Lancon


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

Date: Thu, 11 May 2000 21:00:59 GMT
From: prakash_ojha@my-deja.com
Subject: call by reference subroutine!!
Message-Id: <8ff720$tcb$1@nnrp1.deja.com>

I want to write a subroutine that takes parameter by reference just like
in C, so that I can change the passed argument without returning a
value of some thing of that sort. can anyone help?

thanks in advance,
prakash


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Thu, 11 May 2000 14:29:50 -0700
From: Makarand Kulkarni <makarand_kulkarni@My-Deja.com>
Subject: Re: call by reference subroutine!!
Message-Id: <391B264E.7CD5702C@My-Deja.com>

> in C, so that I can change the passed argument without returning a
> value of some thing of that sort. can anyone help?

perldoc perlref
--



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

Date: Thu, 11 May 2000 19:03:34 GMT
From: Joydip Chakladar <joydip_chaklader@my-deja.com>
Subject: Re: Can a informix database manipulated by perl programming
Message-Id: <8ff05r$li8$1@nnrp1.deja.com>

Thank you Makarand for giving me the url.its great.



In article <3919ABBF.99D71A6E@My-Deja.com>,
  Makarand Kulkarni <makarand_kulkarni@My-Deja.com> wrote:
> >  Does perl have the neccesary subroutines to manipulate informix
> > database Version 6.0 (Unix version) and provide functions such as
add
> > record modify record delete record and different operation on
database
> > which will be ported on web
> >
>
> check
> http://www.symbolstone.org/technology/perl/DBI/
> The DBI home page.
> --
>
>

--
Joydip Chakladar
http://www.allindialive.com
From India to world
A meeting place of surfers and webmasters


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Thu, 11 May 2000 18:29:34 GMT
From: simeon2000@my-deja.com
Subject: Re: CGI problems (but it IS a perl thing)
Message-Id: <8feu5q$ivl$1@nnrp1.deja.com>

In article <u9g0rpdp16.fsf@wcl-l.bham.ac.uk>,
  nobull@mail.com wrote:

> They are not the same, one is tainted.  (See "perldoc perlsec" for
> explaination of tainting).

> There is a bug (IMNSHO) in &IO::Socket::connect in that it traps and
> discards the taint error.

> Does anyone know what useful purpose the eval { } in
> &IO::Socket::connect serves?

Sir,

I have checked out perldoc perlsec (and the camel book).  I found the
is_tainted function, and the way to supposedly "launder" the data, but
it still is not working.  I am at a loss as to what to do.  I tried
laundering it, didn't work.  Tried the taint checking, didn't work.
Please, if you could offer me some assistance as to how to remove the
taintedness of that SERVER param.

--
Thomas B. Holdren
Systems's Administrator, Linux Advocate,
RMS Fan (GO RMS-LINUX!!!)
===]:-)>


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Thu, 11 May 2000 19:28:00 GMT
From: tamiraw@my-deja.com
Subject: Re: Converting a Perl script into an executable file (.exe)
Message-Id: <8ff1jc$n28$1@nnrp1.deja.com>

Sorry,

This previous thread wasn't the issue, I am very sorry. The issue lies
after I completely compile my files and Perl2exe builds my program. I
attempt to execute the exe file and to no avail, I recieved an error
which states...

"Can't locate PERL2EXE_STORAGE/Mail/Sender.config in @INC (@INC
contains: PERL2EXE_ST ORAGE C:\TEMP lib\site .) at
PERL2EXE_STORAGE/Mail/Sender.pm line 26. BEGIN failed--compilation
aborted at PERL2EXE_STORAGE/Mail/Sender.pm line 27.
BEGIN failed--compilation aborted at C:\src\NetSwitch\NetSwitch.pl line
5."

Can anyone help????

~tamiraw

In article <8febiq$st4$1@nnrp1.deja.com>,
  tamiraw@my-deja.com wrote:
> Hello all:
>
> I am having trouble converting my perl script into an .exe file.
> Before I ran perl2exe <myscript.pl>, I placed the appropriate dll
files
> where my script were located, but for some reason it keeps telling me
> that I need to insert the dll's again. My output was as follows....
>
> Perl2Exe V3.05-AP5xx B05 Copyright (c) 1997-1998 Mercury Systems
> Pro version
> Registered to Joe Scelsa<joseph.scelsa@mail.tju.edu>
> Converting 'netswitch.pl' to netswitch.exe
> Compiling netswitch.pl
> Compiling c:\perl\site\lib\win32\eventlog.pm
> Compiling c:\perl\site\lib\auto\win32\eventlog\eventlog.dll
> Compiling sender.pm
> Compiling c:\perl\site\lib\tk.pm
> Compiling c:\perl\site\lib\auto\tk\tk.dll
> Compiling c:\perl\site\lib\auto\tk\autosplit.ix
> Compiling c:\perl\site\lib\auto\tk\break.al
> Compiling c:\perl\site\lib\auto\tk\cancelrepeat.al
> Compiling c:\perl\site\lib\auto\tk\clipboard.al
> Compiling c:\perl\site\lib\auto\tk\enterfocus.al
> Compiling c:\perl\site\lib\auto\tk\error.al
> Compiling c:\perl\site\lib\auto\tk\findinc.al
> Compiling c:\perl\site\lib\auto\tk\firstmenu.al
> Compiling c:\perl\site\lib\auto\tk\focuschildren.al
> Compiling c:\perl\site\lib\auto\tk\focusfollowsmouse.al
> Compiling c:\perl\site\lib\auto\tk\focusnext.al
> Compiling c:\perl\site\lib\auto\tk\focusok.al
> Compiling c:\perl\site\lib\auto\tk\focusprev.al
> Compiling c:\perl\site\lib\auto\tk\idletasks.al
> Compiling c:\perl\site\lib\auto\tk\imagenames.al
> Compiling c:\perl\site\lib\auto\tk\imagetypes.al
> Compiling c:\perl\site\lib\auto\tk\interps.al
> Compiling c:\perl\site\lib\auto\tk\lsearch.al
> Compiling c:\perl\site\lib\auto\tk\receive.al
> Compiling c:\perl\site\lib\auto\tk\repeatid.al
> Compiling c:\perl\site\lib\auto\tk\selection.al
> Compiling c:\perl\site\lib\auto\tk\tabfocus.al
> Compiling c:\perl\site\lib\auto\tk\traversetomenu.al
> Compiling c:\perl\site\lib\auto\tk\updatewidgets.al
> Compiling c:\perl\lib\vars.pm
> Compiling c:\perl\lib\exporter.pm
> Compiling c:\perl\lib\dynaloader.pm
> Compiling c:\perl\lib\auto\dynaloader\autosplit.ix
> Compiling c:\perl\lib\auto\dynaloader\dl_expandspec.al
> Compiling c:\perl\lib\auto\dynaloader\dl_findfile.al
> Compiling c:\perl\lib\auto\dynaloader\dl_find_symbol_anywhere.al
> Compiling c:\perl\lib\exporter.pm
> Compiling c:\perl\lib\filehandle.pm
> Compiling c:\perl\lib\socket.pm
> Compiling c:\perl\lib\auto\socket\socket.dll
> Compiling c:\perl\lib\file\basename.pm
> Compiling c:\perl\lib\re.pm
> Compiling c:\perl\site\lib\mime\base64.pm
> Compiling c:\perl\site\lib\auto\mime\base64\base64.dll
> Compiling c:\perl\site\lib\mime\quotedprint.pm
> Compiling c:\perl\lib\autoloader.pm
> Compiling c:\perl\lib\base.pm
> Compiling c:\perl\lib\strict.pm
> Compiling c:\perl\lib\symbol.pm
> Compiling c:\perl\lib\carp.pm
> Compiling c:\perl\site\lib\tk\submethods.pm
> Compiling c:\perl\site\lib\tk\widget.pm
> Compiling c:\perl\site\lib\auto\tk\widget\askludge.al
> Compiling c:\perl\site\lib\auto\tk\widget\autosplit.ix
> Compiling c:\perl\site\lib\auto\tk\widget\clipboardkeysyms.al
> Compiling c:\perl\site\lib\auto\tk\widget\pathname.al
> Compiling c:\perl\site\lib\tk\image.pm
> Compiling c:\perl\site\lib\tk\mainwindow.pm
> Compiling c:\perl\site\lib\tk\io.pm
> Compiling c:\perl\site\lib\auto\tk\io\io.dll
> Compiling c:\perl\site\lib\tk\dialog.pm
> Compiling c:\perl\site\lib\tk\coloreditor.pm
> Compiling c:\perl\site\lib\tk\fbox.pm
> Compiling c:\perl\lib\io\file.pm
> Compiling c:\perl\lib\fcntl.pm
> Compiling c:\perl\lib\auto\fcntl\fcntl.dll
> Compiling c:\perl\lib\term\cap.pm
> Compiling c:\perl\lib\integer.pm
> Compiling c:\perl\lib\fields.pm
> Compiling c:\perl\site\lib\tk\after.pm
> Compiling c:\perl\site\lib\tk\pretty.pm
> Compiling c:\perl\site\lib\tk\adjuster.pm
> Compiling c:\perl\lib\tie\scalar.pm
> Compiling c:\perl\site\lib\tk\cmdline.pm
> Compiling c:\perl\site\lib\auto\tk\cmdline\autosplit.ix
> Compiling c:\perl\site\lib\auto\tk\cmdline\loadresources.al
> Compiling c:\perl\site\lib\auto\tk\cmdline\setresources.al
> Compiling c:\perl\site\lib\tk\toplevel.pm
> Compiling c:\perl\site\lib\auto\tk\toplevel\autosplit.ix
> Compiling c:\perl\site\lib\auto\tk\toplevel\fg_bindin.al
> Compiling c:\perl\site\lib\auto\tk\toplevel\fg_bindout.al
> Compiling c:\perl\site\lib\auto\tk\toplevel\fg_create.al
> Compiling c:\perl\site\lib\auto\tk\toplevel\fg_destroy.al
> Compiling c:\perl\site\lib\auto\tk\toplevel\fg_in.al
> Compiling c:\perl\site\lib\auto\tk\toplevel\fg_out.al
> Compiling c:\perl\lib\io\handle.pm
> Compiling c:\perl\lib\io.pm
> Compiling c:\perl\lib\auto\io\io.dll
> Compiling c:\perl\site\lib\tk\frame.pm
> Compiling c:\perl\site\lib\auto\tk\frame\addscrollbars.al
> Compiling c:\perl\site\lib\auto\tk\frame\autosplit.ix
> Compiling c:\perl\site\lib\auto\tk\frame\findmenu.al
> Compiling c:\perl\site\lib\auto\tk\frame\freeze_on_map.al
> Compiling c:\perl\site\lib\auto\tk\frame\label.al
> Compiling c:\perl\site\lib\auto\tk\frame\labelpack.al
> Compiling c:\perl\site\lib\auto\tk\frame\labelvariable.al
> Compiling c:\perl\site\lib\auto\tk\frame\packscrollbars.al
> Compiling c:\perl\site\lib\auto\tk\frame\queuepack.al
> Compiling c:\perl\site\lib\auto\tk\frame\sbset.al
> Compiling c:\perl\site\lib\auto\tk\frame\scrollbars.al
> Compiling c:\perl\lib\subs.pm
> Compiling c:\perl\site\lib\tk\iconlist.pm
> Compiling c:\perl\lib\cwd.pm
> Compiling c:\perl\site\lib\tk\pixmap.pm
> Compiling c:\perl\site\lib\auto\tk\pixmap\pixmap.dll
> Compiling c:\perl\lib\selectsaver.pm
> Compiling c:\perl\lib\io\seekable.pm
> Compiling c:\perl\site\lib\tk\menu.pm
> Compiling c:\perl\lib\io\pipe.pm
> Compiling c:\perl\lib\io\socket.pm
> Compiling c:\perl\site\lib\tk\derived.pm
> Compiling c:\perl\site\lib\tk\scrollbar.pm
> Compiling c:\perl\site\lib\auto\tk\scrollbar\scrollbar.dll
> Compiling c:\perl\site\lib\auto\tk\scrollbar\autosplit.ix
> Compiling c:\perl\site\lib\auto\tk\scrollbar\buttondown.al
> Compiling c:\perl\site\lib\auto\tk\scrollbar\buttonup.al
> Compiling c:\perl\site\lib\auto\tk\scrollbar\classinit.al
> Compiling c:\perl\site\lib\auto\tk\scrollbar\drag.al
> Compiling c:\perl\site\lib\auto\tk\scrollbar\enddrag.al
> Compiling c:\perl\site\lib\auto\tk\scrollbar\enter.al
> Compiling c:\perl\site\lib\auto\tk\scrollbar\leave.al
> Compiling c:\perl\site\lib\auto\tk\scrollbar\motion.al
> Compiling c:\perl\site\lib\auto\tk\scrollbar\scrlbypages.al
> Compiling c:\perl\site\lib\auto\tk\scrollbar\scrlbyunits.al
> Compiling c:\perl\site\lib\auto\tk\scrollbar\scrltopbottom.al
> Compiling c:\perl\site\lib\auto\tk\scrollbar\scrltopos.al
> Compiling c:\perl\site\lib\auto\tk\scrollbar\select.al
> Compiling c:\perl\site\lib\auto\tk\scrollbar\startdrag.al
> Compiling c:\perl\site\lib\tk\label.pm
> Compiling c:\perl\site\lib\tk\wm.pm
> Compiling c:\perl\site\lib\auto\tk\wm\anchoradjust.al
> Compiling c:\perl\site\lib\auto\tk\wm\autosplit.ix
> Compiling c:\perl\site\lib\auto\tk\wm\fullscreen.al
> Compiling c:\perl\site\lib\auto\tk\wm\iconposition.al
> Compiling c:\perl\site\lib\auto\tk\wm\popup.al
> Compiling c:\perl\site\lib\auto\tk\wm\post.al
> Compiling c:\perl\site\lib\tk\menu\item.pm
> Compiling c:\perl\lib\config.pm
> Compiling c:\perl\site\lib\tk\configure.pm
>
> The following dll's are required to run the exe file:
> perlcrt.dll (this can be found in your windows system directory)
>
> I checked the directory for the hidden files and sure enough it was
> there. I don't know what the problem is. Can someone enlighten me.
>
> FYI: Perl v5.005_03 and Perl2Exe V3.05-AP5xx B05.
>
> Thanks in advance,
> Tamira
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Thu, 11 May 2000 15:20:49 -0500
From: "Mohammad Khan" <mkhan@crosscom.com>
Subject: Difficuly psting to a web site. Maybe a Port issue!!!!!!!!!!
Message-Id: <391b156a$0$1086@wodc7nh6.news.uu.net>

Hi,
    I am trying to post to MCI WorldComm site and I dont't get any response
back from the Site, so it errors out "Network Down." Now I can go to MCI
WorldComm web site from my browser. So looks like my perl script is not
going on port 80, which I believe is the default port for Browsers. Can
somebody help me with this. I also can't ping to this URL(www.wcom.com) or
their IP Address 204.176.69.71. There is no firewall or proxy server on my
machine and i can post to other web sites from my borswer.

Thanks.





  use LWP::UserAgent;
  $ua = new LWP::UserAgent;
  $ua->agent("AgentName/0.1 " . $ua->agent);

  local($tmp, @tmp1, $l_i, $l_cnt);

  my $req = new HTTP::Request POST =>
'http://www.wcom.com/cgi-bin/page/paging.pl';


  $req->content_type('application/x-www-form-urlencoded');

#  $send_msg = "provider=page-mci&pin=" . $p_id . "&textMessage=" . $text;
  $send_msg = "provider=page-mci&pin=" . $p_id . "&textMessage=" . $msg;
  $req->content($send_msg);

  # Pass request to the user agent and get a response back
  my $res = $ua->request($req);
printf "LLLLL=$res->content\n";

  # Check the outcome of the response
  if ($res->is_success)
  {
       $tmp = $res->content;

       if ($tmp =~ "ERROR")
       {
#          printf "Invalid Pager ID <br>";
          &log("Invalid Pager ID.");

          return 1;
       }

#          printf "Pager ID Accepted.<br> Message OK.";
#          printf "<br> Message Queued for Delivery. <br>";

          &log("Pager ID Accepted.");
          &log("Message OK.");
          &log("Message Queued for Delivery.");
          return 0;

  }
  else
  {
#      print "Network Down. <br>";
      &log("Network Down.");
      return 1;
  }





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

Date: Thu, 11 May 2000 13:21:28 -0700
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: Difficuly psting to a web site. Maybe a Port issue!!!!!!!!!!
Message-Id: <391B1648.EB0D0B57@vpservices.com>


Mohammad Khan wrote:

>   if ($res->is_success)
>   {
 ...
>   else
>   {
> #      print "Network Down. <br>";
>       &log("Network Down.");
>       return 1;
>   }

Why do you assume that if your LWP get() fails that it fails because
"Network Down"?  There could be many other reasons the get() fails. 
Check the actual status code returned and the specific error message
associated with that status code.

-- 
Jeff


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

Date: Thu, 11 May 2000 15:27:48 -0500
From: "Mohammad Khan" <mkhan@crosscom.com>
Subject: Re: Difficuly psting to a web site. Maybe a Port issue!!!!!!!!!!
Message-Id: <391b170c$0$1680@wodc7nh1.news.uu.net>

Well how do I check the error codes and/or error messages?

>
>Why do you assume that if your LWP get() fails that it fails because
>"Network Down"?  There could be many other reasons the get() fails.
>Check the actual status code returned and the specific error message
>associated with that status code.
>
>--
>Jeff




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

Date: Thu, 11 May 2000 13:37:08 -0700
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: Difficuly psting to a web site. Maybe a Port issue!!!!!!!!!!
Message-Id: <391B19F4.DC5F03EA@vpservices.com>



Mohammad Khan wrote:
> 
> Well how do I check the error codes and/or error messages?


#!perl -w
use strict;
use LWP::UserAgent;
my $url = shift || die "\nSYNTAX: $0 <url-to-retrieve>\n";
my $ua  = new LWP::UserAgent;
my $req = new HTTP::Request GET => $url;
my $res = $ua->request($req);
$res->is_success ? print $res->content,
                 : print $res->message;


-- 
Jeff


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

Date: Thu, 11 May 2000 15:45:56 -0500
From: "Mohammad Khan" <mkhan@crosscom.com>
Subject: Re: Difficuly psting to a web site. Maybe a Port issue!!!!!!!!!!
Message-Id: <391b1b4f$0$1085@wodc7nh6.news.uu.net>

Does this output helps?

HTTP::Response=HASH(0x8b7b50)->content
HTTP::Response=HASH(0x8b7b50)->message

Thanks.

Jeff Zucker wrote in message <391B19F4.DC5F03EA@vpservices.com>...
>
>
>Mohammad Khan wrote:
>>
>> Well how do I check the error codes and/or error messages?
>
>
>#!perl -w
>use strict;
>use LWP::UserAgent;
>my $url = shift || die "\nSYNTAX: $0 <url-to-retrieve>\n";
>my $ua  = new LWP::UserAgent;
>my $req = new HTTP::Request GET => $url;
>my $res = $ua->request($req);
>$res->is_success ? print $res->content,
>                 : print $res->message;
>
>
>--
>Jeff




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

Date: Thu, 11 May 2000 13:53:43 -0700
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: Difficuly psting to a web site. Maybe a Port issue!!!!!!!!!!
Message-Id: <391B1DD7.ADC8AFAC@vpservices.com>



Mohammad Khan wrote:
> 
> Does this output helps?
> 
> HTTP::Response=HASH(0x8b7b50)->content
> HTTP::Response=HASH(0x8b7b50)->message
> 

Sorry. I don't know where that comes from.  If you just take your
original script and substitute 

	print $res->message;

In the place where you had

	&log("Network Down.");

It should print out the response message.  If it doesn't then the
problem is in your script somewhere, not in the site you are visiting.

-- 
Jeff


> Thanks.
> 
> Jeff Zucker wrote in message <391B19F4.DC5F03EA@vpservices.com>...
> >
> >
> >Mohammad Khan wrote:
> >>
> >> Well how do I check the error codes and/or error messages?
> >
> >
> >#!perl -w
> >use strict;
> >use LWP::UserAgent;
> >my $url = shift || die "\nSYNTAX: $0 <url-to-retrieve>\n";
> >my $ua  = new LWP::UserAgent;
> >my $req = new HTTP::Request GET => $url;
> >my $res = $ua->request($req);
> >$res->is_success ? print $res->content,
> >                 : print $res->message;
> >
> >
> >--
> >Jeff


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

Date: Thu, 11 May 2000 16:09:06 -0500
From: "Mohammad Khan" <mkhan@crosscom.com>
Subject: Re: Difficuly psting to a web site. Maybe a Port issue!!!!!!!!!!
Message-Id: <391b20c2$0$1091@wodc7nh6.news.uu.net>

I did as you mentioned in this email. Can you or somebody help me point out
the errors and as I mentioned in my original email, i can post to other web
sites, only MCI WorldComm has problem.

 HTTP::Response=HASH(0x8b7b50)->content
 HTTP::Response=HASH(0x8b7b50)->message


>
> print $res->message;
>
>In the place where you had
>
> &log("Network Down.");
>
>It should print out the response message.  If it doesn't then the
>problem is in your script somewhere, not in the site you are visiting.
>
>--
>Jeff
>
>
>> Thanks.
>>
>> Jeff Zucker wrote in message <391B19F4.DC5F03EA@vpservices.com>...
>> >
>> >
>> >Mohammad Khan wrote:
>> >>
>> >> Well how do I check the error codes and/or error messages?
>> >
>> >
>> >#!perl -w
>> >use strict;
>> >use LWP::UserAgent;
>> >my $url = shift || die "\nSYNTAX: $0 <url-to-retrieve>\n";
>> >my $ua  = new LWP::UserAgent;
>> >my $req = new HTTP::Request GET => $url;
>> >my $res = $ua->request($req);
>> >$res->is_success ? print $res->content,
>> >                 : print $res->message;
>> >
>> >
>> >--
>> >Jeff




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

Date: Thu, 11 May 2000 11:57:42 -0700
From: Makarand Kulkarni <makarand_kulkarni@My-Deja.com>
Subject: Re: directory contents showing up ?!?
Message-Id: <391B02A6.37FC7CB2@My-Deja.com>



Daniel van den Oord wrote:

> I want to make a CGI script that displays the files in a specified
> directory So I don't have to make a database or a HTML thingy I have
> to continuously change when a file is changed !! is this possible ???I
> know some CGI except that.... please helpDaniel van den Oord      (
> Daniel304 RTCL )

Unless the directory in question was not under DOCUMENT_ROOT
you can let the web server do this task for you by setting
the Directory indexing ON ( refer to you webserver docs ).
--



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

Date: Thu, 11 May 2000 14:23:00 -0400
From: justin baugh <baughj@rpi.edu>
Subject: Re: DIVERTING TO A WEB PAGE
Message-Id: <391AFA84.48503650@rpi.edu>

> I have written a PERL script to copy the contents of a form
> to a temporary file and then send it to a pre-defined e-
> mail address. This works fine, what I would like to do now
> is to direct the user to a defined web-page (URL) after the
> mail has been sent. I assume this can be written in PERL
> and be placed at the end of my existing code.
> 
> I would appreciate any information as this is extremly
> URGENT!!!!!
> Thanks in advance,

do this, or use CGI:

print ("Location: <your URL here>");

Please note you can't send any content headers before this 
(i.e. Content-type: text/html).

~j

-- 
==================================================
Justin Baugh (baughj@nocannedmeat.rpi.edu)
PGP: http://www.rpi.edu/~baughj/keys.txt
"Evil is easy, and has infinite forms." - Pascal


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

Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 16 Sep 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.  

| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.

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.

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


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