[15956] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3368 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Jun 15 09:05:41 2000

Date: Thu, 15 Jun 2000 06:05:18 -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: <961074318-v9-i3368@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Thu, 15 Jun 2000     Volume: 9 Number: 3368

Today's topics:
        [Perl] How to find the Perl FAQ <rootbeer&pfaq*finding*@redcat.com>
    Re: [Q] Perl implemented in Java? <alun.moon@ncl.ac.uk>
        [REGEXP] Matching list of comma-separated ID's <bochmann-usenet0600@gmx.net>
    Re: [REGEXP] Matching list of comma-separated ID's (Rafael Garcia-Suarez)
    Re: Average Salary? (Reini Urban)
    Re: Average Salary? <scott@industrial-linux.org>
        binding a string variable to call a stored proc ? <andywright28NOanSPAM@hotmail.com.invalid>
    Re: Bot for this group to auto-answer queries? <henry@penninkilampi.net>
    Re: Bot for this group to auto-answer queries? <henry@penninkilampi.net>
    Re: Bot for this group to auto-answer queries? <henry@penninkilampi.net>
    Re: Bot for this group to auto-answer queries? <henry@penninkilampi.net>
        Buscamos Programador para EEUU       <expomagnum@teleline.es>
    Re: default shell for 'backtick' commands (Anno Siegel)
    Re: Dumb question.. How to prompt the user and get the  <mattking@techie.com>
    Re: Encrypting / decrypting. <mattking@techie.com>
    Re: evaluating expressions <red_orc@my-deja.com>
    Re: Extracting Data From a File with Separate Sections jimshepherd@my-deja.com
    Re: file download over cgi script <henrik.jonsson@se.adtranz.com>
    Re: file download over cgi script <flavell@mail.cern.ch>
    Re: file download over cgi script <scott@industrial-linux.org>
        Getting an absolute path from a (potentially) relative  <Wayne.Plummer@isltd.insignia.com>
    Re: Getting an absolute path from a (potentially) relat <scott@industrial-linux.org>
    Re: Getting an absolute path from a (potentially) relat <sweeheng@usa.net>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Thu, 15 Jun 2000 10:22:51 GMT
From: Tom Phoenix <rootbeer&pfaq*finding*@redcat.com>
Subject: [Perl] How to find the Perl FAQ
Message-Id: <pfaqmessage961064645.5521@news.teleport.com>

Archive-name: perl-faq/finding-perl-faq
Posting-Frequency: weekly
Last-modified: 29 Apr 2000

[ That "Last-modified:" date above refers to this document, not to the
Perl FAQ itself! The last _major_ update of the Perl FAQ was in Summer
of 1998; of course, ongoing updates are made as needed. ]

For most people, this URL should be all you need in order to find Perl's
Frequently Asked Questions (and answers).

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

Please look over (but never overlook!) the FAQ and related docs before
posting anything to the comp.lang.perl.* family of newsgroups.

For an alternative way to get answers, check out the Perlfaq website.

    http://www.perlfaq.com/

# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 

Beginning with Perl version 5.004, the Perl distribution itself includes
the Perl FAQ. If everything is pro-Perl-y installed on your system, the
FAQ will be stored alongside the rest of Perl's documentation, and one
of these commands (or your local equivalents) should let you read the FAQ.

    perldoc perlfaq
    man perlfaq

If a recent version of Perl is not properly installed on your system,
you should ask your system administrator or local expert to help. If you
find that a recent Perl distribution is lacking the FAQ or other important
documentation, be sure to complain to that distribution's author.

If you have a web connection, the first and foremost source for all things
Perl, including the FAQ, is the Comprehensive Perl Archive Network (CPAN).
CPAN also includes the Perl source code, pre-compiled binaries for many
platforms, and a large collection of freely usable modules, among its
560_986_526 bytes (give or take a little) of super-cool (give or take
a little) Perl resources.

    http://www.cpan.org/
    http://www.perl.com/CPAN/
    http://www.cpan.org/doc/FAQs/FAQ/html/
    http://www.perl.com/CPAN/doc/FAQs/FAQ/html/

You may wish or need to access CPAN via anonymous FTP. (Within CPAN,
you will find the FAQ in the /doc/FAQs/FAQ directory. If none of these
selected FTP sites is especially good for you, a full list of CPAN sites
is in the SITES file within CPAN.)

    California     ftp://ftp.cdrom.com/pub/perl/CPAN/
    Texas          ftp://ftp.metronet.com/pub/perl/
    South Africa   ftp://ftp.is.co.za/programming/perl/CPAN/
    Japan          ftp://ftp.dti.ad.jp/pub/lang/CPAN/
    Australia      ftp://cpan.topend.com.au/pub/CPAN/
    Netherlands    ftp://ftp.cs.ruu.nl/pub/PERL/CPAN/
    Switzerland    ftp://sunsite.cnlab-switch.ch/mirror/CPAN/
    Chile          ftp://ftp.ing.puc.cl/pub/unix/perl/CPAN/

If you have no connection to the Internet at all (so sad!) you may wish
to purchase one of the commercial Perl distributions on CD-Rom or other
media. Your local bookstore should be able to help you to find one.

# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 

Comments and suggestions on the contents of this document
are always welcome. Please send them to the author at
<pfaq&finding*comments*@redcat.com>. Of course, comments on
the docs and FAQs mentioned here should go to their respective
maintainers.

Have fun with Perl!

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/


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

Date: Thu, 15 Jun 2000 12:06:23 +0100
From: Alun Moon <alun.moon@ncl.ac.uk>
Subject: Re: [Q] Perl implemented in Java?
Message-Id: <3948B8AF.B2C2CA40@ncl.ac.uk>

Bart Lateur wrote:
> No as is, for the reasons Tom Phoenix has given. But I think Larry Wall
> is being paid (by O'Reilly?) to write a Perl-to-Java-bytecode compiler,
> so you could RUN your Perl scripts on a Jave only machine.

Just what I need.
Especially to get the power of Perl's pattern matching into Java.
(also spilt, and array slices)

Any news of its progress?

Alun Moon


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

Date: 15 Jun 2000 12:12:21 GMT
From: Henryk Bochmann <bochmann-usenet0600@gmx.net>
Subject: [REGEXP] Matching list of comma-separated ID's
Message-Id: <8iah75$4aop9$1@fu-berlin.de>


Hi there,

I need users to input a string which will consist of one or more part
ID's with two decimal digits (eg. 1.03 or 2.01 or 12.03). The first
number stands for the type of the part, the two latter digits for its
version. Users are supposed to separate the numbers by comma+space. The
final string should look like '1.03' or '2.01, 12.02, 3.03, 8.04',
depending on the number of parts required and should not contain a
final comma, but may contain a final space.

Can anybody help me with a regex that would test for the correct input?

Thanks,
Henryk

-- 
Henryk Bochmann, M.D. | bochmann@rcs.urz.tu-dresden.de
                      | University Clinic @ Technical University Dresden
Tel: +49 351 458-4813 | Institute of Clin.Chemistry & Laboratory Medicine
Fax: +49 351 458-4332 | 01307 Dresden, Fetscherstr. 74, Germany





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

Date: Thu, 15 Jun 2000 12:46:44 GMT
From: garcia_suarez@hotmail.com (Rafael Garcia-Suarez)
Subject: Re: [REGEXP] Matching list of comma-separated ID's
Message-Id: <slrn8khk90.l4.garcia_suarez@rafael.kazibao.net>

Henryk Bochmann wrote in comp.lang.perl.misc:
>
>Hi there,
>
>I need users to input a string which will consist of one or more part
>ID's with two decimal digits (eg. 1.03 or 2.01 or 12.03). The first
>number stands for the type of the part, the two latter digits for its
>version. Users are supposed to separate the numbers by comma+space. The
>final string should look like '1.03' or '2.01, 12.02, 3.03, 8.04',
>depending on the number of parts required and should not contain a
>final comma, but may contain a final space.
>
>Can anybody help me with a regex that would test for the correct input?

This regexp will verify that $string matches your specification:
  $string =~ /\d+\.\d\d(, \d+\.\d\d)* ?/
but it won't extract any useful information from it.
Look also at the split function to extract the fields from your
input string.

-- 
Rafael Garcia-Suarez


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

Date: Thu, 15 Jun 2000 10:13:03 GMT
From: rurban@sbox.tu-graz.ac.at (Reini Urban)
Subject: Re: Average Salary?
Message-Id: <3948aa46.99197017@news>

paul_maas@my-deja.com wrote:
>I am trying to find out the average salary of a Web Developer
>(CGI/PERL) and Database Administrator. So one person.
>
>I have seen people asking/offering from $63,000 to $84,000.
>Is that about right?

see the statistics on job websites.

http://dir.yahoo.com/Business_and_Economy/Employment_and_Work/Jobs/
lists some.

--
Reini Urban
http://xarch.tu-graz.ac.at/autocad/news/faq/autolisp.html


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

Date: Thu, 15 Jun 2000 07:55:11 -0600
From: "scott thomason" <scott@industrial-linux.org>
Subject: Re: Average Salary?
Message-Id: <Om425.140$Sf1.54754@feed.centuryinter.net>

That range sounds about right for my area, SE Wisconsin. Should be higher for 
places like Chicago, NY, LA, etc.
---scott


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

Date: Thu, 15 Jun 2000 04:30:59 -0700
From: Andy <andywright28NOanSPAM@hotmail.com.invalid>
Subject: binding a string variable to call a stored proc ?
Message-Id: <07660198.d5ef9a47@usw-ex0105-034.remarq.com>

hi all,

I'm trying to call a stored procedure and pass it a string
variable (with spaces) :

---SNIP---
my $my_str_val = "val_a or val_b";
$sth = $dbh->prepare(q{
  BEGIN OPEN :cursor FOR
    SELECT * from tbl_my_table where first_val = :str_first_val;
  END;
});
$sth->bind_param(":str_first_val", $my_string_val, {ora_type =>
ORA_VARCHAR2});

---SNIP---

The problem seems to be the binding of the string
$my_string_val. If its set to "val_a" it returns ok, but when
there seems to be spaces in the string, it returns nothing. What
am I doing wrong ?!?!??!

thanks in advance,

Andy



* 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: Thu, 15 Jun 2000 21:26:08 +0930
From: Henry <henry@penninkilampi.net>
Subject: Re: Bot for this group to auto-answer queries?
Message-Id: <henry-037E45.21260815062000@news.metropolis.net.au>

In article <961044460.18283@itz.pp.sci.fi>, Ilmari Karonen 
<usenet11123@itz.pp.sci.fi> wrote:

> While the idea of a FAQ-answering bot sounds like it could be a good
> thing, I'd *strongly* object to any implementation not satisfying the
> following conditions:
> 
>  1. The bot shall not post to Usenet.
> 
> An autogenerated message cannot, by definition, carry new information.
> Therefore it is not signal, and posting it to the group would lower
> the signal/noise ratio.

A FAQ, by definition, cannot carry new information either.  Neither can 
pointers to FAQs.  I assume you are rallying the troops to declare jihad 
on such affronts?


>  3. The bot shall not encourage FAQs in the group.
> 
> There should be a way to submit questions to the bot through channels
> other than Usenet, such as e-mail and/or a web form.  These channels
> should be clearly marked as being preferred over posting to Usenet.

Such systems already exist in other channels.  The whole point of a Bot 
was to deal with the situation in _this_ channel.  A surplus of 
hamburgers in America does not help the starving millions in Africa.

Your disapproval is noted.

Henry.


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

Date: Thu, 15 Jun 2000 21:43:27 +0930
From: Henry <henry@penninkilampi.net>
Subject: Re: Bot for this group to auto-answer queries?
Message-Id: <henry-ED7A6D.21432715062000@news.metropolis.net.au>

In article <slrn8kgi9g.570.tadmc@magna.metronet.com>, 
tadmc@metronet.com (Tad McClellan) wrote:

> bot's are not appropriate on Usenet (IMO, of course).

Once apon a time, civilians were not allowed on the Internet.  Once apon 
a time, an education and a brain were pre-requisites.

Times change.


> Subject: infobot for c.l.p.m 
> 
>    http://www.deja.com/=dnc/[ST_rn=ps]/getdoc.xp?AN=494842656

> Subject: Robot email/poster for this group
> 
>    http://www.deja.com/=dnc/[ST_rn=ps]/getdoc.xp?AN=495346581

Thanks!


> Machines don't get to talk on Usenet. Only carbon-based types allowed.

You'll be protesting the automated posting of FAQs, pointers to FAQs, 
and statistics then, I gather?


> Treating the symptoms rather than the disease ( I do understand
> that the disease seems incurable...)

Perhaps the disease is inherent in the nature of public forums?  Perhaps 
we should just accept it, stop trying to make it better, and just move 
on?

What purpose is served by staying?


> More seriously, if it had a web interface where a URL could be
> used to refer to it, that might be Good.

Already exists: <http://www.perlfaq.com/>


>> That should help keep the stress levels down, and reduce the
>> burn-out rate.  
> 
> But it doesn't really help much.
> 
> The S/N ratio is very likely to be _lower_ with such a system
> (because humans (sans trolls) are sure to be able to give
>  better advice than a machine.)

I guess it just comes down to what you value more:  a mathematical ratio 
of one class of posts to another, or the rate at which your 'friends' 
burn out and leave.

Henry.


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

Date: Thu, 15 Jun 2000 21:48:07 +0930
From: Henry <henry@penninkilampi.net>
Subject: Re: Bot for this group to auto-answer queries?
Message-Id: <henry-AADA70.21480715062000@news.metropolis.net.au>

In article <39487DCC.3C8E1920@stomp.stomp.tokyo>, "Godzilla!" 
<godzilla@stomp.stomp.tokyo> wrote:

>> I just finished building a bot.
>>
>> I've got the Bot sitting on a permanent connection 
>> just waiting to go.
> 
> As you know, I have two moderately famous
> androids taking care of one of my sites
> and chatting away with people along with
> delighting them with zen poetry, horoscopes,
> fortunes, moon phase graphics, graphical
> draw poker and so forth, and have being
> doing so, for almost a year now.
> 
> Post a link to your bot. I would like
> to test his or her metal.

I default.  You win.  The UN has declared this group a no-fly-zone and 
the Bot's been grounded.

I might deploy it on the border of a JavaScript zone and infiltrate from 
there.  This time, however, I just won't ask the natives for permission.

;^)

Henry.


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

Date: Thu, 15 Jun 2000 22:30:52 +0930
From: Henry <henry@penninkilampi.net>
Subject: Re: Bot for this group to auto-answer queries?
Message-Id: <henry-88E93C.22305215062000@news.metropolis.net.au>

In article 
<Pine.GSO.4.10.10006142007180.5301-100000@user2.teleport.com>, Tom 
Phoenix <rootbeer@redcat.com> wrote:

> I'm worried now that whoever asked for "Help with CGI problem" will drown
> under every topic which mentions "CGI". (Which isn't to say that they
> don't deserve it! :-)  If you can ensure that there will never be more
> than about three topics, and that the "right" one is in there more than
> 95% of the time, you'll be on the right track. But that's going to be
> tough to do.

Impossible, in fact.  The probabilities simply don't work for numbers 
like that.  The English/Perl language combo is too expressive to 
generate such a steep profile at the tail of the curve.


>> This is the short-listing process.  The user then scans the summary
>> and picks the most appropriate choices.  If none seem appropriate
>> _then_ they actually post their question to the group, in detail, and
>> hope for a human response.
> 
> Ah, but a user who would do that would have found the answer in the
> docs/FAQs by now. :-)

Good point.  I keep over-estimating the clue level and self-motivation 
of the masses.


>> It's not _hard_ to ask the bot.  
> 
> It's not hard to read the FAQ. Or to use www.perlfaq.com.

PerlFAQ.com shows promise, and providing enough gurus start referring to 
it in their responses, maybe it'll see some traffic.  I hope so.


> > Once momentum picks up, _absolute_ newbies will wander into the group
> > and see stacks of messages from the Bot and, being used to bots on IRC
> > channels, they might even give the Bot the first crack at answering
> > their question.
> 
> You could be right - but how many "absolute newbies" wander in today, see
> "read the FAQ", and thereby do so?

Very, very few.  That's because FAQs are passive, long, and boring to 
read.

Bots, on the other hand, are immediate, interactive, and save you from 
having to manually sift through thousands of lines of completely 
irrelevant garbage.

They work on IRC, and they work with data mining.  Agents (call them 
bots, spiders, or whatever you want) are the easiest way to get the 
information you want.  People use them.

"I don't want to _look_up_ the answer, I want you to _tell_me_ what the 
answer is."

(There is an interesting similarity between Automatic Teller Machines 
and IRC bots - for those that care to look into it.)


> At this point, I'm not yet sold on this. But here's a way for you to show
> people what the bot would do without actually having it post anything.

The problem is that there seems to be this attitude that UseNet is only 
for humans, and that bots are not welcome.  It wouldn't matter how 
_useful_ the responses were, that attitude would still be there.

I would have thought that, in a newsgroup that centers around helping 
people write programs that make life easier, there would have been 
overwhelming support for a collective project which is not only 
developed in the language of the group itself, but which practically 
demonstrates the potential gains from writing such programs in the first 
place!

I've no idea where such a prejudice comes from - it seems quite 
unnatural.  Sort of like Star Trek fans that don't want to fund NASA - 
bizarre.


> Have the bot generate and maintain a demonstration web page. The page
> would list recent subject lines from the newsgroup, along with the
> suggested responses from the bot. You could even let the visitor type in a
> sample subject line to see what the bot comes up with. This could be handy
> for tuning the bot's responses and seeing where its weak points are, so
> you may want to keep it available after the bot goes on-line. 

It's a good idea, but purely academic.  An attitude shift is required 
before acceptance is possible.  That could take years.  May as well 
shelve it, wait for the guard to change, and then float the idea again 
when the resistance levels have dropped.

Henry.


Reflection:  If the bot proved totally successful in its mission, and 
managed to give perfect responses to every question that were asked, 
those gurus that were left would have nothing left to do, and the social 
aspect would die.  Perhaps this anti-bot attitude is a natural defense 
mechanism for the cultural survival of this forum?  For public forums in 
general?


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

Date: Thu, 15 Jun 2000 10:43:45 GMT
From: "Antonio" <expomagnum@teleline.es>
Subject: Buscamos Programador para EEUU      
Message-Id: <Br225.36075$Vt5.188450@telenews.teleline.es>

Buscamos Programador para EEUU      Para más información:
expomagnum@teleline.es

Necesitamos urgentemente varias personas con un nivel alto de Ingles y que
se adapten a los
siguientes perfiles:

- Disponibilidad para desplazarse a Nueva York durante un periodo de un año.

- Nivel de Ingles Alto.

- Ingresos aproximados (de 70.000 a 120.000 Dolares anuales según nivel)


Puestos que se ofrecen:

3 people Senior people (4-5 years experience Sybase (back end and front end)
Messaging service
Savy in JAVA, JAVA applets
Datamodeling

3 Experienced people
WEB logic to work on an application from second to third tier

2 people
Active server pages
JAVA
UNIX
SYBASE (would be a plus)

3 experienced people
JAVA EJB or solid JAVA
Hashtables
Vectoring

4 person with pearl, CGI, Remedy (4-5 years experience)

3 people sybase front end (2-5 years experience)

3 people sybase DBA (backend  (2-5 years experience)

3 people web sear, web logic (2-5 years experience)

6 people JAVA, JAVA script (ASP) (senior, junior and middle level)

1 senior architect to do integration testing and system testing


Para más información:   expomagnum@teleline.es




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

Date: 15 Jun 2000 12:25:54 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: default shell for 'backtick' commands
Message-Id: <8iai0i$9f1$1@lublin.zrz.tu-berlin.de>

Drew Simonis  <care227@attglobal.net> wrote in comp.lang.perl.misc:
>duckjibe@my-deja.com wrote:
>> 
>> Is it possible to change the shell used for `backtick` commands?
>> It uses sh and I need to use ksh.
>
>Better question is what are you doing with backticks, and could
>that task be better accomplished.  Its usually a better idea to 
>call external programs in other ways.

Why?  Backticks have their place.

In any case, all the methods to call an external program (exec, system,
backticks, open) share the behavior that (under Unix) they call /bin/sh
to run the program in certain circumstances and run it directly (i.e.
using execvp() or similar) in others.  I don't see how using a different
method would help solve the original poster's problem.

Anno


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

Date: Thu, 15 Jun 2000 13:02:31 +0200
From: "Matt King" <mattking@techie.com>
Subject: Re: Dumb question.. How to prompt the user and get the input.
Message-Id: <8iad50$1ebs$1@news2atm.raleigh.ibm.com>


> Name me a language which has this feature natively, according to that
> language's standard, or by it's _de facto_ standard implementation.
> Mucho bonus points if it's a portable languages, not something platform
> specific à la Visual Basic (or assembler).
REXX. Cross platform programming language. OS/2, DOS, Windows XX, and even
*nix, there are more, but these are the mainline ones. Happy?

And I'll except your point about the include statements. But these are
standard libaries. getch() is an alias to another command. In my ANSI C
book, there are three refs. getc, getchar and gets. So although one would
have to include stdio.h, it is a standard call included with the langauge.
Almost everything in C is a library that has to be included inorder to keep
the output code small. Why include it if you don't need it? Perl includes
most standard libraries when a script is run, so if Perl had it as a
standard library, it would be available at run time without including
external libraries. These are both benifits and downfalls from all
languages.

>No, it has not. You have to resort to external methods (ioctl, stty, POSIX,
etc.).
If you would take the time to check this on a Windows PC with Activer Perl
and restate this......

>Perl can't draw lines and colour individual pixels, either -- that's a
pretty basic task, too, but a machine-dependent one.
Really? Are you really sure about this? It might be platform dependent, and
hardware dependent, but if the system is a PC, then one can do a BIOS call
to draw lines and set colors. Old school days....... While were at it, why
not a BIOS call to the keyboard input module? Can Perl handle that?

>No, I man section five of the FAQ, also known as perlfaq5.
And perhaps your wrong on the FAQ location.
Perl FAQ 5 section 5 (perlfaq5: Files and Formats):
http://www.perl.com/pub/doc/manual/html/pod/perlfaq5.html#How_can_I_manipula
te_fixed_recor
Perl FAQ 8 section 5 (perlfaq8: System Interaction):
http://www.perl.com/pub/doc/manual/html/pod/perlfaq8.html#How_do_I_read_just
_one_key_witho
Or perhaps your using a different faq set?

In either case. I now have my answer. Perl can not do it. Why was this so
hard to answer from the get go?

Matt




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

Date: Thu, 15 Jun 2000 12:27:52 +0200
From: "Matt King" <mattking@techie.com>
Subject: Re: Encrypting / decrypting.
Message-Id: <8iab41$g6m$1@news2atm.raleigh.ibm.com>

And I gave you the benifit of the doubt. I used the same mailing address I
always use. If the SP that I'm on, uses routers, then that's on them. Had
you replied to the address you would have seen that it is infact real even
if it's going over a router, or alias email server. You asked me to take
special time for you and do this and that. I provided valid examples of the
errors and a script to show the errors in action. Since you are unwilling or
unable to solve a problem you yourself created, I don't want your help.
Contrary to my orginal thoughts, it would infact apear that you are as bad
as everyone says. I feal for you. I atleast try.

For everyone elses information, the script that she provied is not worth the
effort, I set it up in a loop so that it would encode and decode 8 strings
10000 times. 4 of the strings were 7 'words' and 4 were 4 'words'. The
script would use two strings at a time and encode each 'word' seperatly. The
script sent all output to a text file to be checked and counted all errors I
set it up to catch. The outcome: 0 encoding errors, 356700 decoding errors,
and 0 (cought) loop errors. Sorry Godzilla! I gave you the chance to prove
your self. You messed it up. So in the end I waisted my time with you and
your examples. The waisted my time telling you that there is a problem with
it. I then waisted my time setting up a routine that would show you clearly
that your script is bad and can not safly be used since the information can
not be decoded everytime. Then I waisted my time in sending you an email
with the information you requested, and the examples. What a waist of my
time (so who is trolling, Mrs. CallGirl?). Rest assured I wont do that with
you again. Not even if you fix the stupid script and post it here to show
everyone that you can do it.

"Goddess Of Hackers" - You couldn't hack you way out of a wet paper bag with
a knife.

Matt
Save us all the time and stop posting. And if you do post, test your
examples so that we all do waist our time with your trolling.
Godzilla! <godzilla@stomp.stomp.tokyo> wrote in message
news:3947D1B2.4ED4E58A@stomp.stomp.tokyo...
> Within one of my subsequent articles to this
> one of yours, I advised you to send me email
> directly from your parent server, this is,
> via a valid email address. Along with this
> advice I graciously afforded an explanation
> indicating a need to sort you out from the
> long time regulars here who routinely and
> frequently cause problems via anonymous
> remailers, otherwords, trolling via fake
> email addresses for concealment.
>
> mkingtp
> mattking
>
> internet-free.de --> ifree.mixx.net --> techie.com --> inamecorp.com
>
>
> You have made a freewill choice to send me
> email via a fake email address, a remailer,
> contrary to my polite request to not do this.
> I have deleted your email unread and will
> afford you no further help on this topic.
>
>
> Godzilla!




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

Date: Thu, 15 Jun 2000 12:25:25 GMT
From: Rodney Engdahl <red_orc@my-deja.com>
Subject: Re: evaluating expressions
Message-Id: <8iahv8$mj8$1@nnrp1.deja.com>

In article <slrn8ke0pc.39i.tadmc@magna.metronet.com>,
  tadmc@metronet.com (Tad McClellan) wrote:


> She is not an English PhD.
>
> Everything you see in the movies is not true, heh heh.
>

shouldn't that be:

Not everything you see in the movies is true.

?  ;^)


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


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

Date: Thu, 15 Jun 2000 11:48:10 GMT
From: jimshepherd@my-deja.com
Subject: Re: Extracting Data From a File with Separate Sections
Message-Id: <8iafpq$60h$1@nnrp2.deja.com>

In article <8i9c11$4c9s7$5@fu-berlin.de>,
  news@tinita.de wrote:
<snip>
>
> i've deleted the rest of the code. just try
> it out with the following short one.
> it pushes everything in the ELEMENT section into
> the $hash{ELEMENT}, and so on. as you have
> something after MATERIAL i did not
> want to ignore this line.
> tina@syracus:~ > cat script.pl
>
<snip code sample>
>
> ok? now you can adjust this script to what you
> need.
>
> tina
>
> --
> http://tinita.de    \  enter__| |__the___ _ _
___
> tina's moviedatabase \     / _` / _ \/ _ \
'_(_-< of
> search & add comments \    \ _,_\ __/\ __/_|
/__/ perception
>

Thanks for the suggestion.  Is it possible in the
while loop to increment to the next line of the
file without using the next command, which causes
a return to the begining of the while loop?  In
other words, can I put a loop in the while loop
that increments the line being read from the
file?  Code example:

open(FILE, "< test")
   or die "Couldn't open file for reading\n";

$type = "section";

while(<FILE>) {
   ($first, $second, $third, $fourth, @junk) =
split;

   if ($type =~ "section") {

      if ($first =~ "TITL") {

         until ($third =~ "Thickness/diameter"){
            FILE++; # Attempt to incrment to next
line - This doesn't work!
            ($first, $second, $third, $fourth,
@junk) = split;
         }
         ($thickness, @junk) = split;
      }
   }
}

Thanks,
Jim Shepherd


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


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

Date: Thu, 15 Jun 2000 14:06:38 +0200
From: Henrik Jönsson <henrik.jonsson@se.adtranz.com>
Subject: Re: file download over cgi script
Message-Id: <LcBIOVQXjA4AcnYr7qN4TacSKp54@4ax.com>

Why not use the CGI.pm function redirect instead? Then you don't need
to read in the file into memory.

$q->redirect('url/to/the/file');

/henrik

On Thu, 15 Jun 2000 10:05:39 +0200, Nils <ii4533@fh-wedel.de> wrote:

>Hi
>Ive wrote an cgi script which sends back a file that was requeseted by a
>paramter.
>to do that i use something like that:
>
>print "Content-type: $type\n\n":
>open (FILE, "<".param('filename'))  
>while (!eof(FILE))  {
>   print <FILE>
>}
>close (FILE)
>
>If i use this script on my local maschine and it runs fine even with
>large files.
>if i use it an my webserver an try to download a file of about 2MB over 
>ISDN the script
>dies with the message "preamatuer end of script header" after
>transfering about 700KB of data
>and i dont know why.
>
>anybody an idea?
>
>thanks nils



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

Date: Thu, 15 Jun 2000 14:43:13 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: file download over cgi script
Message-Id: <Pine.GHP.4.21.0006151428540.20371-100000@hpplus03.cern.ch>

On Thu, 15 Jun 2000, Henrik Jönsson wrote:

> $q->redirect('url/to/the/file');

I agree with the general plan, but I think you need to make that 

 $q->redirect('/url/to/the/file');

The CGI.pm documentation explicitly says you must provide an absolute
URLpath, or a complete URL.  These are essentially the same rules as
in the CGI specification itself.

There's a piece of superstition that appears in perlfaq9 about this,
which I have criticised before and supplied a proposed replacement
text.  It says (ir did still at 5.6.0):

 Note that relative URLs in these headers can cause strange effects
 because of "optimizations" that servers do.

In fact, the use of relative URLs in the CGI response is prohibited by
the CGI specification, and the two different behaviours for the
absolute path and for the complete URL are clearly specified, no
"optimization", in the sense that the FAQ is hinting at, is permitted.

And, as I say, the documentation for CGI.pm calls out essentially the
same rules.

cheers



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

Date: Thu, 15 Jun 2000 07:59:50 -0600
From: "scott thomason" <scott@industrial-linux.org>
Subject: Re: file download over cgi script
Message-Id: <ar425.142$Sf1.55063@feed.centuryinter.net>

Don't run this script as-is without first reading a good chapter or two on CGI security.
You are in essence allowing anyone to execute a command under the webserver
user-id by taking arbitrary content from param('filename').

A much better solution is to just stuff the download-able files somewhere under your
web doc root and just let them click on the file in a directory listing. 

If you *NEED* to automate it for some reason, you can still use your script, but 
change it do to a redirect to a downloadable URL. Then you don't have to worry 
about CGI security as much.
---scott


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

Date: Thu, 15 Jun 2000 11:12:15 +0100
From: "Wayne Plummer" <Wayne.Plummer@isltd.insignia.com>
Subject: Getting an absolute path from a (potentially) relative one
Message-Id: <961063935.998687@proxy0.isltd.insignia.com>

Am I missing something obvious? (I have already searched in the Perl FAQ
etc. to no avail - a DejaNews search found one example of someone else
asking a similar question and not getting a satisfactory response).

I want to get the absolute form of a pathname which *may* be relative to my
current working directory (or perhaps not) - this must work even of the file
identified by the input path does *not* exist (nor may any number of its
parent directories) - and it must work portably over different filesystem
types.

So:

    &getAbsPath ("../../fred/foo")

would return "/usr/wayne/fred/foo" if my CWD was "/usr/wayne/bert/harry"
or 'C:\User\Wayne\fred\foo' if my CWD was 'C:\User\Wayne\thelma\louise'

(supply your own VMS example if you wish! ;-)

Anyone know if there's something that does what I want? I could write one
myself, but this would be daft if there already was such a beast!

Thanks in advance,
                   Wayne.

--
Wayne Plummer                             http://www.cix.co.uk/~plum/
(Consultant, Embedded Java VM Team, Insignia Solutions, High Wycombe)




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

Date: Thu, 15 Jun 2000 07:13:38 -0600
From: "scott thomason" <scott@industrial-linux.org>
Subject: Re: Getting an absolute path from a (potentially) relative one
Message-Id: <SL325.137$Sf1.52944@feed.centuryinter.net>

I'm sure there's a module to do this kind of thing. In shell scripts when I need this 
kind of thing I just do this (you could do the same in Perl-ese):

   cd $TARGET_DIR
   RESULT_DIR = `pwd`   <---backticks!
   


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

Date: Thu, 15 Jun 2000 20:57:27 +0800
From: "Swee Heng" <sweeheng@usa.net>
Subject: Re: Getting an absolute path from a (potentially) relative one
Message-Id: <8iajgd$obi$1@violet.singnet.com.sg>

> I want to get the absolute form of a pathname which *may* be relative to
my
> current working directory (or perhaps not) - this must work even of the
file
> identified by the input path does *not* exist (nor may any number of its
> parent directories) - and it must work portably over different filesystem
> types.

The Cwd module has a abs_path() function that seems closest to what you
want. However, it requires that the input path exist else it will croak. You
can perhaps modify it?

Swee Heng




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

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


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