[15652] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3065 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue May 16 18:06:16 2000

Date: Tue, 16 May 2000 15:05:26 -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: <958514726-v9-i3065@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Tue, 16 May 2000     Volume: 9 Number: 3065

Today's topics:
    Re: "bind: Invalid argument" makes me say "huh?" <elijah@workspot.net>
        accessing VSS from unix <dnkhan@my-deja.com>
    Re: accessing VSS from unix <jeff@vpservices.com>
    Re: Accurate IP return? <GBloke@actiongames.co.uk>
    Re: Accurate IP return? <jboesNOjbSPAM@qtm.net.invalid>
        Advice for Novice roda1967@my-deja.com
    Re: Advice for Novice (Neil Kandalgaonkar)
        Advice using LWP::Debug on HTML::Request::Common POST p <gnielson@charlotte.infi.net>
    Re: alphabeticalize a perl array <tony_curtis32@yahoo.com>
    Re: Any idea how i can do this? I need to insert a link (Abigail)
        bootstrap vinod@globalsight.com
        Camel T-Shirt <skpurcell@hotmail.com>
    Re: Camel T-Shirt (brian d foy)
    Re: Camel T-Shirt (Elaine -HFB- Ashton)
    Re: Camel T-Shirt <jboesNOjbSPAM@qtm.net.invalid>
    Re: Camel T-Shirt <care227@attglobal.net>
    Re: Camel T-Shirt (Clay Irving)
    Re: carriage returns (Abigail)
    Re: carriage returns <red_orc@my-deja.com>
    Re: carriage returns gregsptl1962@my-deja.com
        cgi.pm funcional interface stopped working bsmith@webnetint.com
    Re: cgi.pm funcional interface stopped working (Neil Kandalgaonkar)
    Re: Clueless NEWBIE help: Can't find error in code. <tigertom@NOSPAMusa.net>
    Re: Clueless NEWBIE help: Can't find error in code. <jeff@vpservices.com>
    Re: counter <thepoet1@arcormail.de>
    Re: counter <edbubbleluk@hotmail.com>
        crypt() question <s0218327@unix1.cc.ysu.edu>
    Re: crypt() question (brian d foy)
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: 16 May 2000 19:13:59 GMT
From: Eli the Bearded <elijah@workspot.net>
Subject: Re: "bind: Invalid argument" makes me say "huh?"
Message-Id: <eli$0005161508@qz.little-neck.ny.us>

In comp.lang.perl.misc, Jonathan Stowe  <gellyfish@gellyfish.com> wrote:
> On 15 May 2000 22:34:51 GMT, Eli the Bearded wrote:
> > I posted a question based on this last week and (tweaking Net::DNS)
> > and got no response. So I thought maybe I should ask it better.
> > 
> > Below is a small script that demonstrates the problem. When I
> > run it (5.005_03 on Linux and 5.004_03 on SunOS4) I get the
> > following error:
> > 
> > bind: Invalid argument at test-bind.pl line 28.
> > 
> > The use of bind on line 28 looks quite reasonable to me.

(see original post for script)

> > 	my $sock = 
> > 		IO::Socket::INET->new(PeerAddr => $each,
> > 			      PeerPort => $eport,
> > 			      Proto    => "udp");
> > 	if ($sport and $sock) {
> > 		$sock->setsockopt(SOL_SOCKET,SO_REUSEADDR, pack('l', 1))
> >                  or die "sockaddr_in: $!";
> >             $sock->bind($saddr)     # line 28
> >               or die "bind: $!";

> 
> Cant you use :
>           Reuse => 1
> in the constructor options rather than calling setsockopt ?

Yes, I could. However this would not do anything to fix my bind
problem. Similarly using the perl bind() function directly like
this:

                bind($sock,$saddr)
                  or die "bind: $!";

Still gives me the same error.

Elijah
------
was hoping for a more insightful post


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

Date: Tue, 16 May 2000 20:17:57 GMT
From: Khan <dnkhan@my-deja.com>
Subject: accessing VSS from unix
Message-Id: <8fsad4$vl6$1@nnrp1.deja.com>

Hi,
Microsoft VSS is used for sourcecode control for a lot of VC++
development here.
We now have a need to do some development work on unix ( solaris ).
We could use unix scc, but would like to have all code in one place.

The question :
Is it possible to check in/out project/files in VSS from Unix ?

I have been reading about Win32::OLE , but pls correct me if I'm wrong,
that module is only for the WINxx environment. If so, the next question
would be, is there an "OLE" type API from the unix side that will let
me get to VSS from , say Perl scripts on the unix box.

Any suggestions/comments/alternatives welcome.
Thanks in advance for your comments,
regards,
Khan


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


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

Date: Tue, 16 May 2000 13:36:42 -0700
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: accessing VSS from unix
Message-Id: <3921B15A.364C852C@vpservices.com>

Khan wrote:
> 
> Hi,
> Microsoft VSS is used for sourcecode control for a lot of VC++
> development here.
> We now have a need to do some development work on unix ( solaris ).
> We could use unix scc, but would like to have all code in one place.
> 
> The question :
> Is it possible to check in/out project/files in VSS from Unix ?
> 
> I have been reading about Win32::OLE , but pls correct me if I'm wrong,
> that module is only for the WINxx environment. If so, the next question
> would be, is there an "OLE" type API from the unix side that will let
> me get to VSS from , say Perl scripts on the unix box.

The OLE::Storage module can read some M$ type files from a nix
environment.  I have no idea how it would do with VSS files, but you
might want to check it out.

-- 
Jeff


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

Date: Tue, 16 May 2000 20:06:21 +0100
From: "[TNN]G.Bloke" <GBloke@actiongames.co.uk>
Subject: Re: Accurate IP return?
Message-Id: <8fs67n$8i4$1@plutonium.btinternet.com>

<SNIP>
> Your plan is misconceived, I'm afraid.  Try a CGI FAQ.  This is not a
> Perl language issue.

Ah...well, thanks anyway...

Does anyone want to actually help me then?

Why ask the question in a perl group? Well because I wondered if there was a
PERL variable I could use in my PERL script and I was told that you lot were
supposed to be friendly and helpful.

I'm sure that I've just been misunderstood, the question may have strictly
more to do with perl CGI than perl language but I fail to see where I
crossed the line between the two. I take it that there is no perl module or
straight ENV variable that can return the IP address that is given to a user
by their ISP?

--
G.Bloke




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

Date: Tue, 16 May 2000 12:50:38 -0700
From: Mur <jboesNOjbSPAM@qtm.net.invalid>
Subject: Re: Accurate IP return?
Message-Id: <128abda2.21b85ddd@usw-ex0101-006.remarq.com>

In article <8fs67n$8i4$1@plutonium.btinternet.com>, "[TNN]
G.Bloke" <GBloke@actiongames.co.uk> wrote:
><SNIP>

>Why ask the question in a perl group? Well because I wondered
if there was a
>PERL variable I could use in my PERL script and I was told that
you lot were
>supposed to be friendly and helpful.

1) There are no Perl variables that are set to contain server
data per se. There are Perl variables that are set to contain
environment variables. For example, %ENV. What your server does
with these is up to it. Often $ENV{HTTP_REFERER} is set to
something that looks like a referring URL. Sometimes it isn't.
Sometimes it's got whatever the author of the spider/bot/agent
decided to put in there as a prank. Same goes for the IP address
in $ENV{REMOTE_ADDR}.

Here's a link with more information:

http://www.stars.com/Authoring/CGI/Input/Env.html

2) This "lot" is quite friendly and helpful, provided you don't
(a) ask a question that has nothing to do with Perl, or (b) ask
a FAQ. There is one, and it's quite good. Check it out.

    http://www.cpan.org/doc/FAQs/
    http://www.perlfaq.com/



>
>I'm sure that I've just been misunderstood, the question may
have strictly
>more to do with perl CGI than perl language but I fail to see
where I
>crossed the line between the two.

Ask yourself in the future: is this question of interest to CGI
programmers who happen to be using Perl? If so, post to
comp.infosystems.www.authoring.cgi. If it's of interest to ANY
Perl programmer, post here.




Jeff Boes//ICQ=3394914//Yahoo!=jeffboes//AOL IM=jboes
  //home=jboes@qtm.net//professional=mur@consultant.com

* Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
The fastest and easiest way to search and participate in Usenet - Free!



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

Date: Tue, 16 May 2000 19:23:37 GMT
From: roda1967@my-deja.com
Subject: Advice for Novice
Message-Id: <8fs777$rk0$1@nnrp1.deja.com>

I'm brand new to Perl and have little to no experience with
programming.  The extent of my programming is writing a few batch files
here and there.  My background has been in administration and training
of NT and Novell networks.  What are some recommended resources such as
books, web sites, etc.. for someone like me?  So far I've checked out
www.perl.com and also have the O'Reilly book Learning Perl, 2nd edition.


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


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

Date: 16 May 2000 20:59:41 GMT
From: nj_kanda@alcor.concordia.ca (Neil Kandalgaonkar)
Subject: Re: Advice for Novice
Message-Id: <8fscrt$4sp$1@newsflash.concordia.ca>

In article <8fs777$rk0$1@nnrp1.deja.com>,  <roda1967@my-deja.com> wrote:
>My background has been in administration and training of NT and Novell
>networks.  What are some recommended resources such as books, web sites,
>etc.. for someone like me?  So far I've checked out www.perl.com and
>also have the O'Reilly book Learning Perl, 2nd edition.

That sounds like a good start already.

I would add: make sure to get a perl distribution installed on a local
machine, not just a remote server. Coming from an NT background, you
may not be aware that perl comes with lots of documentation and tutorials.

Programming Perl is the definitive reference, similar to the on-line
documentation but fleshed out a bit more. Others disagree with me but I
find the Perl Cookbook is excellent for understanding how perl operators
and functions work together, in context. It has sections appropriate
for novices and experts alike. Both books are from O'Reilly.

For exceptionally clear tutorials, and some bizarre and
hilarious perl contraptions, see Mark-Jason Dominus' Perl
Paraphenalia. <http://www.plover.com/>

The Perl Journal has a mix of the practical, the enlightening, and the
whimsical. Edited by Jon Orwant. <http://www.tpj.com/>.

-- 
Neil Kandalgaonkar
neil@brevity.org


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

Date: Tue, 16 May 2000 16:52:40 -0400
From: Gary Nielson <gnielson@charlotte.infi.net>
Subject: Advice using LWP::Debug on HTML::Request::Common POST problem
Message-Id: <3921B518.5B8754DC@charlotte.infi.net>

I am wanting to automatically update content on a website via a form,
using HTTP::Request::Common. I've got it almost working, if by "almost"
you mean that the script will send a username and password to get
through password protection. But instead of updating the name/value
pairs, the script wipes out the existing content and in its place is
nothing at all. I am seeking to replace html urls and links. I have
poured over the man pages, perldoc lwpcook and perlfaq9, checking my
syntax, etc. and can not figure out what is wrong.

First of all, when you look at the source code for the html page of this
form, it calls for POST and enctype="multipart/form-data". So I have set
up my script for Content_type => 'form-data'. I have included every
name/value pair, even those that would be left blank by users manually
filling out the form. I am assuming either way is OK.

One question I have is how does HTTP::Request::Common know to submit a
form? This form page has three selections, one to preview, one to
publish and one to reset. The examples I've seen in the documentation do
not include a submit name/value pair, but when I omit that, nothing at
all changes on the form. But when I include it (name: save, value:
Publish), it replaces the information with nothing, as I mentioned. In
the form itself, the input field for publishing is "type=submit"; do I
need to denote that in some way and if so, how?

Another question: What is the proper syntax for variables in the hash. I
have not included quotes or double quotes around them. I am just trying
to see if I have the syntax right all the way through, or if there is
something I need to clear up here.

Finally, the man page for LWP said it supports HTTP/1.0  -- "The
libwww-perl HTTP implementation currently support the HTTP/1.0 protocol"
-- and the LWP::Protocol::http::request is  HTTP/1.1 -- It says 200 OK,
so I guess it's alright. But could that be a problem?

Any help, advice, direction, encouragement much appreciated. I am a bit
over my head here and trying to stay afloat :)

Gary

Here is the segment of the script in question:

use HTTP::Request::Common qw(POST);
use LWP::Debug qw(+);  # DEBUG
use LWP::UserAgent;
$ua = LWP::UserAgent->new;
my $req = POST $urlToSendTo,
Content_Type => 'form-data',
Content =>
       [ sectionID   => $sectionID,
   headerLabel1   => $headerLabel1,
   moreURL1   => $site,
   headlineText1  => '',
   headlineURL1   => '',
   headlineText2  => '',
   headlineURL2   => '',
   imageProdDisplay1 => '',
   imageDevExt1         => '',
   imageProdExt1  => '',
   imageDevDisplay1 => '',
   imageFile1         => '',
   imageURL1   => '',
   imageALT1         => '',
   imageProdDisplay2 => '',
   imageDevExt2         => '',
   imageProdExt2  => '',
   imageDevDisplay2 => '',
   imageFile2  => '',
   imageURL2   => '',
   imageALT2         => '',
   linkText1         => $head1,
   linkURL1         => $url1,
   linkText2         => $head2,
   linkURL2         => $url2,
   linkText3         => $head3,
   linkURL3         => $url3,
   linkText4         => $head4,
   linkURL4         => $url4,
   linkText5         => $head5,
   linkURL5         => $url5,
   linkText6         => '',
   linkURL6         => '',
   linkText7         => '',
   linkURL7         => '',
   linkText8         => '',
   linkURL8         => '',
   templateSelect  => $template,
  save          => 'Publish',
];
$req->authorization_basic($username, $password);
$content = $ua->request($req)->as_string;

I am using LWP::Debug to get a sense of what is going on:

Name "main::content" used only once: possible typo at program.pl line
79.
LWP::UserAgent::new: ()
Use of uninitialized value at
/usr/local/lib/perl5/site_perl/5.005/HTTP/Request/Common.pm line 99.
Use of uninitialized value at
/usr/local/lib/perl5/site_perl/5.005/HTTP/Request/Common.pm line 99.
Use of uninitialized value at
/usr/local/lib/perl5/site_perl/5.005/HTTP/Request/Common.pm line 99.
Use of uninitialized value at
/usr/local/lib/perl5/site_perl/5.005/HTTP/Request/Common.pm line 99.
Use of uninitialized value at
/usr/local/lib/perl5/site_perl/5.005/HTTP/Request/Common.pm line 99.
Use of uninitialized value at
/usr/local/lib/perl5/site_perl/5.005/HTTP/Request/Common.pm line 99.
Use of uninitialized value at
/usr/local/lib/perl5/site_perl/5.005/HTTP/Request/Common.pm line 99.
Use of uninitialized value at
/usr/local/lib/perl5/site_perl/5.005/HTTP/Request/Common.pm line 99.
Use of uninitialized value at
/usr/local/lib/perl5/site_perl/5.005/HTTP/Request/Common.pm line 99.
Use of uninitialized value at
/usr/local/lib/perl5/site_perl/5.005/HTTP/Request/Common.pm line 99.
LWP::UserAgent::request: ()
LWP::UserAgent::simple_request: POST
http://vh40154.vh4.infi.net/cgi-bin/admin/localbox_template/?section=local_news

LWP::UserAgent::_need_proxy: Not proxied
LWP::Protocol::http::request: ()
LWP::Protocol::http::request: POST
/cgi-bin/admin/localbox_template/?section=local_news HTTP/1.0
Authorization: Basic Y2hhcmxvdHQ6IWdvbGRtaW4=
Host: vh40154.vh4.infi.net
User-Agent: libwww-perl/5.48
Content-Length: 2621
Content-Type: multipart/form-data; boundary=xYzZY

LWP::Protocol::http::request: POST
/cgi-bin/admin/localbox_template/?section=local_news HTTP/1.0
Authorization: Basic Y2hhcmxvdHQ6IWdvbGRtaW4=
Host: vh40154.vh4.infi.net
User-Agent: libwww-perl/5.48
Content-Length: 2621
Content-Type: multipart/form-data; boundary=xYzZY

LWP::Protocol::http::request: reading response
LWP::Protocol::http::request: HTTP/1.1 200 OK
Server: Netscape-Enterprise/3.6 SP2
Date: Tue, 16 May 2000 19:12:45 GMT
Content-type: text/html

LWP::Protocol::http::request: HTTP/1.1 200 OK
LWP::Protocol::collect: read 1448 bytes
LWP::Protocol::collect: read 1448 bytes
LWP::Protocol::collect: read 1448 bytes
LWP::Protocol::collect: read 751 bytes
LWP::Protocol::collect: read 1448 bytes
LWP::Protocol::collect: read 1448 bytes
LWP::Protocol::collect: read 1448 bytes
LWP::Protocol::collect: read 776 bytes
LWP::Protocol::collect: read 1448 bytes
LWP::Protocol::collect: read 1448 bytes
LWP::Protocol::collect: read 1448 bytes
LWP::Protocol::collect: read 752 bytes
LWP::UserAgent::request: Simple response: OK

 (FYI, the lwpcook perldoc shows an object created that includes when
running a POST to cgi form script that is nothing like what I am seeing:

POST http://www.perl.org/survey.cgi
             Content-Length: 388
             Content-Type: multipart/form-data; boundary="6G+f"

             --6G+f
             Content-Disposition: form-data; name="name"

             Gisle Aas)





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

Date: 16 May 2000 16:40:44 -0500
From: Tony Curtis <tony_curtis32@yahoo.com>
Subject: Re: alphabeticalize a perl array
Message-Id: <87d7mmyy03.fsf@shleppie.uh.edu>

>> On Mon, 15 May 2000 17:36:07 GMT,
>> Andrew <awd@seol.net.au> said:

> hi I need to make an array (over 100 entries) in
> alphabetical order.  Would anyone have an idea on how to
> do this.  it's perl 5.

$ perldoc -q sort

hth
t


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

Date: 16 May 2000 18:26:37 GMT
From: abigail@foad.org (Abigail)
Subject: Re: Any idea how i can do this? I need to insert a link after or before a
Message-Id: <slrn8i34mt.k11.abigail@ucan.foad.org>

On Mon, 15 May 2000 16:02:55 -0500, Wes <wesleys@globeset.com> wrote:
++ Any idea how i can do this? I need to insert a link after or before a
++ specific link.


Perl doesn't have a datatype 'link'.

What do you mean? What do you want to do? Are you sure you have a
Perl related question?



Abigail


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

Date: Tue, 16 May 2000 21:42:40 GMT
From: vinod@globalsight.com
Subject: bootstrap
Message-Id: <8fsfcd$597$1@nnrp1.deja.com>

I am trying to run swig on a c++ program(icu_wrap.i) and trying to
create a .pm perl module for that file.(icu_wrap.pm)
So that a perl module gets created for the c++ program and we can use
it from the perl programs.

Then we are trying to create a shared library (icu_wrap.sl) to use it
from the perl programs.

But when I run a test program it fails saying
Can't load './icu_wrap.sl' for module icu_wrap: Unresolved external at
/usr/loca
l/gscorp/as/lib/perl5/5.00503/PA-RISC2.0/DynaLoader.pm line 169.

 at Locale_test.pl line 3
BEGIN failed--compilation aborted at Locale_test.pl line 3.

What may be the reson for the failure ?

Please let me know if more information is required.
Thanks,
Gautam


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


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

Date: Tue, 16 May 2000 13:10:24 -0500
From: "spurcell" <skpurcell@hotmail.com>
Subject: Camel T-Shirt
Message-Id: <39218f09$0$18135@wodc7nh1.news.uu.net>

Hello,
I just signed up for some of Tom's classes and would like to get a Camel
T-Shirt to take up to Boulder.
I can't seem to find them anywhere, I went to O'Reilly and to Perl.com Does
anyone out there know where to get one?
Thanks
Scott




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

Date: Tue, 16 May 2000 14:47:38 -0500
From: brian@smithrenaud.com (brian d foy)
Subject: Re: Camel T-Shirt
Message-Id: <brian-1605001447380001@rtp-cr45-dhcp-100.cisco.com>

In article <39218f09$0$18135@wodc7nh1.news.uu.net>, "spurcell" <skpurcell@hotmail.com> wrote:

>I just signed up for some of Tom's classes and would like to get a Camel
>T-Shirt to take up to Boulder.
>I can't seem to find them anywhere, I went to O'Reilly and to Perl.com Does
>anyone out there know where to get one?

if you don't mind wearing a Perl Mongers shirt, we sell them through
www.geekstuff.com, Camel and all.  to get an O'Reilly shirt, you 
probably have to go to the Perl Conference. :)

-- 
brian d foy
Perl Mongers <URI:http://www.perl.org>
CGI MetaFAQ 
  <URI:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>



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

Date: 16 May 2000 18:45:01 GMT
From: elaine@chaos.wustl.edu (Elaine -HFB- Ashton)
Subject: Re: Camel T-Shirt
Message-Id: <slrn8i35m4.364.elaine@chaos.wustl.edu>

In article <39218f09$0$18135@wodc7nh1.news.uu.net>, spurcell wrote:
>I just signed up for some of Tom's classes and would like to get a Camel
>T-Shirt to take up to Boulder.
>I can't seem to find them anywhere, I went to O'Reilly and to Perl.com Does
>anyone out there know where to get one?

Why not email ORA and ask? :) I don't think they sell shirts 
anymore but they do have a few for promotional stuff iirc...maybe
if you are persuasive you can get them to give you one.

However, you can always get one of these...
http://www.nerdgear.com//search.php?@category=4
http://orders.geekstuff.com/catalog.cgi?page=perlmongers.html&cart_id=
and...
http://www.perltoys.com/

e.


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

Date: Tue, 16 May 2000 12:56:18 -0700
From: Mur <jboesNOjbSPAM@qtm.net.invalid>
Subject: Re: Camel T-Shirt
Message-Id: <0f7d38fe.2332dd83@usw-ex0101-006.remarq.com>

There's also a "Swiss Army Chainsaw" shirt, sold by (I believe)
The Perl Journal. I can't find reference to it at their site
(www.tpj.com), though.


Jeff Boes//ICQ=3394914//Yahoo!=jeffboes//AOL IM=jboes
  //home=jboes@qtm.net//professional=mur@consultant.com

* Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
The fastest and easiest way to search and participate in Usenet - Free!



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

Date: Tue, 16 May 2000 16:51:29 -0400
From: Drew Simonis <care227@attglobal.net>
Subject: Re: Camel T-Shirt
Message-Id: <3921B4D1.447E83F6@attglobal.net>



brian d foy wrote:

> if you don't mind wearing a Perl Mongers shirt, we sell them through
> www.geekstuff.com, Camel and all.  to get an O'Reilly shirt, you
> probably have to go to the Perl Conference. :)

From Websters:  

monger \Mon"ger\, v. t. To deal in; to make merchandise of; to 
traffic in; -- used chiefly of discreditable traffic. 

=(


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

Date: 16 May 2000 20:54:41 GMT
From: clay@kozmik.skechers.com (Clay Irving)
Subject: Re: Camel T-Shirt
Message-Id: <8fscih$ril$1@news.panix.com>

On 16 May 2000 18:45:01 GMT, Elaine -HFB- Ashton <elaine@chaos.wustl.edu> wrote:

>Why not email ORA and ask? :) I don't think they sell shirts 
>anymore but they do have a few for promotional stuff iirc...maybe
>if you are persuasive you can get them to give you one.
>
>However, you can always get one of these...
>http://www.nerdgear.com//search.php?@category=4
>http://orders.geekstuff.com/catalog.cgi?page=perlmongers.html&cart_id=
>and...
>http://www.perltoys.com/

Ding.

Now, there's an idea. How about a Perl "gear" section in Perl Reference?

   http://www.perl.com/reference/query.cgi?gear

--
Clay Irving
clay@panix.com


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

Date: 16 May 2000 18:28:55 GMT
From: abigail@foad.org (Abigail)
Subject: Re: carriage returns
Message-Id: <slrn8i34r6.k11.abigail@ucan.foad.org>

On Tue, 16 May 2000 17:59:56 GMT, Wybo Wiersma <s.wiersma01@chello.nl> wrote:
++ If I upload my scripts to the server in ascii mode, then They always seem to
++ contain carriage returns which results the scripts in crashing. Is there
++ some easy way to prevent this ?


And your Perl question is?

Perhaps you should call tech support of the vendor of whatever program you
use to "upload" your programs to your server.


Abigail


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

Date: Tue, 16 May 2000 19:04:46 GMT
From: Rodney Engdahl <red_orc@my-deja.com>
Subject: Re: carriage returns
Message-Id: <8fs643$q8g$1@nnrp1.deja.com>

In article <w0gU4.2812$No1.22673@flipper>,
  "Wybo Wiersma" <s.wiersma01@chello.nl> wrote:
> If I upload my scripts to the server in ascii mode, then They always
seem to
> contain carriage returns which results the scripts in crashing. Is
there
> some easy way to prevent this ?
>
>

use an editor that does not insert the offending characters.


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


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

Date: Tue, 16 May 2000 19:18:14 GMT
From: gregsptl1962@my-deja.com
Subject: Re: carriage returns
Message-Id: <8fs6t5$rg1$1@nnrp1.deja.com>

In article <w0gU4.2812$No1.22673@flipper>,
  "Wybo Wiersma" <s.wiersma01@chello.nl> wrote:
> If I upload my scripts to the server in ascii mode, then They always
seem to
> contain carriage returns which results the scripts in crashing. Is
there
> some easy way to prevent this ?
>
> I would bet your editing your scripts on a DOS based box and
"uploading" to a *nix box.  There are filters e.g. dos2ux, ux2dos to
"translate" i.e. get rid of <CR> or write a perl filter using
$\ == 0x0d as input filter and $, as output filter


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


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

Date: Tue, 16 May 2000 21:31:12 GMT
From: bsmith@webnetint.com
Subject: cgi.pm funcional interface stopped working
Message-Id: <8fsen1$4j5$1@nnrp1.deja.com>

Please help, I'm using ActivePerl build 522 and latest CGI.pm, and this
one script does not print the http headers and html like all my others
do.  I'm using func. interface rather than oo.

brian

use CGI;
use DBI;

$database = "test";

$dsn = "DBI:mysql:database=$database";

$dbh = DBI->connect($dsn,"","") || die "can't connect";

$sth = $dbh->prepare("SELECT * FROM TBL_USERS");

$sth->execute;

my $t;
my $d = $sth->fetchrow_hashref() or die "can't get row";

$t .= $d->{username};
$t .= br . $d->{password};
$sth->finish();

print header;
print start_html;
print $t;
print end_html;


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


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

Date: 16 May 2000 21:48:20 GMT
From: nj_kanda@alcor.concordia.ca (Neil Kandalgaonkar)
Subject: Re: cgi.pm funcional interface stopped working
Message-Id: <8fsfn4$1dd$1@newsflash.concordia.ca>

In article <8fsen1$4j5$1@nnrp1.deja.com>,  <bsmith@webnetint.com> wrote:
>I'm using func. interface rather than oo.

>use CGI;

From the CGI man page:         

       The following example
       prints the same page, but uses the function-oriented
       interface.  The main differences are that we now need to
       import a set of functions into our name space (usually the
       "standard" functions), and we don't need to create the CGI
       object.
 
          #!/usr/local/bin/perl
          use CGI qw/:standard/;      


-- 
Neil Kandalgaonkar
neil@brevity.org


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

Date: Tue, 16 May 2000 20:46:21 +0100
From: tigertom <tigertom@NOSPAMusa.net>
Subject: Re: Clueless NEWBIE help: Can't find error in code.
Message-Id: <3921A58C.C1F25A3@NOSPAMusa.net>

er...I'm still stuck.  Can anyone help?

TigerTom

tigertom wrote:

> I've posted the problem subroutine at
> http://www.tigertom.com/mailout.txt, in case it
> doesn't come out right here.
>
> It's a sub-routine to mail all subscribers on a mailing list.  I imagine
>
> I probably shouldn't use Perl and sendmail to do this, but I'd like
> to make the thing *work* before I discard it, and/or find out what's
> wrong.
>
> This sub-routine executes successfully (it sends out the emails ok), and
>
> then crashes (500 server error).  The only other subroutine executed is
> a read-parse one, so I don't think it's another part of the script
> that's doing it.  Can anyone
> give me some clues?  I don't have my own server, so I can't check the
> error logs.
>
> TigerTom
> tigertomNOSPAM@usa.net



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

Date: Tue, 16 May 2000 12:48:25 -0700
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: Clueless NEWBIE help: Can't find error in code.
Message-Id: <3921A609.819ECBB1@vpservices.com>

> tigertom wrote:
> 
> > This sub-routine executes successfully (it sends out the emails ok), and
> > then crashes (500 server error).  

Put this line near the top of your script, it will send most error
messages to the browser:

    use CGI::Carp qw(fatalsToBrowser);

> > ... I don't have my own server, so I can't check the
> > error logs.

Even if it is not your server, one would think the admins would give you
access to the error logs, it is to their advantage for you to know about
what is in them.  Have you asked?

-- 
Jeff


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

Date: Tue, 16 May 2000 19:47:01 +0200
From: Christian Winter <thepoet1@arcormail.de>
Subject: Re: counter
Message-Id: <li1sf8.qs1.ln@usenet-autoren.de>

Ed <edbubbleluk@hotmail.com> schrob:
> Hi Gang,

> I tried to run this code which is above from Christian (I copied it below
> for you to see) and it does not work, I get premature end of script headers,
> can anybody help?

Hm. Did you upload it as "ASCII"?
Did you put the paths right and generate the "hits.dat" and "visitors.dat"
files in the right place?

If yes, what platform and server is it running on? Which perl version?

Curios
Christian


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

Date: Tue, 16 May 2000 16:47:46 -0400
From: "Ed" <edbubbleluk@hotmail.com>
Subject: Re: counter
Message-Id: <8fsbu1$44n$1@slb1.atl.mindspring.net>

I am using virtual hosting on hypermart.net

IT allows perl version 5.  It runs all my other scripts, but not this one.
May I email you the ftp server and password so you can try it out?

IF so, let me know and I will email it to you.  Do I have to do something
with the time and date functions?  do they have a path on the server too?


Ed



Christian Winter <thepoet1@arcormail.de> wrote in message
news:li1sf8.qs1.ln@usenet-autoren.de...
> Ed <edbubbleluk@hotmail.com> schrob:
> > Hi Gang,
>
> > I tried to run this code which is above from Christian (I copied it
below
> > for you to see) and it does not work, I get premature end of script
headers,
> > can anybody help?
>
> Hm. Did you upload it as "ASCII"?
> Did you put the paths right and generate the "hits.dat" and "visitors.dat"
> files in the right place?
>
> If yes, what platform and server is it running on? Which perl version?
>
> Curios
> Christian




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

Date: Tue, 16 May 2000 15:28:58 -0400
From: NagaPutih <s0218327@unix1.cc.ysu.edu>
Subject: crypt() question
Message-Id: <Pine.A41.4.20.0005161524340.22918-100000@unix1.cc.ysu.edu>


how do i manipulate password file to be used with
 .htaccess in perl? the password file is typically
manipulated using an provided executable (htpasswd).

what salt value should i use in crypt()-ing password
so that the encrypted password could be understood
by the httpd daemon?

thank's!



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

Date: Tue, 16 May 2000 15:40:45 -0500
From: brian@smithrenaud.com (brian d foy)
Subject: Re: crypt() question
Message-Id: <brian-1605001540450001@rtp-cr45-dhcp-100.cisco.com>

In article <Pine.A41.4.20.0005161524340.22918-100000@unix1.cc.ysu.edu>, NagaPutih <s0218327@unix1.cc.ysu.edu> wrote:

>how do i manipulate password file to be used with
>.htaccess in perl? the password file is typically
>manipulated using an provided executable (htpasswd).

CPAN has some modules for this:  <URL:htp://search.cpan.org>

>what salt value should i use in crypt()-ing password
>so that the encrypted password could be understood
>by the httpd daemon?

any salt that you like.

-- 
brian d foy
Perl Mongers <URI:http://www.perl.org>
CGI MetaFAQ 
  <URI:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>



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

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


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