[24316] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 6507 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon May 3 00:05:38 2004

Date: Sun, 2 May 2004 21:05:06 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Sun, 2 May 2004     Volume: 10 Number: 6507

Today's topics:
    Re: How to call another program <David@Grey.con>
    Re: How to call another program (Sam Holden)
    Re: How to call another program <jtc@shell.dimensional.com>
    Re: How to call another program <trammell+usenet@hypersloth.invalid>
    Re: How to call another program <David@Grey.con>
    Re: How to call another program <matternc@comcast.net>
    Re: How to call another program <David@Grey.con>
    Re: How to call another program <jtc@shell.dimensional.com>
    Re: How to call another program <David@Grey.con>
    Re: How to call another program <uri@stemsystems.com>
    Re: How to call another program <uri@stemsystems.com>
    Re: How to call another program <uri@stemsystems.com>
    Re: is there something more elegant to convert Dos to u <xxala_qumsiehxx@xxyahooxx.com>
    Re: need help with security (Sam Holden)
    Re: need help with security <robin @ infusedlight.net>
    Re: need help with security <robin @ infusedlight.net>
    Re: need help with security <robin @ infusedlight.net>
    Re: OSs with Perl installed <matthew.garrish@sympatico.ca>
    Re: OSs with Perl installed <matthew.garrish@sympatico.ca>
    Re: single-byte values (Don Stock)
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Mon, 03 May 2004 01:23:14 GMT
From: David Grey <David@Grey.con>
Subject: Re: How to call another program
Message-Id: <40959858.1280F75B@Grey.con>



Uri Guttman wrote:

> wow. all i can say is wow. what more do we need to do to get you to
> understand what is happening and why your understanding of it is so
> skewed.
>
> let me try. i need a good challenge.

Into S & M too  :-)

>
>
> ok, when you request web page (be it a file or dynamic like a cgi) you
> make a connection to that web server and it does the work for you. you
> don't care about what script it runs so calling it that like you do is
> wrong. all you can do is fetch a page (we are ignoring file loads for
> now).
>
> ok, you can fetch a page by a browser or by any program that acts and
> looks like a browser. these programs are called user agents and perl's
> version is in a library called LWP.
>
> and finally, a redirection does not RUN ANYTHING. it simply tells the
> browser to IGNORE the rest of this page (which is why you never get
> anything else from it) and load the page to which it redirects. so you
> are not running or fetching ANYTHING in your existing script. you are
> telling the BROWSER to fetch something else.
>
> so now let's put this all together. redirect as you are doing will NEVER
> work as its function is to cause the browser to go to somewhere
> else. you lost control of the situation as soon as the browser is told
> to redirect. so you need some way to fetch a page (NOT RUN A
> SCRIPT. that is WRONG THINKING) from inside your cgi so YOU CAN KEEP
> CONTROL of the situation. the key is CONTROL but you lose that with a
> redirection.
>
> so inside your cgi script you RUN AN LWP command like you have seen
> several times in this thread. YOU GET the results in YOUR script and not
> in the browser. BUT WATCH! YOU can send those results TO THE BROWSER
> yourself with a print call. and THEN YOU KEEP CONTROL!!! wowie!!!
> staying in control is the name of the game! now that you have control,
> you just run the rest of your script and feel very happy.
>
> and when 10 people tell you that you aren't running a script when you do
> a redirection, try listening to them. you have showns a severe lacking
> in the basics of how the web works. find a decent tutorial and learn
> about it before you write code that interacts with it.

It is really frustrating when you need something done in the real
world and people tell you,  find a decent tutorial and learn
about it before you write code that interacts with it. If I had
that much time I would not have asked here, I would have
worked it out myself. I started out at 11:00am asking what
would have only taken someone a few seconds to type the
code that I needed and and have yet at night to get the answer
in a useable form. I appreciate the help, but all I needed was
a clear example and a try this and see if this works. That
is what I would have given anyone who I could have helped.
Not, oh you have to look it you or you will never learn,
or if you know so little about it, pay someone to do it.

>
>
> i hope this helps. if it doesn't, either you have no sense of humor or
> else no senses whatsoever and should leave the programming to pros.

Yes, it helps me understand it, but not do it.

Thanks for the info





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

Date: 3 May 2004 01:23:56 GMT
From: sholden@flexal.cs.usyd.edu.au (Sam Holden)
Subject: Re: How to call another program
Message-Id: <slrnc9b7pc.r58.sholden@flexal.cs.usyd.edu.au>

On Mon, 03 May 2004 01:01:19 GMT, David Grey <David@Grey.con> wrote:
> 
> 
> Alan J. Flavell wrote:
> 
>> On Sun, 2 May 2004, David Grey wrote:
>>
>> (in reply to A. Sinan Unur , and your carelessness with attributions
>> isn't helping your case:]
>>
>> > I'm not going to try what will not do what I want, I want
>> > to run a script in a script, I saw no evidence what you posted
>> > would do that.
>>
>> Actually that's not as obvious as it seems.  You obviously don't yet
>> understand what you are doing nor how to properly ask about what you
>> want - which is perfectly OK - we all have to start somewhere; it
>> would be to your advantage to explore all kinds of relevant building
>> blocks so that you could get a better feel for how they fit together,
>> after which, the answer to your problem will likely seem so obvious
>> that you won't need to ask about it.
> 
> Well I'm sure that is the case, but I am living in the real world
> and need this done yesterday, I don't have time for theory
> and a learning experience today, I need this fixed. And it is
> a bit frustrating to get the answer, go look it up, when you know
> they know the answer but wont tell you. (Not in a form that
> comprehendable at my level of understanding.)

So everyone else should bow to your wishes because you lacked 
the perl ability or the planning ability to get something done
on time.

I'm sure numerous people here will do it for you for say $150/hour.

But, frankly I don't care (and I'm pretty sure no one else does) about
your deadlines. 

People have told you the answer, you just don't have the domain
knowledge to realise, and when they try to tell you the domain knowledge
necessary to understand the answer you get all grumpy.

Not very effective. That'll work if you are paying $150/hour but you're not.

> 
>>
>>
>> > Oh please, you can't know about something before you know about
>> > something, you just want to flame others, not help them.
>> > I don't see why you are here other than to gloat I know more than
>> > you idiots.
>>
>> You don't seem to have the remotest clue what kind of impression
>> you're making by this kind of public exhibition.  As such, my own
>> interim reaction is that you probably can't be helped.  But I'll give
>> you the benefit of the doubt before you go into the killfile, and the
>> answer might just be helpful to someone else.
> 
> Well by this time I figured all I was going to get was more
> go look it up you lead filled brained retard and figured I had
> nothing left to lose.
> 
>>
>>
>> > I just need a clue how to run a script in a script, not get a file
>> > as it seems you posted.
>>
>> Not on the basis of your own evidence, no.  You want to invoke a
>> remote URL which happens to have a script behind it, while retaining
>> control of the situation so that you can return the result.  The
>> answer to that is LWP.
> 
> I tried GET and HEAD and it did not work, do you have a
> short example?

use LWP::Simple;

print "Content/type: text/html\n\n";
print "The perl.com website looks a little like this:<hr>\n";
my $result = get('http://www.perl.com');
print $result;
print "<hr>The perl.com website looked a little like that\n";

Of course I excluded simple things like error checking and valid specification
following output.


-- 
Sam Holden


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

Date: 2 May 2004 19:48:14 -0600
From: Jim Cochrane <jtc@shell.dimensional.com>
Subject: Re: How to call another program
Message-Id: <slrnc9b96u.va2.jtc@shell.dimensional.com>

In article <4095931A.A50A61C7@Grey.con>, David Grey wrote:
> 
> 
> Alan J. Flavell wrote:
> 
>> On Sun, 2 May 2004, David Grey wrote:
>>
>> (in reply to A. Sinan Unur , and your carelessness with attributions
>> isn't helping your case:]
>>
>> > I'm not going to try what will not do what I want, I want
>> > to run a script in a script, I saw no evidence what you posted
>> > would do that.
>>
>> Actually that's not as obvious as it seems.  You obviously don't yet
>> understand what you are doing nor how to properly ask about what you
>> want - which is perfectly OK - we all have to start somewhere; it
>> would be to your advantage to explore all kinds of relevant building
>> blocks so that you could get a better feel for how they fit together,
>> after which, the answer to your problem will likely seem so obvious
>> that you won't need to ask about it.
> 
> Well I'm sure that is the case, but I am living in the real world
> and need this done yesterday, I don't have time for theory
> and a learning experience today, I need this fixed. And it is
> a bit frustrating to get the answer, go look it up, when you know
> they know the answer but wont tell you. (Not in a form that
> comprehendable at my level of understanding.)

No offense intended, but with a situation like this, with a tight deadline,
although a newsgroup can often provide a timely solution, it's often best
to, if possible, pay a consultant.  As long as you find someone competent
wrt the problem you want solved, this greatly increases the chances that
your problem gets solved on time.  In other words, it may help to post to a
newsgroup, but don't count on this as your only alternative.  (Pardon me if
I'm pointing out the obvious.)

>>...

>> > I just need a clue how to run a script in a script, not get a file
>> > as it seems you posted.
>>
>> Not on the basis of your own evidence, no.  You want to invoke a
>> remote URL which happens to have a script behind it, while retaining
>> control of the situation so that you can return the result.  The
>> answer to that is LWP.
> 
> I tried GET and HEAD and it did not work, do you have a
> short example?

Tip: In a situation like this, the more detail you give as to what happened
when it didn't work and what you expected to happen, the greater the chance
that someone will understand what is going wrong and be able to help you
get it working as  you expect.  (And if you're still looking for a
solution, I think it's not too late to do this - e.g., when you tried HEAD
and GET, what exactly happened and what did you expect to happen?  What
does your code look like?  Etc.)

-- 
Jim Cochrane; jtc@dimensional.com
[When responding by email, include the term non-spam in the subject line to
get through my spam filter.]


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

Date: Mon, 3 May 2004 02:05:08 +0000 (UTC)
From: "John J. Trammell" <trammell+usenet@hypersloth.invalid>
Subject: Re: How to call another program
Message-Id: <slrnc9ba6k.foh.trammell+usenet@hypersloth.el-swifto.com.invalid>

On Sun, 02 May 2004 22:59:06 GMT, David Grey <David@Grey.con> wrote:
> John J. Trammell wrote:
>> When you dlksj a script, what's happening?
> 
> One of two things, if I put in:
> 
> print "Location: http://www.domain.com/cgi-bin/copyprog.pl\n\n";
> 
> it go on its merry way and runs the script on domain.com and
> the rest of the script is ignored, if I take it out it  runs only
> the script, I'm fickled and want it to do both. Run both
> scripts, the one on domain.com first and wait until it is done.
> Is that not forking() ? And everyone is now saying no it is not
> forking.

No, I mean "What is really happening?".  Until you address this
question, nobody can help you.

>> You're using a web browser
>> of some sort to request a file from a web server.
> 
> Not that I know of, I put in the URL to the script and it
> does whatever voo doo it do.

OK, maybe I'm not understanding something.  I thought you were putting
the URL into a browser, like IE or Mozilla or something.  Are you
running a script from the command-line then?

I guess I can't help you unless you tell me if you're using a browser,
and if not, then what the heck are you using?



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

Date: Mon, 03 May 2004 02:11:23 GMT
From: David Grey <David@Grey.con>
Subject: Re: How to call another program
Message-Id: <4095A390.BAB39EB7@Grey.con>



Jim Cochrane wrote:

> In article <4095931A.A50A61C7@Grey.con>, David Grey wrote:
> >
> >
> > Alan J. Flavell wrote:
> >
> >> On Sun, 2 May 2004, David Grey wrote:
> >>
> >> (in reply to A. Sinan Unur , and your carelessness with attributions
> >> isn't helping your case:]
> >>
> >> > I'm not going to try what will not do what I want, I want
> >> > to run a script in a script, I saw no evidence what you posted
> >> > would do that.
> >>
> >> Actually that's not as obvious as it seems.  You obviously don't yet
> >> understand what you are doing nor how to properly ask about what you
> >> want - which is perfectly OK - we all have to start somewhere; it
> >> would be to your advantage to explore all kinds of relevant building
> >> blocks so that you could get a better feel for how they fit together,
> >> after which, the answer to your problem will likely seem so obvious
> >> that you won't need to ask about it.
> >
> > Well I'm sure that is the case, but I am living in the real world
> > and need this done yesterday, I don't have time for theory
> > and a learning experience today, I need this fixed. And it is
> > a bit frustrating to get the answer, go look it up, when you know
> > they know the answer but wont tell you. (Not in a form that
> > comprehendable at my level of understanding.)
>
> No offense intended, but with a situation like this, with a tight deadline,
> although a newsgroup can often provide a timely solution, it's often best
> to, if possible, pay a consultant.

I'm suppose to pay some $150. to get a one line code, I don't
think so.  I knew this was going to be one of the answers,
you people must all be X gens and think this is helpful.



> As long as you find someone competent
> wrt the problem you want solved, this greatly increases the chances that
> your problem gets solved on time.  In other words, it may help to post to a
> newsgroup, but don't count on this as your only alternative.  (Pardon me if
> I'm pointing out the obvious.)

At least you were nice in being snippy.


>
>
> >>...
>
> >> > I just need a clue how to run a script in a script, not get a file
> >> > as it seems you posted.
> >>
> >> Not on the basis of your own evidence, no.  You want to invoke a
> >> remote URL which happens to have a script behind it, while retaining
> >> control of the situation so that you can return the result.  The
> >> answer to that is LWP.
> >
> > I tried GET and HEAD and it did not work, do you have a
> > short example?
>
> Tip: In a situation like this, the more detail you give as to what happened
> when it didn't work and what you expected to happen, the greater the chance
> that someone will understand what is going wrong and be able to help you
> get it working as  you expect.  (And if you're still looking for a
> solution, I think it's not too late to do this - e.g., when you tried HEAD
> and GET, what exactly happened and what did you expect to happen?  What
> does your code look like?  Etc.)
>
> --
> Jim Cochrane; jtc@dimensional.com
> [When responding by email, include the term non-spam in the subject line to
> get through my spam filter.]





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

Date: Sun, 02 May 2004 22:19:19 -0400
From: Chris Mattern <matternc@comcast.net>
Subject: Re: How to call another program
Message-Id: <1d-dnUcpbfq6MQjdRVn-ig@comcast.com>

David Grey wrote:

> 
> Well I'm sure that is the case, but I am living in the real world
> and need this done yesterday, I don't have time for theory
> and a learning experience today, I need this fixed. 

Then you need to pay somebody to fix it for you.  You seem to have
mistaken this newsgroup for consultants on your payroll.

-- 
             Christopher Mattern

"Which one you figure tracked us?"
"The ugly one, sir."
"...Could you be more specific?"


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

Date: Mon, 03 May 2004 02:26:48 GMT
From: David Grey <David@Grey.con>
Subject: Re: How to call another program
Message-Id: <4095A71A.6EF4E132@Grey.con>



Sam Holden wrote:

> On Mon, 03 May 2004 01:01:19 GMT, David Grey <David@Grey.con> wrote:
> >
> >
> > Alan J. Flavell wrote:
> >



>
>
>
> >> > I just need a clue how to run a script in a script, not get a file
> >> > as it seems you posted.
> >>
> >> Not on the basis of your own evidence, no.  You want to invoke a
> >> remote URL which happens to have a script behind it, while retaining
> >> control of the situation so that you can return the result.  The
> >> answer to that is LWP.
> >
> > I tried GET and HEAD and it did not work, do you have a
> > short example?
>
> use LWP::Simple;
>
> print "Content/type: text/html\n\n";
> print "The perl.com website looks a little like this:<hr>\n";
> my $result = get('http://www.perl.com');
> print $result;
> print "<hr>The perl.com website looked a little like that\n";
>
> Of course I excluded simple things like error checking and valid specification
> following output.

And this process the response from accessing a URL via some
kind of HTTP request to my script on domain.com how?

A grudgingly thanks.





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

Date: 2 May 2004 20:44:18 -0600
From: Jim Cochrane <jtc@shell.dimensional.com>
Subject: Re: How to call another program
Message-Id: <slrnc9bcg2.5g0.jtc@shell.dimensional.com>

In article <4095A390.BAB39EB7@Grey.con>, David Grey wrote:
> 
> 
> Jim Cochrane wrote:
> 
>> In article <4095931A.A50A61C7@Grey.con>, David Grey wrote:
>> >
>> >
>> > Alan J. Flavell wrote:
>> >
>> >> On Sun, 2 May 2004, David Grey wrote:
>> >>
>> >> (in reply to A. Sinan Unur , and your carelessness with attributions
>> >> isn't helping your case:]
>> >>
>> >> > I'm not going to try what will not do what I want, I want
>> >> > to run a script in a script, I saw no evidence what you posted
>> >> > would do that.
>> >>
>> >> Actually that's not as obvious as it seems.  You obviously don't yet
>> >> understand what you are doing nor how to properly ask about what you
>> >> want - which is perfectly OK - we all have to start somewhere; it
>> >> would be to your advantage to explore all kinds of relevant building
>> >> blocks so that you could get a better feel for how they fit together,
>> >> after which, the answer to your problem will likely seem so obvious
>> >> that you won't need to ask about it.
>> >
>> > Well I'm sure that is the case, but I am living in the real world
>> > and need this done yesterday, I don't have time for theory
>> > and a learning experience today, I need this fixed. And it is
>> > a bit frustrating to get the answer, go look it up, when you know
>> > they know the answer but wont tell you. (Not in a form that
>> > comprehendable at my level of understanding.)
>>
>> No offense intended, but with a situation like this, with a tight deadline,
>> although a newsgroup can often provide a timely solution, it's often best
>> to, if possible, pay a consultant.
> 
> I'm suppose to pay some $150. to get a one line code, I don't
> think so.  I knew this was going to be one of the answers,
> you people must all be X gens and think this is helpful.

No, you're not supposed to do anything, particularly.  I was attempting
to point out that from a practical viewpoint, in such a situation,
paying someone if sometimes the best solution.  It's just a matter of weighing
the different factors - How urgent the problem is, how big your budget is,
etc.  (If you're a one-person company, of course, such an expense can be a
big deal; with a larger company, it wouldn't be.)

I really did mean no offense intended - I was just trying to point out a
(IMO) practical reality, rather than to suggest that this is what you
should do.  I don't really know your situation, so I'm not qualified to
really suggest anything.

I'm not a gen-X-er, by the way - much too old for that :-)

> 
>> As long as you find someone competent
>> wrt the problem you want solved, this greatly increases the chances that
>> your problem gets solved on time.  In other words, it may help to post to a
>> newsgroup, but don't count on this as your only alternative.  (Pardon me if
>> I'm pointing out the obvious.)
> 
> At least you were nice in being snippy.

Well, I'd rather be snippy than snappy.  (How's that for gibberish? :-))


-- 
Jim Cochrane; jtc@dimensional.com
[When responding by email, include the term non-spam in the subject line to
get through my spam filter.]


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

Date: Mon, 03 May 2004 03:36:59 GMT
From: David Grey <David@Grey.con>
Subject: Re: How to call another program
Message-Id: <4095B785.A898A571@Grey.con>



John J. Trammell wrote:

> On Sun, 02 May 2004 22:59:06 GMT, David Grey <David@Grey.con> wrote:
> > John J. Trammell wrote:
> >> When you dlksj a script, what's happening?
> >
> > One of two things, if I put in:
> >
> > print "Location: http://www.domain.com/cgi-bin/copyprog.pl\n\n";
> >
> > it go on its merry way and runs the script on domain.com and
> > the rest of the script is ignored, if I take it out it  runs only
> > the script, I'm fickled and want it to do both. Run both
> > scripts, the one on domain.com first and wait until it is done.
> > Is that not forking() ? And everyone is now saying no it is not
> > forking.
>
> No, I mean "What is really happening?".  Until you address this
> question, nobody can help you.

See below

>
>
> >> You're using a web browser
> >> of some sort to request a file from a web server.
> >
> > Not that I know of, I put in the URL to the script and it
> > does whatever voo doo it do.
>
> OK, maybe I'm not understanding something.  I thought you were putting
> the URL into a browser, like IE or Mozilla or something.  Are you
> running a script from the command-line then?
>
> I guess I can't help you unless you tell me if you're using a browser,
> and if not, then what the heck are you using?


The customer will click on a button and there will be a URL to
the script on that site (below), this script needs to (run)  process
the response from accessing a URL via some kind of HTTP
request to my script on the domain.com. I have been told to
use LWP and tried:

#!/usr/bin/perl

use warnings;
use strict;

use LWP::UserAgent;
use URI;

$ua = new LWP::UserAgent;
$uri = new URI('http://www.domain.com/temp.txt');
$localfile = 'temp.txt';

# This part just added .. start --------
$ua2 = new LWP::UserAgent;
$uri2 = new URI('http://www.domain.com/copyprog.pl');

my $request = HTTP::Request->new('GET', $uri2);
my $result = $ua2->request($request);
# sleep 10
# end .. of new part, that did not work ----------

# Create request with HTTP 1.1-style Range header
my $request = HTTP::Request->new('GET', $uri);

# Fetch it
my $result = $ua->request($request);

# Append the fetched data to the local file
open OUT,">>$localfile";
print OUT $result->content;
close OUT;


Which does not work. It does not activate the script on
domain.com  sleep 10 gave me an 500 error.

Thanks







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

Date: Mon, 03 May 2004 03:43:05 GMT
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: How to call another program
Message-Id: <x7k6zuw4zc.fsf@mail.sysarch.com>

>>>>> "DG" == David Grey <David@Grey.con> writes:

  >> i hope this helps. if it doesn't, either you have no sense of humor or
  >> else no senses whatsoever and should leave the programming to pros.

  DG> Yes, it helps me understand it, but not do it.

you don't get it. YOU WERE TOLD HOW TO DO IT AND EXAMPLE CODE WAS
POSTED. you CHOSE TO IGNORE IT BECAUSE OF SOME FOOLISH REASONS.

i give up.

uri

-- 
Uri Guttman  ------  uri@stemsystems.com  -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs  ----------------------------  http://jobs.perl.org


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

Date: Mon, 03 May 2004 03:46:08 GMT
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: How to call another program
Message-Id: <x7hduyw4ub.fsf@mail.sysarch.com>

>>>>> "DG" == David Grey <David@Grey.con> writes:

  DG> Well I'm sure that is the case, but I am living in the real world
  DG> and need this done yesterday, I don't have time for theory
  DG> and a learning experience today, I need this fixed. And it is
  DG> a bit frustrating to get the answer, go look it up, when you know
  DG> they know the answer but wont tell you. (Not in a form that
  DG> comprehendable at my level of understanding.)

in what real world do you not HIRE A PROGRAMMER to do this job for you?
in the time you have wasted here, you could have posted to jobs.perl.org
and gotten someone to do this for $50. was that not worth the time?
you say you consult but don't ever expect me to hire someone with such a
poor sense of how to solve something. if you want to do it yourself,
learn some perl and web. if not, hire someone who can. sitting on the
fence must be fun for you.

uri

-- 
Uri Guttman  ------  uri@stemsystems.com  -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs  ----------------------------  http://jobs.perl.org


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

Date: Mon, 03 May 2004 03:49:34 GMT
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: How to call another program
Message-Id: <x7ekq2w4oh.fsf@mail.sysarch.com>

>>>>> "DG" == David Grey <David@Grey.con> writes:

  DG> Sam Holden wrote:

  >> use LWP::Simple;
  >> 
  >> print "Content/type: text/html\n\n";
  >> print "The perl.com website looks a little like this:<hr>\n";
  >> my $result = get('http://www.perl.com');
  >> print $result;
  >> print "<hr>The perl.com website looked a little like that\n";

  DG> And this process the response from accessing a URL via some
  DG> kind of HTTP request to my script on domain.com how?

DID YOU READ MY POST? you claimed it was helpful. it DESCRIBED EXACTLY
WHAT sam wrote there. in fact sam could have written this code from my
description so i want my share of the fees we should charge you.

what more do you need? a bottle? someone to teach you basic coding and
comprehension? now why hasn't moronzilla stuck her snout into this
mess. it reeks of the classic web crap she always did. you deserve that
kind of help.

  DG> A grudgingly thanks.

and more back at ya. you don't deserve any more help. you have gotten
$100's worth of work here for free and you spit on it. 

uri

-- 
Uri Guttman  ------  uri@stemsystems.com  -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs  ----------------------------  http://jobs.perl.org


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

Date: Mon, 03 May 2004 03:33:25 GMT
From: Ala Qumsieh <xxala_qumsiehxx@xxyahooxx.com>
Subject: Re: is there something more elegant to convert Dos to unix in subroutine?
Message-Id: <94jlc.43979$ET7.7005@newssvr29.news.prodigy.com>

Uri Guttman wrote:

> perl -I.bak -pe 'tr/\r\n/\n/s'

I'm really confused. I thought your shift keys were permanently broken, 
but now I see a -I when you actually mean -i! What is happening to this 
world?

FWIW, I like the following:

	perl -pi.bak -e 'y/\cM//d' file_name

--Ala



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

Date: 3 May 2004 01:45:16 GMT
From: sholden@flexal.cs.usyd.edu.au (Sam Holden)
Subject: Re: need help with security
Message-Id: <slrnc9b91c.r58.sholden@flexal.cs.usyd.edu.au>

On Mon, 03 May 2004 02:04:07 +0100,
	Mark Clements <mark.clements@kcl.ac.uk> wrote:
> Robin wrote:
>> Someone posted an unathorized post to my blog, if someone has time...could
>> you check this out, http://www.infusedlight.net/robin/temp/blog.txt and
>> point out the security problems??
> quick read (can't be arsed to consider the security problems):
> 
> my $rootfile =
> $rootfile =~ s/.+\///;
> 
> what is this supposed to be doing?

Delete everything other than the filename (ie. getting the basename
of a path). Of course it doesn't work for paths containing newlines.

It also should use something other than /, such as s!.+/!!... or
even better File::Basename.

> why are you using files when your needs would be much better served with 
> a proper database?

How are files not a "proper" database?

-- 
Sam Holden


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

Date: Sun, 2 May 2004 19:29:10 -0800
From: "Robin" <robin @ infusedlight.net>
Subject: Re: need help with security
Message-Id: <c74eqt$opc$1@news.f.de.plusline.net>


"gnari" <gnari@simnet.is> wrote in message
news:c742sf$6gh$1@news.simnet.is...
> "Robin" <webmaster @ infusedlight . net> wrote in message
> news:c73lo9$a08$1@reader2.nmix.net...
> > Someone posted an unathorized post to my blog, if someone has
time...could
> > you check this out, http://www.infusedlight.net/robin/temp/blog.txt and
> > point out the security problems??
> >
>
> of course, it is your auth.pl that is the weakest link.
>
> gnari

agreed, thanks... I'll set it up to use cookies...
-robin





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

Date: Sun, 2 May 2004 19:32:52 -0800
From: "Robin" <robin @ infusedlight.net>
Subject: Re: need help with security
Message-Id: <c74er0$opc$2@news.f.de.plusline.net>


"Mark Clements" <mark.clements@kcl.ac.uk> wrote in message
news:40959a87$1@news.kcl.ac.uk...
> Robin wrote:
> > Someone posted an unathorized post to my blog, if someone has
time...could
> > you check this out, http://www.infusedlight.net/robin/temp/blog.txt and
> > point out the security problems??
> quick read (can't be arsed to consider the security problems):
>
> my $rootfile =
> $rootfile =~ s/.+\///;
>
> what is this supposed to be doing?

I posted the new one. Look again.

> my @blogposts;
> @blogposts = getposts ();
>
> why is this two lines?

heheh...I dunno. Sorry.

> perltidy is still your friend. Please use it.

Ok. I'll check it out.

>      $mon++;
>      $year +=1900;
>
> why are you doing this? There are many fine CPAN modules that handles
> dates without such jiggery-pokery.

well, I tend to use as few modules as possible so that someone can install
the script on their server without having to download a lot of modules.

>     open (BLOG, $blogfile) or push (@errors, "An error occured:
> couldn't open blog file.");
>
> why are you using files when your needs would be much better served with
> a proper database?
>
>
> open (COUNT, ">$countfile") or push (@errors, "An error occured during
> posting: couldn't open count file.");
> flock (COUNT, LOCK_EX) or push (@errors, "An error occured during
> posting: couldn't lock count file.");
>
> your open fails and you save the error (but not $!, which would tell you
> what the error is), yet you still continue to the flock. why?

If the open fails, the flock will fail so why not try it and then the error
output will come into play. With the new one it does include $!.

> why are you printing html directly from perl? *please* look at (and
> understand, and use) templating solutions.

Like I said b4 I'd rather not use too many modules that aren't installed on
everyone's server.

-Robin





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

Date: Sun, 2 May 2004 19:37:48 -0800
From: "Robin" <robin @ infusedlight.net>
Subject: Re: need help with security
Message-Id: <c74er3$opc$3@news.f.de.plusline.net>

sorry to post a script that wouldn't compile, I actually posted the one in
progress without checking if it would work,that was completely my mistake.
now it runs - www.infusedlight.net/robin/temp/blog.txt - and the auth script
source code is www.infusedlight.net/robin/temp/auth.txt
Sorry about my formatting, I use an editor that screws it all up. I'll use
perltidy next time.

Gnari, thanks. Was that you who hacked it? I don't care really, but how
would you be able to get the auth.pl password from my old search script? see
the previous post, "free source search engine...etc"

-Robin







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

Date: Sun, 2 May 2004 22:21:11 -0400
From: "Matt Garrish" <matthew.garrish@sympatico.ca>
Subject: Re: OSs with Perl installed
Message-Id: <l0ilc.8412$ZJ5.388709@news20.bellglobal.com>


"Abigail" <abigail@abigail.nl> wrote in message
news:slrnc9asr8.egl.abigail@alexandra.abigail.nl...
>
> Despite Windows being classified as "garbage", it's still actively
> being used by your company. I rest my case.
>

I wouldn't rest it based on a guess. We currently have no choice because of
a global agreement the company that bought us up had with M$ (buyout ==
Unix -> Windows). If that company does any serious consideration of the
agreement when it comes due, I find it hard to believe they'll lock us into
it again. Without cygwin we'd really be up shit creek without them
paddles... : )

Matt




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

Date: Sun, 2 May 2004 23:09:57 -0400
From: "Matt Garrish" <matthew.garrish@sympatico.ca>
Subject: Re: OSs with Perl installed
Message-Id: <2Kilc.8851$ZJ5.412564@news20.bellglobal.com>


"John Bokma" <postmaster@castleamber.com> wrote in message
news:40949114$0$193$58c7af7e@news.kabelfoon.nl...
> Matt Garrish wrote:
>
> > 1,000 people who prefer Movie Maker for *personal use*. I don't believe
for
> > a minute that Linux (or any OS I can think of) is any immediate threat
to
> > Microsoft in that regard. As an OS in a work environment, however,
Windows
> > is garbage. Aside from all the security holes that keep our tech support
> > group running around after viruses,
>
> Strange, since I never have any kind of virus on my Windows computers,
> for years (no active ones that is). Making users limited, not
> Administrator, and use Thunderbird / Firefox instead of OE / IE helps a
lot.
>
> > the systems just don't work. Worse, the
> > so-called "mcse" people don't have a clue how to fix them.
>
> The viruses shouldn't be active on your system in the first place.
>
> I am very afraid, if you so called tech support was given GNU / Linux
> systems they would configure those systems in such a way that they would
> suffer from similar problems, or worse.
>

Which is my whole point. It doesn't require much to be M$ certified as far
as I can tell. These problems just ballooned as soon as we had to switch
from Unix servers to M$  (and the personnel in tech support were changed).
The only consolation is that the desktops in our department are specifically
not under their control, and so we haven't had to suffer in the same way as
other departments (buggy software the exception).

I don't know what the point of this thread is anymore, but given the choice
I just wouldn't use Windows as a work desktop (see my other post for why I
don't have that choice). I suppose a company with no needs except email and
the internet would not be swayed to dumping M$ because of the bugs, but a
company like the one I work for is shooting itself in the foot by using
Windows when better alternatives are available (and I don't buy the idea
that inertia will keep M$ on top). I don't really care to prophesy the
future of M$, but the idea that Windows is going to be the be-all and
end-all of OS's for forever and a day simply because they've had better and
more aggressive marketing is ludicrous. All things come to pass, and Windows
is no different.

At some point M$ has to stop expecting people to keep paying ridiculous
amounts of money to upgrade their own buggy platform. If they think they can
keep riding that tide they're sorely mistaken. Office's diminished sales are
proof of that. The growth of Linux is also proof. The ability to succeed
rests on a company's ability to adapt to its changing environment (or
ability to buy out all competition as M$ is wont to do on occasion), and
Linux is the first real test for Microsoft because they can't just buy Linux
out. As I said before, the next ten years will show whether they get the
real hint and do something about it (i.e., that people are getting fed up
with the exorbitatnt costs and shoddy software) or if it is their time to
wither. I don't see their current business model keeping them healthy for
long if they don't change, though.

Matt




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

Date: 2 May 2004 20:40:03 -0700
From: dbsx@yahoo.com (Don Stock)
Subject: Re: single-byte values
Message-Id: <8cf7ae36.0405021940.7b75f433@posting.google.com>

> updating won't fix the warnings

I know.  I just hate having an old version.  I had 5.0.something.  Now I have 5.6.1.

> get a newer perl and use warnings.

I will from now on.

don


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

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
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: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice. 

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 V10 Issue 6507
***************************************


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