[10159] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3752 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Sep 18 15:07:22 1998

Date: Fri, 18 Sep 98 12:00:21 -0700
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, 18 Sep 1998     Volume: 8 Number: 3752

Today's topics:
        /etc/passwd file <minich@globalnet.co.uk>
    Re: /etc/passwd file <eashton@bbnplanet.com>
    Re: any way to encrypt my script? bitnut1@my-dejanews.com
    Re: Bizarre .pl<>IIS interaction (Steve Linberg)
    Re: COBOL and Perl (Walter Tice USG)
    Re: Different way or not to use grep here? (Larry Rosler)
        file locking <rgoniea@pcisys.net>
    Re: How large is a scalar? and related declaration ques <uri@camel.fastserv.com>
    Re: How large is a scalar? and related declaration ques (Larry Rosler)
    Re: how safe is xor encryption ? <jdw@alder.dev.tivoli.com>
    Re: How to "execute" a CGI (Perl) script inside a HTML  (Neil Kandalgaonkar)
    Re: IGNORE: STDERR redirection X 2 <tturton@cowboys.anet-dfw.com>
    Re: Interesting method technique: Default $self <mjd@Op.Net>
    Re: Need help with a simple program (newbie). (Larry Rosler)
    Re: O'Reilly CGI Programming book <necom@NO-SPAMnecom.com>
    Re: Parallel User Agent (was: What's the meaning of the patrick@cre8tivegroup.com
    Re: passing argument !!!! (Larry Rosler)
        Perl-scrit for converting ftn *.PKT into *.HTML <flanker@sonnet.ru>
    Re: Q:ActiveState's win32release missing makemaker - he <josef.seknicka@aut.alcatel.at>
        Question on using Net::SSLeay::get_https <rarab@sympatico.ca>
        STDERR redirection X 2 ?? <tturton@cowboys.anet-dfw.com>
    Re: two dimensional hashes (Abigail)
    Re: User inputted regexp. (Abigail)
        Win32p: Cleaning up after yourself aaronp@removeme-shore.net
        Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)

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

Date: Fri, 18 Sep 1998 16:24:03 +0100
From: "Martin" <minich@globalnet.co.uk>
Subject: /etc/passwd file
Message-Id: <6tu57j$2ek$1@heliodor.xara.net>

Hi, could anyone please help me! I'm writing a script to add a new user
to a Unix system and need to append the /etc/passwd file. I see that the
data in here are arranged as fields separated by :s. Could someone
who's feeling a bit generous and knows it please tell me what each of
the fields are or point me in the direction of where to find it out.

Also, the password is encrypted. Does anyone know how I could encrypt
a password in $foo to allow it to be outputted to the passwd file?

Martin

PS> Is there a way to remove users from Red Hat Linux?




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

Date: Fri, 18 Sep 1998 17:57:48 GMT
From: Elaine -HappyFunBall- Ashton <eashton@bbnplanet.com>
Subject: Re: /etc/passwd file
Message-Id: <36029CB6.B64D1A4A@bbnplanet.com>

Martin wrote:

> Hi, could anyone please help me! I'm writing a script to add a new user
> to a Unix system and need to append the /etc/passwd file. I see that the
> data in here are arranged as fields separated by :s. Could someone
> who's feeling a bit generous and knows it please tell me what each of
> the fields are or point me in the direction of where to find it out.

start with 'man passwd'

> Also, the password is encrypted. Does anyone know how I could encrypt
> a password in $foo to allow it to be outputted to the passwd file?

perldoc -f crypt


> PS> Is there a way to remove users from Red Hat Linux?

yes, "#rm -rf /etc/passwd" :)

Hint, there is a GUI tool for that.


e.

"All of us, all of us, all of us trying to save our immortal souls, some
ways seemingly more round-about and mysterious than others. We're having
a good time here. But hope all will be revealed soon."  R. Carver


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

Date: Fri, 18 Sep 1998 18:35:10 GMT
From: bitnut1@my-dejanews.com
Subject: Re: any way to encrypt my script?
Message-Id: <6tu94v$9sh$1@nnrp1.dejanews.com>


>------------------------------------------
> Question:
> if I don't want to show my source code
> to the world, what should I do with my script?
>------------------------------------------
> Replies:
> - format c:
> - Delete it.
> - Do you really want to start a religious argument here?
> - Don't use it where it can be seen.
>------------------------------------------

Amazing!
A question like this would be answered in most places in a
straightforward manner with helpful pointers and references.

The need to compile a program is self-evident to anyone who has
written a program longer than one page. Every serious language
has that option and major efforts go into improving compilers.

Now, which is it:
-- Perl is an immature language and unusable for serious work, or
-- Perl users are immature and unable to answer a simple question.

B.N.

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

Date: Fri, 18 Sep 1998 13:21:24 -0500
From: linberg@literacy.upenn.edu (Steve Linberg)
Subject: Re: Bizarre .pl<>IIS interaction
Message-Id: <linberg-1809981321240001@ltl1.literacy.upenn.edu>

In article <36028d47.55121230@news.oz.net>, johnm@oz.net (John MacIntyre) wrote:

> I have a script that runs just fine on a IIS 4.0 server on NT, ONLY
> when run from Internet Explorer.  If I attempt to run the script from
> Netscape it *downloads* the .pl file, instead of executing it on the
> server.
> 
> Any ideas on what I need to do either in the calling HTML, or in
> server settings to make this work?

I'd suggest asking this server question in an IIS newsgroup. :)
_____________________________________________________________________
Steve Linberg                       National Center on Adult Literacy
Systems Programmer &c.                     University of Pennsylvania
linberg@literacy.upenn.edu              http://www.literacyonline.org


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

Date: 18 Sep 1998 18:14:51 GMT
From: tice@hunch.zk3.dec.com (Walter Tice USG)
Subject: Re: COBOL and Perl
Message-Id: <6tu7ur$jiu@zk2nws.zko.dec.com>

As a Software guy with 15 years in, including more than 2 each of Fortran, COBOL, C, and Perl,
I am going to add my .03 to this topic.

Perl is superior for: prototyping, programmer efficiency, quick turnaround, dynamic UI, 
superior text handling, nice DB and network connections.  It's also a superior glue language,
so when you do need to do a job that can be done better - well hell just call it!

OTOH, COBOL is great for, ah hell, let's see, oh yeah, there are lot of jobs in banks.
    <said with a snicker as I sit here in my hiking shorts and T shirt>
Ahm, oh yeah, there is a lot of it installed on crap inflexible, defunct hardware...

I considered myself lucky when I got away from DEC System 10/20 TOPS10 / COBOL to 
Fortran, then UNIX, then C in the CADCAM arena, but being a perl toolsmith on a 64
bit Alpha?  I couldn't imagine a better way to earn money sitting in front of a tube.
Thanks, Larry Wall et al.  Thank you very much.

W
-- 
"One World. One Web. One Program."
      -Microsoft promotional advertisement
"Ein Volk, ein Reich, ein Fuhrer!"
      -Adolf Hitler


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

Date: Fri, 18 Sep 1998 10:22:05 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Different way or not to use grep here?
Message-Id: <MPG.106c3696c57f6fb79897ad@nntp.hpl.hp.com>

[Posted to comp.lang.perl.misc and a copy mailed.]

In article <Pine.BSI.3.95.980918085324.9293A-100000@abalone.citytel.net> 
on Fri, 18 Sep 1998 09:20:44 -0700, kwoody@abalone.citytel.net 
<kwoody@abalone.citytel.net> says...
> Wrote a little perl program and was wondering if someone can point out
> how to not use grep here? I have a feeling that there must be another way
> or two that this could be done. Or possibly how use only one foreach
> here?
 ...
> #!/usr/local/bin/perl5 -w
> use diagnostics; 

It might take as long as one second of wall time to load 'diagnostics', 
which are not needed for a production program that doesn't produce 
warnings anyway.

> use vars qw($host $daemon);
> my $key = "USER";
> my $anon = "ANON";
> 
> open (FILE,"ftp.log") or die "ftp.log: $!\n";

Good for you! :-)

> @_ = <FILE>;
> close(FILE);
> 
> foreach (@_) {
>    $count++ if /$anon/;
> }
> print "Anonymous Accesses: $count\n";
> 
> @_ = grep(/$key/,@_);
> foreach (reverse @_) {
>     ($month, $day, $time, $host, $daemon, $key, $user) = split(/\s+/);
>     printf "%3s  %2d  %10s     %-10s   \n",$month, $day, $time, $user;
> } #end foreach loop

  foreach (reverse @_) {
     $count++ if /$anon/o; # This is the first loop.  I added 'o' because
                           # $anon seems to be constant.
      next unless /$key/;  # This is the 'grep'.  $key is not constant.
      ($month, $day, $time, $host, $daemon, $key, $user) = split(/\s+/);
      printf "%3s  %2d  %10s     %-10s   \n",$month, $day, $time, $user;
  } #end foreach loop


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


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

Date: Fri, 18 Sep 1998 11:53:00 -0600
From: "Ray Goniea" <rgoniea@pcisys.net>
Subject: file locking
Message-Id: <6tu66d$ppf$1@newman.pcisys.net>

Hello,

The program I am writing will be used for page replication on my site. The
users will fill out a form and certain information will be written to the
pages that the program creates, username, email address and so on. I have
been unable to find out whether or not this format of page creation needs to
be locked and if so how? Everything I have read so far only talks about
opening files then locking them once they are already created. I have flock
available to me on my server. This code will be repeated for each page I
want replicated.

open (IN, ">$path/index.shtml");
print IN "<html><head><title>testing></title></head><body>";
print IN "Testing";
print IN "\<\!--\#exec cgi\=\"/test/footer.cgi\"--\>";
print IN "end of testing";
print IN "</body>";
print IN "</html>";
close(IN);




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

Date: 18 Sep 1998 13:25:30 -0400
From: Uri Guttman <uri@camel.fastserv.com>
Subject: Re: How large is a scalar? and related declaration question. (clarification)
Message-Id: <sar1zp9gwok.fsf@camel.fastserv.com>

>>>>> "SM" == Sean McAfee <mcafee@waits.facilities.med.umich.edu> writes:

  SM> In article <36027AA1.3A48@DejahsPrivateIce.com>, Mary E Tyler
  SM> <dejah@DejahsPrivateIce.com> wrote:
  >> Mary E Tyler wrote:
  >>> how large is a scalar? (ie how big a number will it store?)

it depends on your system. it is the same as the underlying C compiler
will handle. typically these days it is 32 bits (4gig) for an integer
and 64 bits for a float. and yes i know about alphas and other 64 bit
systems. 

  >>> and that is a declaration... but there are just scalars and lists
  >>> in PERL and so i am confused as to how to declare anything...
  >> i *know* you don't *have* to declare anything. I *know* that is the
  >> *point* of having such loose typing. But i *have* seen references
  >> in the documentation to "declaring variables" and an indication
  >> that this is a *desirable* thing. Now either this means something
  >> different from what i think it means, or there is actually a way to
  >> declare variables. SOME ONE TELL ME WHAT IT IS!!! (pant pant pant)

  SM> You can declare variables like so:

  SM> use vars qw($foo @bar %baz);

  SM> This is primarily useful when you're using the "use strict"
  SM> compiler directive.  See "perldoc vars" and "perldoc strict".  I
  SM> personally have never found these features particularly useful.

you should use strict in all perl programs. it will save you butt
sometime when it needs to be saved.

perl does not require variable declarations but many have found that to
be a weak link so the 'use strict' was created so you could require
declarations. typo'ed var names were a common problem before this.
use strict requires all variables to be predeclared before use or to be
lexically scoped.

there are two ways do declare the vars, the global way and the private
way.

use vars qw( $foo ) will insert $foo into the symbol table so $foo can be used
later while using strict. if you are using packages/modules then a var
must be fully qualified with the package name to access it.

my( $foo ) declares a lexically scoped variable. this is private to the
file or block of code. it is never stored in the symbol table.

hth,

uri

-- 
Uri Guttman                             Speed up your web server with Fast CGI!
uri@fastengines.com                                  http://www.fastengines.com


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

Date: Fri, 18 Sep 1998 10:35:50 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: How large is a scalar? and related declaration question. (clarification)
Message-Id: <MPG.106c39ce8d6587499897ae@nntp.hpl.hp.com>

[Posted to comp.lang.perl.misc and a copy mailed.]

In article <6VvM1.3588$F7.13558361@news.itd.umich.edu> on Fri, 18 Sep 
1998 16:30:58 GMT, Sean McAfee <mcafee@waits.facilities.med.umich.edu> 
says...
 ...
> sub FooInt ($$);
> 
> You can also declare a sub without defining how its parameters look:
> 
> sub FooInt;
> 
> Either form allows you to call the sub in the "new style"; that is, without
> a "&" prefix.

You do not need either of these declarations to call a sub without a "&" 
prefix.  Just an argument list (even empty) will suffice.

In fact, the only time you need the "&" prefix when calling a sub (note -
- not when simply referring to it by name) is without an argument list, 
in which case it inherits the arguments of the subroutine in which the 
call occurs.  As described in 'perlsub':

To call subroutines: 

    NAME(LIST);    # & is optional with parentheses.
    NAME LIST;     # Parentheses optional if predeclared/imported.
    &NAME;         # Makes current @_ visible to called subroutine.

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


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

Date: 18 Sep 1998 10:33:34 -0500
From: Jim Woodgate <jdw@alder.dev.tivoli.com>
Subject: Re: how safe is xor encryption ?
Message-Id: <obsohpo2pd.fsf@alder.dev.tivoli.com>


Elaine -HappyFunBall- Ashton <eashton@bbnplanet.com> writes:
> break it. Purple was broken, XOR can be broken. Nothing is 100% secure.
> Nothing. With 98.5% of the numbers eliminated you can pretty much go

I don't have my "Applied Cryptography" book at work, but I believe
there is a mathematical proof that proves that XOR when done correctly
is 100% secure.  I can check the relevant sections for you when I get
home...

> about what was really going on..he thought he had a secure network....he
> used XOR. 

I would guess that you got the keys, without the keys you would be
unable to break XOR...

-- 
Jim Woodgate 
Tivoli Systems
E-Mail: jdw@dev.tivoli.com


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

Date: 18 Sep 1998 13:09:07 -0400
From: yuiop@abnormal.openface.ca (Neil Kandalgaonkar)
Subject: Re: How to "execute" a CGI (Perl) script inside a HTML page.
Message-Id: <6tu43j$rvc@abnormal.openface.ca>

In article <3601586A.9C187ED3@cisco.com>, Jian Zhang  <jian@cisco.com> wrote:
>Hi,
>
>I need to "execute" a short perl CGI script inside a HTML page
>automatically when a page is loaded.  


Why? It's usually easier to do traditional CGI, even if most of the script
just prints static HTML.

If embedding is what you're after, check out ePerl
<http://www.engelschall.com/sw/eperl/> or HTML::EmbPerl on the ol' CPAN.

I doubt that PerlScript does what you want -- that's for client-side
execution.

-- 
Neil Kandalgaonkar            yuiop communications
neil@yuiop.com


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

Date: Fri, 18 Sep 1998 13:51:02 -0500
From: Tom Turton <tturton@cowboys.anet-dfw.com>
Subject: Re: IGNORE: STDERR redirection X 2
Message-Id: <3602AB96.1967EC20@cowboys.anet-dfw.com>

Found a simple answer to my own question after rethinking it for about the
fifth time.

I am running my script as a cronjob, so set it up to now redirect STDOUT to
a "normal.log" file and STDERR (2>) redirected to "err.log".

Then in my script I can temporarily redirect STDERR to STDOUT using
      open(STDERR, ">&STDOUT");
Now any error messages get thrown in with STDOUT and go to "normal.log"

When I want STDERR to return to "err.log", I just put
      open(STDERR, ">-");
Now error messages return to being ported to "err.log"

Please excuse what may be wasted bandwidth; hopefully it will help some
other newbie.

---TT

Tom Turton wrote:

> I'm still struggling with this - basically want to start off with STDERR
> going to the screen normally.  Then at some point in my script, I want
> to redirect it to a file (no problem here), but then I want to switch it
> back to the screen.
>
> # Start with STDERR going to screen
>     (any warning/error msgs go to screen --- OK)
>
> # Switch STDERR to a file
>   open (STDERR, ">error.log");
>    (any warning/error msgs go to error.log --- works OK)
>
> # Now switch back to screen output of STDERR
>   open (STDERR, ">-");
>        (this is how I thought it was supposed to work, but msgs
>         still going to error.log -- HELP?)
>
> Any and all clues will be greatly appreciated!
>
> ---Tom Turton





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

Date: Fri, 18 Sep 1998 13:01:19 -0400 (EDT)
From: Mark-Jason Dominus <mjd@Op.Net>
Subject: Re: Interesting method technique: Default $self
Message-Id: <199809181701.NAA21029@monet.op.net>

In article <19980918133002.7916.qmail@plover.com>,
Mark-Jason Dominus  <mjd@plover.com> wrote:
>	{ my $the_db;
>	  sub the_db {

Andy Wardley send me a nice email in which he suggested that
`the_db()' should be called `instance', because that's what it
delivers:

	DB->instance

returns an instance of class DB. 

I agree that that's a better name.  Then the code that uses it will
look like this:

	$self = $self->instance unless ref $self;

Andy also directed my attention to his Class::Singleton which, as he
put it, is a similar concept, although it's done differently to
achieve a different goal.  Interested people might want to check it
out; if nothing else, it may have the highest documentation-code ratio
of any module you've seen.


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

Date: Fri, 18 Sep 1998 09:51:09 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Need help with a simple program (newbie).
Message-Id: <MPG.106c2f5d13de36bf9897ab@nntp.hpl.hp.com>

[Posted to comp.lang.perl.misc and a copy mailed.]

In article <35FEE14B.305BA1E@csufresno.edu> on Tue, 15 Sep 1998 14:51:07 
-0700, Vince <vmp12@csufresno.edu> says...
 .> Disclaimer: I'm a newbie.
 .> 
 ...
 .> if ($month == 1) {
 .>   $temp_month = $day;
 .> }
 .> if ($month == 2) {
 .>   $temp_month = 31 + $day;
 .> }
 .> if ($month == 3) {
 .>   $temp_month = 59 + $day;
 .> }
 .> if ($month == 4) {
 .>   $temp_month = 90 + $day;
 .> }
 .> if ($month == 5) {
 .>   $temp_month = 120 + $day;
 .> }
 .> if ($month == 6) {
 .>   $temp_month = 151 + $day;
 .> }
 .> if ($month == 7) {
 .>   $temp_month = 181 + $day;
 .> }
 .> if ($month == 8) {
 .>   $temp_month = 212 + $day;
 .> }
 .> if ($month == 9) {
 .>   $temp_month = 243 + $day;
 .> }
 .> if ($month == 10) {
 .>   $temp_month = 273 + $day;
 .> }
 . if ($month == 11) {
 .>   $temp_month = 304 + $day;
 .> }
 .> if ($month == 12) {
 .>   $temp_month = 334 + $day;
 .> }

Without commenting on the rest of lo, these many lines of code, I'll just 
say:  Real Programmers use arrays, among other things to avoid this 
hideous repetition.

$temp_month = (0, 31, 59, etc ...,  304, 334)[$day - 1];

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


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

Date: Fri, 18 Sep 1998 13:56:54 -0400
From: "Ed A." <necom@NO-SPAMnecom.com>
Subject: Re: O'Reilly CGI Programming book
Message-Id: <36029EE4.21FEA160@NO-SPAMnecom.com>



Tony Curtis wrote:

> Re: O'Reilly CGI Programming book, Ed
> <necom@NO-SPAMnecom.com> said:
>
> Ed> Does anyone have any tips on installing the "Sprite" SQL
> Ed> utility from this book? Sprite has almost no
> Ed> documentation. It says that:
>
> Ed> The example assumes you have copied Sprite.pm to
> Ed> /home/usr/lib. "
>
> Ed> Has anyone tried this? It doesn't seem to work on my
> Ed> system. (Linux with Apache server)
>
> And, erm, how about actually saying what doesn't work?
> Error messages?  Screen shots of output?  Sample code that
> demonstrates the problem?
>

ok,  I uploaded the following files to a subdirectory on my system I called
"phone":

db_phone.cgi
common.cgi
phone.db
phone_form.html
Sprite.pm

These are employee phone list  examples (page 227) from  chp 9 in the book,
downloaded from the O'Reilly site.
I set all permissions as they should be , for test purposes everything is set to
read, write,execute
for owner , group, world ,except the data file which is set to read,write.

After adding the changes from the very limited docs that came with the
application(There is a one paragraph mention of Sprite in the actual book), and
changing the path in the HTML form ,phone_form.html , I tried to submit a query
from the form and I keep getting a non-descript Internal Server Error Message.
Since I made no changes to the CGI code , other than the inclusion of the line for
the Sprite routine ,and the permissions are set correctly, I would think there is
a problem with this addition for Sprite. Unless the demo scripts were not tested
by the author and they have problems. Again, the instruction to add Sprite were:


"If you _dont_ have access to the Perl library, then you can simply
copy the file Sprite.pm from the distribution to any directory
you choose and then add the following to the top of your script.

 #!/usr/local/bin/perl5

        use lib '/home/user/lib';

 use Sprite;

The example assumes you have copied Sprite.pm to /home/usr/lib. "

The Perl interpreter path on my system is " #!/usr/bin/perl " , so this was
changed,(this server does use the latest version of Perl) and my home directory is
home/necom, so I thought the line " use lib '/home/user/lib'; " should be changed
to  " use lib '/home/necom/phone'; "
I don't usually have trouble installing demos like this, but this Sprite stuff is
new to me.

Thanks for your help.

Ed Arszyla
New England Computer Technologies, LLC



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

Date: Fri, 18 Sep 1998 17:43:55 GMT
From: patrick@cre8tivegroup.com
Subject: Re: Parallel User Agent (was: What's the meaning of the error message?)
Message-Id: <6tu64r$65n$1@nnrp1.dejanews.com>

In article <6tnhuo$tos$1@nnrp1.dejanews.com>,
  hup@addall.com wrote:
> Hi,
>   I get a error message in my Parallel User Agent module program:
>
> Database handle destroyed without explicit disconnect at
> /usr/lib/perl5/site_perl/LWP/Parallel/Protocol.pm line 218.
>
>   I just don't understand does PUA do anything with database?
>   and why does database handle do anything with PUA?
>
>   I have Linux, 5.004_04, LWP::Parallel_2.36, MySQL DBI.
>   Any idea how to fix it?

Nope.  Never had that error...

>   In my program, I find my parallel searching result are very unreliable,
>   use the same code, same configuaration(hardware,url and network) search for
>   several time, it give me quite a lot of different result. Does anybody
>   have the same experience? or just the way I am writing is buggy?

What kind of results are you getting?

>   I did study http://www.stonehenge.com/merlyn/WebTechniques/col27.html,
>   (where I find a bug, either the example or PUA, PUA sometime
>   return 0 byte at the first return. We can't merely rely on
>   length($return_data)==0 as exit condition :( )
>   I don't think I could find any other better example. Does anybody can
>   give me other URL for the example? Either PUA or PWGng are welcome :)

This example works well with the following added to the callback_for_parse
routine (right before "parse_content_for_response($response);" line):

# BEGINNING OF MY "SECOND CHANCE" CODE
unless (length $content || length $response->content) {
# print "PARSE: zero length content and response content - One more try.\n";
	return 1;
}
# END OF MY CODE

Why it would return zero length data is beyond me!  Be careful with using
this, because one site I searched continually returned zero length stuff, so
my system went into a loop and eventually runs out of memory (takes about 20
minutes on my 786Meg of RAM system)

-Patrick

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

Date: Fri, 18 Sep 1998 10:02:50 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: passing argument !!!!
Message-Id: <MPG.106c3216f54be1989897ac@nntp.hpl.hp.com>

[Posted to comp.lang.perl.misc and a copy mailed.]

In article <6ttrl5$qbq$1@nnrp1.dejanews.com> on Fri, 18 Sep 1998 14:44:53 
GMT, dave@mag-sol.com <dave@mag-sol.com> says...
> In article <360253EC.9175A8E2@america.net>,
>   Garry Williams <garry@america.net> wrote:
 ...
> >     system("browser_crno.ksh '$DATE' > $DOCS_DIR/$out_put");
> 
> I think you'll need
> 
>     system("browser_crno.ksh \'$DATE\' > $DOCS_DIR/$out_put");
> 
> otherwise the variable $DATE won't get interpolated. Might be even better
> to use the generic quoting operators.
> 
>     system(qq[browser_crno.ksh "$DATE" > $DOCS_DIR/$out_put]);

Not at all.  The function of the single quotes is to bind the value of 
$DATE into a single argument for the shell and to prevent further 
evaluation.  As far as the double-quoted argument for 'system' is 
concerned, they are just characters in the string, and don't affect the 
interpolation of $DATE at all.

People really should test their assertions, instead of just posting: "I 
think you'll need...".

#!/usr/local/bin/perl -w
use strict;

my $foo = 'bar';
print "'$foo'\n";
__END__

is all it takes!

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


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

Date: Fri, 18 Sep 1998 22:18:06 +0100
From: "Michael Yevdokimov" <flanker@sonnet.ru>
Subject: Perl-scrit for converting ftn *.PKT into *.HTML
Message-Id: <6tu7ob$8c8$1@bison.rosnet.ru>

Does anyone know Perl-scrit for converting ftn *.PKT into *.HTML and where
to download?

--
Yours sincerely,


Michael Yevdokimov (flanker@sonnet.ru)
----------------------------------------------------------------------
The Basic Network
(Developers Support Site)
http://www.basicnet.sonnet.ru
quests@basicnet.sonnet.ru
----------------------------------------------------------------------




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

Date: Fri, 18 Sep 1998 20:16:56 +0200
From: "Josef Seknicka" <josef.seknicka@aut.alcatel.at>
Subject: Re: Q:ActiveState's win32release missing makemaker - help me
Message-Id: <6tu82p$sot$1@atusks02.aut.alcatel.at>

I tried to get the DBI module from the Location, but it seem to me,
that you have to buy the package Perl Resource Kit -- Win32 Edition
for downloading this Module, is this correct.

For installation of the DBI-Module I downloaded DBI-1_00.tar from
http://www.hermetica.com/technologia/DBI/
extracted it anywhere -
After Calling VCVARS32 of my Visual C++ 6.0 Compiler
I used Perl Makefile.pl
Then you have to edit Makefile because the
LOADLIBS = Definition has PerlCRT.lib as last entry which should be
changed to $(LIBC).
after this you can Run nmake ; nmake test ; and nmake install which
seems to work

I hope, this solution works also fine for you, and I would be glad
for hearing a solution wit DBD::ODBC or DBD:Oracle where
i have the Problem that it could not be linked for several undefined
references.






    link -out:blib\arch\auto\DBD\Oracle\Oracle.dll -dll -nologo -nodefaultli
b -release -machine:x86 Oracle.obj  dbdimp.obj
C:\Perl\5.00502\lib\MSWin32-x86
-object\CORE\perlCAPI.lib D:\ORANT\OCI73\LIB\MSVC\OCIW32.lib -def:Oracle.def
   Creating library blib\arch\auto\DBD\Oracle\Oracle.lib and object
blib\arch\au
to\DBD\Oracle\Oracle.exp
Oracle.obj : error LNK2001: unresolved external symbol __imp__atoi
dbdimp.obj : error LNK2001: unresolved external symbol __imp__atoi
Oracle.obj : error LNK2001: unresolved external symbol __fltused
dbdimp.obj : error LNK2001: unresolved external symbol __fltused
perlCAPI.lib(perlCAPI.obj) : error LNK2001: unresolved external symbol
__fltused

Oracle.obj : error LNK2001: unresolved external symbol _strcmp
dbdimp.obj : error LNK2001: unresolved external symbol _strcmp
dbdimp.obj : error LNK2001: unresolved external symbol _memset
dbdimp.obj : error LNK2001: unresolved external symbol __imp__sprintf
dbdimp.obj : error LNK2001: unresolved external symbol _strlen
perlCAPI.lib(perlCAPI.obj) : error LNK2001: unresolved external symbol
_strlen
dbdimp.obj : error LNK2001: unresolved external symbol _strcpy
perlCAPI.lib(perlCAPI.obj) : error LNK2001: unresolved external symbol
_strcpy
LINK : error LNK2001: unresolved external symbol __DllMainCRTStartup@12
perlCAPI.lib(perlCAPI.obj) : error LNK2001: unresolved external symbol
__imp__In
itializeCriticalSection@4
perlCAPI.lib(perlCAPI.obj) : error LNK2001: unresolved external symbol
_atexit
perlCAPI.lib(perlCAPI.obj) : error LNK2001: unresolved external symbol
__imp__De
leteCriticalSection@4
perlCAPI.lib(perlCAPI.obj) : error LNK2001: unresolved external symbol
__imp__st
rerror
perlCAPI.lib(perlCAPI.obj) : error LNK2001: unresolved external symbol
__imp__pe
rror
blib\arch\auto\DBD\Oracle\Oracle.dll : fatal error LNK1120: 13 unresolved
extern
als
NMAKE : fatal error U1077: 'link' : return code '0x460'
Stop.

With kind regards

Josef Seknicka
e-mail: josef.seknicka@aut.alcatel.at


Guenther Pewny wrote in message <6tshvr$86q$1@goof.de.uu.net>...
>Which AS Perl version do you have?
>I have Build 502 = 5.005_02, and it HAS a makemaker.
>
>But I think even with this version DBI/DBD::Oracle will not compile,
>because AS Perl's C API (XS file conventions) differ from standard Perl.
>
>I downloaded the compiled versions of
>    DBI
>    DBD::Oracle
>    DBD::ODBC
>directly from www.activestate.com using their ppm.pl module installer.
>
>They seem to work, but if you use DBD::Oracle from within a CGI script
>using CGI.pm, CGI output on <STDOUT> stops at the moment you
>call $sth->prepare(...) the first time.
>
>So I tried to DBD::ODBC with an Oracle ODBC driver, and the same
>script worked correctly.
>
>So my tip:
>AS Perl 502 + DBI/DBD::ODBC using ppm.pl for installation
>directly from the ActiveState archive.
>
>Hope that helps
>
>G|nther Pewny
>
>Kurt Lange schrieb in Nachricht <3601bba1.0@nt.dave-world.net>...
>>I am trying to build the DBI and DBD::Oralce Modules for Perl for Win32.
I
>>get an error right off the bat, indicating that I am missing makemaker.
>>This is true, it is missing.  Has anyone ever successfully built the
>modules
>>on NT4.0, or least the DBI module.  I am either looking for the already
>>built modules, or I am looking for a solution to the missing makemaker.  I
>>have seen previous build that contain the makemaker, and connot figure out
>>why this particular build did not have it.
>>
>>Please respond to one of these news groups(for other people with the same
>>problem).  And please respond to the following email address for my work
>and
>>home
>>dmackin@gte.net AND milkman@dave-world.net
>>
>>You help is deeply appreciated.
>>
>>Kurt Lange
>>Internet Programmer
>>
>>
>>
>>
>>
>
>




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

Date: Fri, 18 Sep 1998 18:17:54 GMT
From: "R. Arab" <rarab@sympatico.ca>
Subject: Question on using Net::SSLeay::get_https
Message-Id: <3602A2D7.EE12916A@sympatico.ca>

I am trying to execute a get_https request on a remote server that
requires a User ID and Password. From a Web Browser I can execute as
follows:

https://userid:password@www.domain.com/cgi-bin/script.cgi/a=abc&b=xyz

My question is how can I pass a Used ID and Password to get_https
function call?

($page, $response, %reply_headers) 
      = &Net::SSLeay::get_https('www.domain.com',  
                  443,  
                  '/cgi-bin/script.cgi',  
                  '',     
                  &Net::SSLeay::make_form( 
                        'a'   => 'abc', 
                        'b'   => 'xyz',
                  ));

Please let me know as soon as you can. I would really appreciate it.

Thank you.

Ryan


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

Date: Fri, 18 Sep 1998 13:04:12 -0500
From: Tom Turton <tturton@cowboys.anet-dfw.com>
Subject: STDERR redirection X 2 ??
Message-Id: <3602A09C.649118BA@cowboys.anet-dfw.com>

I'm still struggling with this - basically want to start off with STDERR
going to the screen normally.  Then at some point in my script, I want
to redirect it to a file (no problem here), but then I want to switch it
back to the screen.

# Start with STDERR going to screen
    (any warning/error msgs go to screen --- OK)

# Switch STDERR to a file
  open (STDERR, ">error.log");
   (any warning/error msgs go to error.log --- works OK)

# Now switch back to screen output of STDERR
  open (STDERR, ">-");
       (this is how I thought it was supposed to work, but msgs
        still going to error.log -- HELP?)

Any and all clues will be greatly appreciated!

---Tom Turton




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

Date: 18 Sep 1998 17:26:09 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: two dimensional hashes
Message-Id: <6tu53h$ghl$1@client3.news.psi.net>

Xavier Cousin (cousin@ensam.inra.fr) wrote on MDCCCXLIV September
MCMXCIII in <URL: news:3602793B.7CA8@ensam.inra.fr>:
++ Hello, I would like create (and search) a two dimensional hash


One reads the manual. perlref, perldsc & perllol.



Abigail
-- 
perl -we 'print split /(?=(.*))/s => "Just another Perl Hacker\n";'


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

Date: 18 Sep 1998 17:28:11 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: User inputted regexp.
Message-Id: <6tu57b$ghl$2@client3.news.psi.net>

Michael Bowler (mkbowler@nortel.com) wrote on MDCCCXLIV September
MCMXCIII in <URL: news:36026D73.4F19B19E@nortel.com>:
++ How can I verify a regular expression given by the user for validity?


perldoc -f eval.



Abigail
-- 
perl -wle 'print "Prime" if ("m" x shift) !~ m m^\m?$|^(\m\m+?)\1+$mm'


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

Date: Fri, 18 Sep 1998 18:48:22 GMT
From: aaronp@removeme-shore.net
Subject: Win32p: Cleaning up after yourself
Message-Id: <WVxM1.208$_c5.1724862@news.shore.net>

 I have a perl script that creates gif files as output. I can't for the
life of me get it to delete the files when done because IIS won't let go
of its lock/share. Right now I set it up to delete the file from the
*last* session when it is run, which helps some. But there are times when
multiple people are using it when the sharing still prevents it from
properly cleaning up. Has anyone run into a solution for this? A way to
force nt to delete/unlink in perl?

(I know I shouldnt be using nt but for this app I am forced to,
otherwise I'd run far away!)

Aaron Price, 011011011 
www.aavso.org
Systems Manager, American Association of Variable Star Observers



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

Date: 12 Jul 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 Mar 98)
Message-Id: <null>


Administrivia:

Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.

If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu. 


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

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