[16393] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3805 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Jul 26 06:06:25 2000

Date: Wed, 26 Jul 2000 03:05:17 -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: <964605917-v9-i3805@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Wed, 26 Jul 2000     Volume: 9 Number: 3805

Today's topics:
        [Q] Detailed list of changes in Perl sources (Denis Barbier)
    Re: Advanced Perl Programming -- Dated? <uri@sysarch.com>
    Re: Advanced Perl Programming -- Dated? (Eric Bohlman)
    Re: Advanced Perl Programming -- Dated? <bill.kemp@wire2.com>
    Re: Advanced Perl Programming -- Dated? <nospam@nospam.com>
    Re: Any free Perl-Friendly hosts? drdementor@my-deja.com
        autoresponder with customised message drdementor@my-deja.com
    Re: config httpd.conf to run perl script <sroske@home.com>
    Re: config httpd.conf to run perl script (Tim Hammerquist)
    Re: cookie and redirect trouble... (brian d foy)
    Re: file uploading with PerlScript/ASP <eng_faisal@hotmail.com>
        HELPME: Cookies for Client. <sivix@libero.it>
    Re: how do you ? question <nospam@nospam.com>
        How to print the thousands comma for financial numbers  <louis.banens@xs4all.nl>
    Re: How to print the thousands comma for financial numb (Eric Bohlman)
        IIS ELF to CLF <joey@cpwebmedia.com>
    Re: IIS ELF to CLF (Bernard El-Hagin)
    Re: IIS ELF to CLF <Peter.Dintelmann@dresdner-bank.com>
    Re: Include a source in another one gvoc@my-deja.com
        Install <jheide@sprint.ca>
    Re: Looking for an online store script. <jaurangNOjaSPAM@crosswinds.net.invalid>
    Re: Multiple Return Streams from CGI process (Neil Kandalgaonkar)
    Re: No Data from Database <Peter.Dintelmann@dresdner-bank.com>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: 26 Jul 2000 08:05:05 GMT
From: barbier@imacs.polytechnique.fr (Denis Barbier)
Subject: [Q] Detailed list of changes in Perl sources
Message-Id: <slrn8nt6v2.35u.barbier@imacs.polytechnique.fr>

Hi,

is there somewhere a detailed list of changes in Perl sources?
Because i am embedding Perl in C, and i want to be aware of all versions
above 5.003.
For instance, perl_init_i18nl14n has been replaced by perl_init_i18nl10n
which is no more required in Perl 5.6.0 because it has been incorporated
into perl_construct.
So a solution is to check Perl version and put some #if's. I would
prefer checking symbols rather than Perl version, but i do not know how.
Another problem is with thread support, i can't find detailed
description on how to write portable (amongst Perl versions) prototypes
and function calls (e.g. for boot_DynaLoader).

Thanks for any pointer.

Denis


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

Date: Wed, 26 Jul 2000 05:14:59 GMT
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Advanced Perl Programming -- Dated?
Message-Id: <x74s5d8obx.fsf@home.sysarch.com>

>>>>> "TW" == The WebDragon <nospam@nospam.com> writes:

  TW> Do you have any books you currently recommend aside from Programming 
  TW> Perl which I already have? 

  TW> I'm already thinking about possibly getting one on SQL just to wrap my 
  TW> brain around database stuff, but I'm wondering if there are any decent 
  TW> intermediate-advanced topic books out there that are worth owning (and 
  TW> spending money on since that's a scarce resource at the moment :)

i can't recommend any sql books as i don't know them well. my sql
knowledge is enough to get me in trouble and do a few projects with dbi.

get effective perl programming. i call it idiomatic perl. it has many
style and technique points which are not always obvious.

perl cookbook is good for basic ways to do more complex things like
sockets, I/O, data structures, etc. lots of code examples and
recipes. almost more a browsing book than a read it all book. use its
index and TOC to see if it has stuff you need.

mastering regular expressions is a must even if it is somewhat
dated. the recent good news i heard is friedl has agreed to work on a
new edition.

object oriented perl is a must if you do any OO stuff. it is extremely
well written and you will learn much from it. it is for intermediate to
advanced hackers. 

if you do apache/mod_perl then the writing apache modules with perl and
c is a great book to have. well written and in depth.

advanced perl programming is also a bit dated and i find some of its
topics not covered as well as they could be. but no other book even covers
some of them like perl guts, typeglobs, etc. stephen beyer in this
thread likes it more than i do. i used to like it but not as much as
before.

i just got a camel 3 and haven't had a chance to read (or even browse)
it. i hear very good things but i won't say anything until i look at it
in depth.

that set will give you an execellent perl library. if you read them all
cover to cover, you will increase your perl skills by a large
amount. they also make a good reference library.

skip any book that has any of these words in the title:

	perl5 		(it should be just perl)
	complete	(as if)
	dummies		(written by)
	<dates/time>	(except teach yourself perl in 24 hours. it is good)

of course, you HAVE read the perl FAQ end to end? you will be surprised
how much you will learn by doing that.

there are many more tutorial docs in 5.005/5.6 which are worth
reading. perlopentut is a good example that is not read by enough
people. you may use open but this shows you how to master it.

some of the web sites like perlarchive.com, perlmonks.com, perlmonth.com
have useful articles. an old hash slice tutorial of mine is now on
perlarchive.

uri

-- 
Uri Guttman  ---------  uri@sysarch.com  ----------  http://www.sysarch.com
SYStems ARCHitecture, Software Engineering, Perl, Internet, UNIX Consulting
The Perl Books Page  -----------  http://www.sysarch.com/cgi-bin/perl_books
The Best Search Engine on the Net  ----------  http://www.northernlight.com


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

Date: 26 Jul 2000 07:46:57 GMT
From: ebohlman@netcom.com (Eric Bohlman)
Subject: Re: Advanced Perl Programming -- Dated?
Message-Id: <8lm51h$i9m$1@slb2.atl.mindspring.net>

Hugh Lawson (hlawson@triad.rr.com) wrote:
: What about Ch. 14, "User Interfaces with Tk", and Appendix A, "Tk Widget
: Reference"?
: 
: I wrote a beginner program that quizzes me on new French words I have to
: look up while reading.  I've never written any kind of graphic interface,
: but I'd like to try setting up one for this program, mainly as a learning
: exercise.  Is this chapter satisfactory for a beginner's use, or should I
: look elsewhere for an introduction?

Go to O'Reilly's site and make note of the errata for Ch. 14 first.  
There are a number of typos that will prevent much of the code there from 
running unless they're corrected.



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

Date: Wed, 26 Jul 2000 09:30:43 +0100
From: "W Kemp" <bill.kemp@wire2.com>
Subject: Re: Advanced Perl Programming -- Dated?
Message-Id: <964600400.24130.0.nnrp-14.c3ad6973@news.demon.co.uk>

>object oriented perl is a must if you do any OO stuff. it is extremely
>well written and you will learn much from it. it is for intermediate to
>advanced hackers.


Is this the one with the bloke in a pre- 18th century costume on the Front
and by Damian Conway?

>
>if you do apache/mod_perl then the writing apache modules with perl and
>c is a great book to have. well written and in depth.


This does have a little SQL stuff in it too, including command line MySQL
stuff.

>skip any book that has any of these words in the title:
>
> perl5 (it should be just perl)
> complete (as if)
> dummies (written by)
> <dates/time> (except teach yourself perl in 24 hours. it is good)


In risk of getting the wrath of the greeat blow torch.  Have you found a
review of the Laura Lemay book yet?




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

Date: 26 Jul 2000 08:38:27 GMT
From: The WebDragon <nospam@nospam.com>
Subject: Re: Advanced Perl Programming -- Dated?
Message-Id: <8lm823$iam$0@216.155.32.193>

In article <x74s5d8obx.fsf@home.sysarch.com>, Uri Guttman 
<uri@sysarch.com> wrote:

 | i can't recommend any sql books as i don't know them well. my sql
 | knowledge is enough to get me in trouble and do a few projects with dbi.

heh ... I THINK I might be able to figure out how to accidentally delete 
all the information in the database. *eyerolls* .. but that's why I want 
to learn. (well that and I can charge money)
 
 | get effective perl programming. i call it idiomatic perl. it has many
 | style and technique points which are not always obvious.

sounds like useful information, plus I'm a sucker for tricky stuff :) 
 
 | perl cookbook is good for basic ways to do more complex things like
 | sockets, I/O, data structures, etc. lots of code examples and
 | recipes. almost more a browsing book than a read it all book. use its
 | index and TOC to see if it has stuff you need.
 | 
 | mastering regular expressions is a must even if it is somewhat
 | dated. the recent good news i heard is friedl has agreed to work on a
 | new edition.

THAT is good news indeed. I've been hesitant to purchase this one, as 
much as I knew I needed it, simply for that reason. I sincerely hope 
that friedl can get some of the hardcore regex folks working with him to 
help speed the process and get it to print sooner. 
 
 | object oriented perl is a must if you do any OO stuff. it is extremely
 | well written and you will learn much from it. it is for intermediate to
 | advanced hackers. 

I had a nod on this one from some other folks too via e-mail; sounds 
like a winner to me. *shuffling this one to the top of the purchase list*

 | if you do apache/mod_perl then the writing apache modules with perl and
 | c is a great book to have. well written and in depth.
 | 
 | advanced perl programming is also a bit dated and i find some of its 
 | topics not covered as well as they could be. but no other book even 
 | covers some of them like perl guts, typeglobs, etc. stephen beyer in 
 | this thread likes it more than i do. i used to like it but not as 
 | much as before.

yeah I noted some of your comments on it earlier. Hopefully O'Reilly 
will see the light and have this one upgraded to more modern concepts as 
well. if not, there's always the library, as I can't see spending money 
on it at this point, much as it was good for its time. 
 
 | i just got a camel 3 and haven't had a chance to read (or even browse)
 | it. i hear very good things but i won't say anything until i look at it
 | in depth.

Yeah I have the 2nd edition myself.. let me know about this one, after 
you've had a chance to pore through it.. I'm curious about the changes. 
Particularly since this, and MacPerl Power and Ease by Vicki Brown and 
Chris Nandor are the only two dead tree editions I have currently. 

the faq files and c.l.p.m have easily been my greatest resource though. 
Hands down. :)

 | that set will give you an execellent perl library. if you read them all
 | cover to cover, you will increase your perl skills by a large
 | amount. they also make a good reference library.
 | 
 | skip any book that has any of these words in the title:
 | 
 | 	perl5 		(it should be just perl)
(ok)
 | 	complete	(as if)
 | 	dummies		(written by)
(LMAO)
 | 	<dates/time>	(except teach yourself perl in 24 hours. it is good)
 | 
 | of course, you HAVE read the perl FAQ end to end? you will be surprised
 | how much you will learn by doing that.

I'm constantly mucking around in the docs that came with MacPerl.. tons 
of great info.. also all the pod documentation in any of the modules 
I've fiddled with have been fair to good (to great! like CGI.pm) sources 
of info (though *some* of them REALLY leave me wanting for more USEFUL 
examples. :) 

HTML::Parse for one (see my earlier thread for the troubles I was having 
with it.)

 | there are many more tutorial docs in 5.005/5.6 which are worth
 | reading. perlopentut is a good example that is not read by enough
 | people. you may use open but this shows you how to master it.

yeah.. hopefully I'll either see 5.004-based MacPerl get an upgrade 
soon, or get my hands on a final release of MacOS X so I can play with 
Perl natively for a change. :D 

 | some of the web sites like perlarchive.com, perlmonks.com, perlmonth.com
 | have useful articles. an old hash slice tutorial of mine is now on
 | perlarchive.

great tutorial that .. I saved it locally so I could browse it at 
leisure. 

Also saving this article as reference material when I go shopping again. 
<grin> Thanks a bunch!

Scott

-- 
send mail to mactech (at) webdragon (dot) net instead of the above address. 
this is to prevent spamming. e-mail reply-to's have been altered 
to prevent scan software from extracting my address for the purpose 
of spamming me, which I hate with a passion bordering on obsession.  


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

Date: Wed, 26 Jul 2000 04:48:25 GMT
From: drdementor@my-deja.com
Subject: Re: Any free Perl-Friendly hosts?
Message-Id: <8llqip$ro0$1@nnrp1.deja.com>

In article <0245003e.cdac6b14@usw-ex0105-037.remarq.com>,
  shadeejake <shadeejake1NOshSPAM@aol.com.invalid> wrote:
> I'm a beginning web designer and I have a rather large site in
> the works.  But, i've searched far and near to find a free host
> that is Perl-friendly.. anyone have any suggestions or know
> where to point me?  I'm under financial restaints (aka I don't
> get paid enough at my present job) to serve my own site at
> home.  I just need some place for the meantime.
>
> Thanks in advance,
>                         Jake
>  ShadeeJake1@aol.com
>
> -----------------------------------------------------------
>
> Got questions?  Get answers over the phone at Keen.com.
> Up to 100 minutes free!
> http://www.keen.com
>
>

freewebspace.net tis a great site, do the advanced search

if your site is comercial try hypermart.com thye have free domain
parking too

virtualave and thie other one called 9 comething,, they su   cked

hypermart changes yoru metatag on the fly so the discription of the
site is hypermart propaganda


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


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

Date: Wed, 26 Jul 2000 04:07:08 GMT
From: drdementor@my-deja.com
Subject: autoresponder with customised message
Message-Id: <8llo5b$q4m$1@nnrp1.deja.com>

I want to make an auto responder in perl.

I know how to send mail but i dont know how to rexieve it.

I know I will need a domain name. What kind of server support do i need?
What is the code for this? will it just go into a bin and the perl code
reads it like a file almost?

I need somewhere to start.

If someone sends an email to the autoresponding address i would like to
do something like,,, take the info from the email sent then manipulate
it and send it back to them..

I am not familiar with mail proticals i know that there are 2 main ones
and a total of maybe 4.

I need suggestions of a webserver to use, what do i need?
I know i need perl cgi capabilitiess but im talking mainly email wise...



thanks in advance


Jim


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


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

Date: Wed, 26 Jul 2000 04:12:15 GMT
From: "Shawn Roske" <sroske@home.com>
Subject: Re: config httpd.conf to run perl script
Message-Id: <zytf5.80468$dF.2923329@news1.rdc1.il.home.com>

If you have perl installed, then it is already configured! You simply need
to take your perl script, place it in the "cgi-bin" directory (if memory
serves, Redhat puts it in /home/httpd/cgi-bin) and chmod it executable
(chmod u+x <filename>). Even a custom apache build configures the cgi-bin
"out-of-box"

Good Luck!

"Chu" <chus@netvigator.com> wrote in message
news:8lkeeb$66l4@imsp212.netvigator.com...
> Dear Perl Specialist,
>
>     I have just install Red Hat, which has a apache server.
>
>     How to configure the httpd.conf to run the Perl script?
>
> Eddie Chu
> chus@netvigator.com
>
>




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

Date: Wed, 26 Jul 2000 04:53:01 GMT
From: tim@degree.ath.cx (Tim Hammerquist)
Subject: Re: config httpd.conf to run perl script
Message-Id: <slrn8nss6i.3o4.tim@degree.ath.cx>

On Wed, 26 Jul 2000 04:12:15 GMT, Shawn Roske <sroske@home.com> wrote:
>If you have perl installed, then it is already configured! You simply need
>to take your perl script, place it in the "cgi-bin" directory (if memory
>serves, Redhat puts it in /home/httpd/cgi-bin) and chmod it executable
>(chmod u+x <filename>). Even a custom apache build configures the cgi-bin
>"out-of-box"

 ...only works if the owner of said script is that same as the owner of
the httpd child processes; in my case, 'nobody'. The symbolic setting
'a+x' or just the absolute '755' might be preferable.

But I digress. This isn't even perl-specific.

-- 
-Tim Hammerquist <timmy@cpan.org>

Emacs is a nice OS - but it lacks a good text editor.
That's why I am using Vim.  --Anonymous


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

Date: Wed, 26 Jul 2000 00:35:07 -0400
From: brian@smithrenaud.com (brian d foy)
Subject: Re: cookie and redirect trouble...
Message-Id: <brian-ya02408000R2607000035070001@news.panix.com>

In article <Pine.GHP.4.21.0007252348370.26198-100000@hpplus03.cern.ch>, "Alan J. Flavell" <flavell@mail.cern.ch> posted:


> 2. Apparently, you have to treat all scripts for IIS as
> no-parsed-headers scripts.  Again, CGI.pm can take care of the
> details.

CGI.pm *will* take care of the details.  if the server is IIS,
CGI.pm acts as if it's a nph script by setting the nph flag.

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


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

Date: Wed, 26 Jul 2000 09:30:03 GMT
From: <eng_faisal@hotmail.com>
Subject: Re: file uploading with PerlScript/ASP
Message-Id: <sntbsrpg3j1143@corp.supernews.com>

Use the following tag in your HTML file
<input type=file name=upfile>
Now, handle this input as any other type of form input field, i.e. copy the
value of this field, which is your file, to the approperiate location on
your web server. I guess you will be facing the same problem that I am
facing right now, I can not force the upload operation to stop if the file
size is greater than a certain size. Please reply to me if you found any
solution to this problem.
Alex T. wrote:
> 
> Hi,
> 
> I need to be able to upload a file from the user's computer to the
> server.
> When a user logs in into the web-site, he is presented with a web form
> where he has to enter some information, such as name, e-mail, etc.. and
> also specify the file that he wants to have uploaded to the server.
> After he hits submit I need to upload the specified file. I'm using
> PerlScript for ASP.
> 
> Could anyone give me any ideas how to do this, or point to some places
> where I can find more information about this.
> 
> Thank you in advance!
> 
> Alex
> 


--
Posted via CNET Help.com
http://www.help.com/


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

Date: Wed, 26 Jul 2000 09:49:13 +0200
From: "Sivix" <sivix@libero.it>
Subject: HELPME: Cookies for Client.
Message-Id: <8lm57f$3s7$1@nntp.weblinea.it>

Hello,
This is my first post.
I'm trying to do a script in perl for UNIX to get a web pages from a server
that use the Cookies to Login.
I have done a script to get the response from the webserver and catch the
Cookies, now my (...little...) problem is to use the redirection and the
Cookies to retrive the final HTML page from the Server.
this is My little script n perl used to get and save the cookies:

----------------------------------------------------------------------------
-------------------------------
use HTTP::Cookies;
require LWP::UserAgent;
$cookie_jar = HTTP::Cookies->new (
                                   File => "/tmp/cookies",
                                   autosave => TRUE,
                                   ignore_discard => FALSE
                                   );
$ua = LWP::UserAgent->new;
$request =
HTTP::Request->new('GET','http://XXX.XXX.XXX/Livelink/livelink.exe?func=ll.l
ogin&NextURL=%2FLivelink%2Flivelink%2Eexe&Username=guest&Password=guest');

$response = $ua->request($request);
$cookie_jar->add_cookie_header($request);
if ($response->is_success) {
   $cookie_jar->extract_cookies($response);
   $cookie_jar->save();
   print $response->headers_as_string;
   print $response->content;

  } else
  {
     print $response->error_as_HTML;
    }
----------------------------------------------------------------------------
----------------------------------------------------


This is the Output:

----------------------------------------------------------------------------
-------------------------------------------------------------
Date: Wed, 26 Jul 2000 07:46:09 GMT
Server: Microsoft-IIS/4.0
Content-Type: text/html
Client-Date: Wed, 26 Jul 2000 07:46:22 GMT
Client-Peer: 151.92.249.132:80
Refresh: 0; URL=/Livelink/livelink.exe
Set-Cookie: LLInProgress=%2FE1MT4pMj4iNTE%2BIjI4Nz8vIA; path=/Livelink/
Set-Cookie: LLCookie=%2FE1MT4pMj4iNTE%2BIjI4NzxHTUAwPydldWN0fydldWN0cA;
path=/Livelink/
Set-Cookie: LLTZCookie=0; path=/Livelink/
Title: Livelink - Redirection
<HTML>
<!-- File: redirectmeta.html -->
<HEAD>
<TITLE>Livelink - Redirection</TITLE>
<META HTTP-EQUIV="Refresh" CONTENT="0; URL=/Livelink/livelink.exe">
</HEAD>
</HTML>
----------------------------------------------------------------------------
---------------------------------------------------------------

Now what is the simplest  method to send back cookies to the webserver and
get the web pages?
I haven't found some example on How to use the POST method.... I am a
beginner, please Help me.


Thanks,

Andrea.




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

Date: 26 Jul 2000 09:10:34 GMT
From: The WebDragon <nospam@nospam.com>
Subject: Re: how do you ? question
Message-Id: <8lm9ua$klo$0@216.155.32.193>

In article <8g2snscjl8veppgaguo6iumdiksnpgla9m@4ax.com>, Chris 
<exit72@excite.com> wrote:

 | Thanks to all those who responded with something useful. 
 | 
 | The answer to your question , I've been watching this group for a long
 | long time and I'm disgusted with the garbage replies from people that
 | have no intention of helping. Instead of someone posting a plain
 | answer to a question or an example they would rather go off and
 | explain in detail why they know the answer but aren't willing to share
 | it , but oh here is a link to the manual that will explain. Morons
 | like that miss the point , we've already been through the doc pages
 | with no luck if you see a post here.

I completely disagree.. some people (such as myself) simply don't know 
WHERE to look in some cases.. and being pointed there first, so I can 
formulate a BETTER question, is in my estimation AND experience, a good 
thing. 

it's how I learned to work properly with dereferencing complex hashes 
and anonymous arrays/hashes . 

Don't expect people to write your code for you when you haven't put 
forth a minimal effort and it shows.. some people DO get paid to program 
perl and don't offer their services for free. 

People here WILL help you to make corrections and/or improvements to 
your code, provided you can be clear and concise about what the problem 
is. Evidence to the contrary (i.e. when it's obvious you need to find a 
clue first) get you pointed to the right place. perldoc. 

The terseness of the replies is self-explanatory -- all the necessary 
explaining HAS ALREADY BEEN DONE IN THE DOCS in that case. (usually) .. 
then you can come here if you need FURTHER 
explanation/clarification/you've found an error in the docs/etc.

We're not here to read the docs to you either :) 

I'm here to LEARN and if that means that I need to do some studying ON 
MY OWN in some cases, so be it.

-- 
send mail to mactech (at) webdragon (dot) net instead of the above address. 
this is to prevent spamming. e-mail reply-to's have been altered 
to prevent scan software from extracting my address for the purpose 
of spamming me, which I hate with a passion bordering on obsession.  


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

Date: Wed, 26 Jul 2000 10:49:41 +0200
From: "Louis Banens" <louis.banens@xs4all.nl>
Subject: How to print the thousands comma for financial numbers ( $ 12,8292.75)
Message-Id: <8lm8oo$9b3$1@porthos.nl.uu.net>

Hi,

I cannot find out how to print the thousands comma for financial numbers ( $
12,8292.75).

Any ideas ?

Regards,

Louis Banens




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

Date: 26 Jul 2000 09:39:30 GMT
From: ebohlman@netcom.com (Eric Bohlman)
Subject: Re: How to print the thousands comma for financial numbers ( $ 12,8292.75)
Message-Id: <8lmbki$i9m$4@slb2.atl.mindspring.net>

Louis Banens (louis.banens@xs4all.nl) wrote:
: I cannot find out how to print the thousands comma for financial numbers ( $
: 12,8292.75).
: 
: Any ideas ?

Use the code shown in perlfaq5.



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

Date: Wed, 26 Jul 2000 06:38:48 GMT
From: jpr <joey@cpwebmedia.com>
Subject: IIS ELF to CLF
Message-Id: <8lm11o$vtt$1@nnrp1.deja.com>

Ok, so I'm sitting down for the first time with the expressed purpose
of writing a Perl script... I've got the llama book and I've got myself
this far.


#!/usr/bin/perl

# Converting IIS ELF to CLF. :)


$logfile_name = extend1.log


open (LOGFILE, "$logfile_name") || "Ach, can't open a file that doesn't
exist!\n";

        while(<LOGFILE>) {

split (/""/) = ($date, $time, $c-ip, $s-username, $s-ip, $cs-method,
$sc-uri-query, $sc-status, $sc-bytes, $cs-bytes, $time-taken, $cs-
version, $cs-user-agent, $cs-cookie, $cs-referer);

print " $date $time $c-ip $s-ip $cs-bytes\n";

}

The comment at the top should explain what the purpose of the script
is. The error message I'm getting when I run it is:

Can't modify split in scalar assignment at hack_log line 12, near ");"
Execution of hack_log aborted due to compilation errors.

Any insight would be great.



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


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

Date: Wed, 26 Jul 2000 07:15:54 GMT
From: bernard.el-hagin@lido-tech.net (Bernard El-Hagin)
Subject: Re: IIS ELF to CLF
Message-Id: <slrn8nt3of.61h.bernard.el-hagin@gdndev25.lido-tech>

On Wed, 26 Jul 2000 06:38:48 GMT, jpr <joey@cpwebmedia.com> wrote:
>Ok, so I'm sitting down for the first time with the expressed purpose
>of writing a Perl script... I've got the llama book and I've got myself
>this far.
>
>
>#!/usr/bin/perl

Change this line to:

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

># Converting IIS ELF to CLF. :)
>
>
>$logfile_name = extend1.log
>
>
>open (LOGFILE, "$logfile_name") || "Ach, can't open a file that doesn't
>exist!\n";
>
>        while(<LOGFILE>) {
>
>split (/""/) = ($date, $time, $c-ip, $s-username, $s-ip, $cs-method,
>$sc-uri-query, $sc-status, $sc-bytes, $cs-bytes, $time-taken, $cs-
>version, $cs-user-agent, $cs-cookie, $cs-referer);

The split should be on the right side of the "=" since it's not an
l-value.

Bernard
--
perl -le 'open(JustAnotherPerlHacker,"")or$_="B$!e$!r$!n$!a$!r$!d$!";
print split/No such file or directory/;'


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

Date: Wed, 26 Jul 2000 09:13:39 +0200
From: "Dr. Peter Dintelmann" <Peter.Dintelmann@dresdner-bank.com>
Subject: Re: IIS ELF to CLF
Message-Id: <8lm32e$f6h1@intranews.dresdnerbank.de>

    Hi,

jpr schrieb in Nachricht <8lm11o$vtt$1@nnrp1.deja.com>...
>Ok, so I'm sitting down for the first time with the expressed purpose
>of writing a Perl script... I've got the llama book and I've got myself
>this far.

>#!/usr/bin/perl
>$logfile_name = extend1.log
>open (LOGFILE, "$logfile_name") || "Ach, can't open a file that doesn't
>exist!\n";

    By the way: $! contains the exact reason why the open() failed. Non-
    existence of the file is only one of them...

>
>        while(<LOGFILE>) {
>
>split (/""/) = ($date, $time, $c-ip, $s-username, $s-ip, $cs-method,
>$sc-uri-query, $sc-status, $sc-bytes, $cs-bytes, $time-taken, $cs-
>version, $cs-user-agent, $cs-cookie, $cs-referer);
>
>print " $date $time $c-ip $s-ip $cs-bytes\n";
>
>}
>
>The comment at the top should explain what the purpose of the script
>is. The error message I'm getting when I run it is:
>
>Can't modify split in scalar assignment at hack_log line 12, near ");"
>Execution of hack_log aborted due to compilation errors.

    Just read what perl told you :-) You have a problem in line 12 with
    the assignment. Usually the thing you assign to is on the left side of
    '=' and the value is on the right. So just try

        ($date, ... ) = split /""/;

    Best regards,

        Peter Dintelmann






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

Date: Wed, 26 Jul 2000 07:10:31 GMT
From: gvoc@my-deja.com
Subject: Re: Include a source in another one
Message-Id: <8lm2t5$17g$1@nnrp1.deja.com>

First thank you for your answer.
I tried both with "use" and with "eval" but the first one only accepts a
module name as argument and mine is not a module. About "eval" I
discovered it after sending this e-mail and (of course) it works.
Bye
Gaetano

In article <u9d7k2cft7.fsf@wcl-l.bham.ac.uk>,
  nobull@mail.com wrote:
> gvoc@my-deja.com writes:
>
> > I know this is quite a stupid question but up to now I couldn't find
> > an answer.
>
> How have you tried? I note you are posting from deja.com.  Have you
> tried a search of articles in this newsgroup with "include" in the
> subject line?  No, I thought not.
>
> > How can I include a Perl source in another one, es. the way the C
> > #include directive works ?
>
> Ignoring the fact that you _can_ use C preprocessor for Perl because
> nobody really does this these days the nearest thing is "do".
>
> Actually "require" or "use" is probably better.  For details RTFM.
>
> --
>      \\   ( )
>   .  _\\__[oo
>  .__/  \\ /\@
>  .  l___\\
>   # ll  l\\
>  ###LL  LL\\
>


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


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

Date: Tue, 25 Jul 2000 21:49:13 -0700
From: "Glen Heide" <jheide@sprint.ca>
Subject: Install
Message-Id: <37uf5.685$fV5.18310@newscontent-01.sprint.ca>

How do you install a module using telnet?


--
    Yours Truly,
        Glen Heide

~Chicken and stuffing and pie!  Oh my!




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

Date: Wed, 26 Jul 2000 00:30:06 -0700
From: Taurean <jaurangNOjaSPAM@crosswinds.net.invalid>
Subject: Re: Looking for an online store script.
Message-Id: <006e8fbb.eaaada67@usw-ex0108-061.remarq.com>

Perlshop is a free online store script. You can find it at:
www.arpanet.com



* Sent from AltaVista http://www.altavista.com Where you can also find related Web Pages, Images, Audios, Videos, News, and Shopping.  Smart is Beautiful


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

Date: Wed, 26 Jul 2000 08:16:52 GMT
From: neil@brevity.org (Neil Kandalgaonkar)
Subject: Re: Multiple Return Streams from CGI process
Message-Id: <8lm6cq$f02$1@localhost.localdomain>

In article <397E3DD3.6B467560@teleport.com>,
Dave Marvin  <dpmarvin@teleport.com> wrote:

>I invoke a CGI process to process a database query and present the
>resulting product, as a zip file, for user download.  So far, so good.
>Then I need the same script to write HTML back to the calling program to
>announce the completion of the process.  Not good.

As far as I know, you can't do this in HTTP 1.1. One response per HTTP 
request. Nothing to do with Perl.

You can issue 3xx redirect headers, but this doesn't allow you to display 
a message like you wanted, as far as I know. 

There are such things as multipart responses, which do more or less what
you want. But browsers tend not to implement it or do so inconsistently. 
I have gotten that to work in Netscape, but not reliably in Mozilla 
or IE. See the CGI.pm docs or the SlideShow module on CPAN.

If you feel you must have this feature, usually people script the browser
to start the download. e.g. <BODY onLoad="start_download()">, and 
provide links for people with Javascript turned off.



>(I'm posting to both comp.lang.perl.misc and comp.lang.perl.modules.
>Somebody please holler if this is poor form.)

Well, technically they're both wrong since your problem has nothing 
to do with perl. Try one of the comp.infosystems.www groups or read 
up on the HTTP protocol.


-- 
Neil Kandalgaonkar <neil@brevity.org>


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

Date: Wed, 26 Jul 2000 09:39:13 +0200
From: "Dr. Peter Dintelmann" <Peter.Dintelmann@dresdner-bank.com>
Subject: Re: No Data from Database
Message-Id: <8lm4ic$f5o2@intranews.dresdnerbank.de>

    Hi,

Mark Watters schrieb in Nachricht <8llaog$hs1$1@pinto.cobaltgroup.com>...
>My cgi (is supposed to)first query a db, then display on a webpage:

    -- snip --

>The problem is this, when I run from the command line 'perl myprogram.cgi"
>the output is the correct html,

    Did you run it under the same uid as your webserver does?

> but when I access it from the web page the
>db info doesn't show up.  Anyone?

    Give us some hints on your environment please (OS/Webserver/Database...)

    Regards,

        Peter Dintelmann






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

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


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