[22393] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4614 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Feb 24 06:05:38 2003

Date: Mon, 24 Feb 2003 03:05:06 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Mon, 24 Feb 2003     Volume: 10 Number: 4614

Today's topics:
    Re: $SIG{__DIE__} and modules <dont@want.spam>
    Re: $SIG{__DIE__} and modules <nobull@mail.com>
    Re: (not 1) and (!1) yield zero length string (Villy Kruse)
    Re: (not 1) and (!1) yield zero length string <bart.lateur@pandora.be>
        [OT] Re: try my program out... <ian@WINDOZEdigiserv.net>
    Re: Combining maps <neil.shadrach@corryn.com>
    Re: date::calc <Steffen.Beyer@de.bosch.com>
    Re: How do I get the current date? <Steffen.Beyer@de.bosch.com>
    Re: HTML::TokeParser: How to detect a <br> <bart.lateur@pandora.be>
    Re: Just wanted to share this technique (and hear some  <krahnj@acm.org>
    Re: LWP Requests <smiley@uvgotemail.com>
    Re: Newbie request for script review <tassilo.parseval@post.rwth-aachen.de>
    Re: read web content (R Solberg)
        try my program out... <nospam@mymail.com>
    Re: try my program out... <jurgenex@hotmail.com>
    Re: try my program out... <peter@wastholm.com>
    Re: try my program out... <tassilo.parseval@post.rwth-aachen.de>
    Re: try my program out... <ian@WINDOZEdigiserv.net>
    Re: try my program out... <tassilo.parseval@post.rwth-aachen.de>
    Re: Use or not to use modules [was: How do I ...] <mgjv@tradingpost.com.au>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Mon, 24 Feb 2003 07:33:22 +0000
From: Chris Lowth <dont@want.spam>
Subject: Re: $SIG{__DIE__} and modules
Message-Id: <i4k6a.33$um.12081@newsfep1-win.server.ntli.net>

Dieter D'Hoker wrote:

> I have this perl-gameserver ,
> now sometimes it craches and I want autorestart it then ,
> so I definded
> 
> $SIG{__DIE__} = \&SigDIE;

You dont say what OS your server runs on - but if it's unix or linux (etc), 
then my suggestion would be to start it from an entry in /etc/inittab - 
then "init" will take care of the restart for you.

Chris

-- 
My real e-mail address is
chris <at> lowth <dot> com


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

Date: 24 Feb 2003 08:18:38 +0000
From: Brian McCauley <nobull@mail.com>
Subject: Re: $SIG{__DIE__} and modules
Message-Id: <u965rac9oj.fsf@wcl-l.bham.ac.uk>

"Dieter D'Hoker" <webmaster@neverseenbefore.com> writes:

> I have this perl-gameserver , now sometimes it craches and I want
> autorestart it then , so I definded
> 
> $SIG{__DIE__} = \&SigDIE;

You should $SIG{__DIE__} only as a last resort when you really need to
intercept the execption handling process very close to the cause of
the exception and when none of the more conventional flow control
menchanisms work.

If you want something with the semantics of an END block use an END block.

However, you'd probably do better to take the restart mechanism
completely outside the main process.  Have a parent process that forks
and waits then execs itself.

-- 
     \\   ( )
  .  _\\__[oo
 .__/  \\ /\@
 .  l___\\
  # ll  l\\
 ###LL  LL\\


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

Date: 24 Feb 2003 08:34:41 GMT
From: vek@station02.ohout.pharmapartners.nl (Villy Kruse)
Subject: Re: (not 1) and (!1) yield zero length string
Message-Id: <slrnb5jm90.74v.vek@station02.ohout.pharmapartners.nl>

On 22 Feb 2003 19:31:36 GMT,
    ctcgag@hotmail.com <ctcgag@hotmail.com> wrote:


>Salvador_Fandiño_García <sfandino@yahoo.com> wrote:
>>
>> if you are using numbers it is not very consistent because
>>
>>    !0 ==> 1  # ok
>>    !1 ==> '' # most people would expect 0
>
>Why?  Would most people expect !!"dog" to give "dog"?
>

As A C programmer it is natural that !0 is 1 and !1 is 0.  In other
languages this is not always so natural.  Often the result of logical
operators only makes sense in a conditinal statement, or perhaps when
assigning it to a boolean or logical variable which can't be used with
arithmetic operators.



Villy


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

Date: Mon, 24 Feb 2003 09:39:05 GMT
From: Bart Lateur <bart.lateur@pandora.be>
Subject: Re: (not 1) and (!1) yield zero length string
Message-Id: <bppj5vc0o42hkbjujkqei26bfhn6p7vak8@4ax.com>

Villy Kruse wrote:

>As A C programmer it is natural that !0 is 1 and !1 is 0.

That is the result you get in Perl as well, if you treat the result as a
number.

	print !1+0;

Often you don't even have to take that explicit step (= adding zero):

	my @out = qw(false true);
	for my $flag (0, 1) {
	   print "not $flag -> $out[!$flag]\n";
	}

-- 
	Bart.


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

Date: Mon, 24 Feb 2003 09:56:59 GMT
From: "Ian.H [dS]" <ian@WINDOZEdigiserv.net>
Subject: [OT] Re: try my program out...
Message-Id: <4kqj5vo400vnhv7jna9ghb1c792obnk6ht@4ax.com>
Keywords: Remove WINDOZE to reply

-----BEGIN xxx SIGNED MESSAGE-----
Hash: SHA1

In a fit of excitement on 24 Feb 2003 09:42:48 GMT, "Tassilo v.
Parseval" <tassilo.parseval@post.rwth-aachen.de> managed to scribble:

> Also sprach Ian.H [dS]:
> 
> > In a fit of excitement on Mon, 24 Feb 2003 07:56:20 GMT, "Jürgen
> > Exner" <jurgenex@hotmail.com> managed to scribble:
> 
> >> How stupid does someone have to be to run an unknown exe from an
> >> unknown web site written/submitted by an unknown poster who is
> >> using a faked name and doesn't even provide a valid email
> >> address for questions or to submit those opinions he pretents to
> >> be looking for?
> 
> > I'd go with the probability of it having been coded in C/C++.
> 
> It has been written in Perl (see my other post).


Your reply wasn't noticed until I posted and regrabbed the headers.
After, I saw your analysis with xdd.


> 
> > It runs fine, and server side, so no viruses or trojan to be
> > worried about. The media way way over hype viruses and trojans
> > and people auto aume that a .exe is going to cause them harm..
> > seems you've falled into the hysteria trap (please don't take
> > that offensively.. many many do that maybe don't understand that
> > particular aspect of computing very well).
> 
> Who tells you that the program running on the server is the one
> that he distributed in the zip archive? It just happens to have the
> same name, so what?


At the time I posted my post, I hadn't seen your reply and certainly
had no idea at the time, that there was a version to download in any
form.

My above statement was more pointing out that Jue had "jumped the
gun" and assumed that due to the fact someone had posted a link with
a .EXE extension, they auto assumed that it was some malicious piece
of code. Unfortunately, the media help so much with this by telling
us how bad the world is with viruses and trojans around.. it's not
such a bad world, we learn many things from them, and no, not all of
their coders are evil either, some are particular nice and helpful in
a range of things. My point being that due to media hype, people
assume the worst, when infact, it could be a purely innocent binary
file with no malicious intent whatsoever.

I've spent many years interested in the "other side" of things
regarding this topic and have learnt a _lot_ from either
experimenting or analysing, but what I did gain from that, was
knowledge to help people on the "good side" too as I can often "think
ahead" and help someone with a disinfection or the likes. I read and
studied that part of things, yet Jue probably has much more
experience and knowledge than myself in other areas of computing,
which is why I hoped that Jue especially (and anyone else reading
this) didn't jump on the defensive and take offense to my post, it
really wasn't intended to be like that in any way.

Anyway, this post is pulling the thread OT even more than the OPs
post, so I'll end my contribution to this part here =)

If anyone did think that my post to Jue was harsh, offensive or
anything in that direction, and especially Jue himself, then I do
apologise for the way in which I put my statement across.



Regards,

  Ian

-----BEGIN xxx SIGNATURE-----
Version: PGP 8.0

iQA/AwUBPlnsaWfqtj251CDhEQJtIgCeIFGmJiA2h1jWlez1Fhr8fP/ymcUAnAyr
tjP8tMSFuLFH+5r+/iqnjHlV
=6bgh
-----END PGP SIGNATURE-----

-- 
Ian.H  [Design & Development]
digiServ Network - Web solutions
www.digiserv.net  |  irc.digiserv.net  |  forum.digiserv.net
Scripting, Web design, development & hosting.


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

Date: Mon, 24 Feb 2003 10:01:09 +0000
From: Neil Shadrach <neil.shadrach@corryn.com>
Subject: Re: Combining maps
Message-Id: <3E59ED65.9050004@corryn.com>

Benjamin Goldberg wrote:
> Neil Shadrach wrote:
> 
>>Looking for a neat way to combine the two maps.
>>When I try get additional "[.txt]" lines in the output.
> 
> 
> Looking at your code, the fault is not in how you're using map, but in
> the regex.  Change /^(?![#\s])(.+)$/ to /^(?![#\s])(.*)$/, and your
> problem should be fixed.
> 
I don't follow.
The code worked as posted - I just wanted to know how to combine the maps.



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

Date: Mon, 24 Feb 2003 09:50:02 +0100
From: "Steffen Beyer" <Steffen.Beyer@de.bosch.com>
Subject: Re: date::calc
Message-Id: <b3cmbr$jck$1@ns2.fe.internet.bosch.com>


"w i l l" <will@com.yahoo> wrote in message news:ghhf5vk039ah0cuvfohcej8q6ljld8a9p6@4ax.com...
> Is there a way of using date::calc or some other module to get the
> time format 20030215 (YYYYMMDD) into Feb 15 2003 ?
> 
> TIA!!!!!!!!!!!!!!!!

Sure.

$date = '20030215';

if ($date =~ /^(\d{4})(\d{2})(\d{2})$/)
{
    $date = (qw(Err Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec))[$2] . " $3 $1";
}

With Date::Calc, use
    substr(Month_to_Text($2),0,3)
instead of
    (qw(Err Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec))[$2]

Hope this helps.



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

Date: Mon, 24 Feb 2003 09:41:38 +0100
From: "Steffen Beyer" <Steffen.Beyer@de.bosch.com>
Subject: Re: How do I get the current date?
Message-Id: <b3cls2$it7$1@ns2.fe.internet.bosch.com>


"Benjamin Goldberg" <goldbb2@earthlink.net> wrote in message news:3E568D7E.FC62CD69@earthlink.net...

> > I agree in principle, but I have reason to disagree in particular.
> > I have seen CGI applications which used so many modules that
> > they really slowed down considerably. So there are cases in
> > which it makes sense to avoid loading modules.
> 
> If the nanoseconds/kilobytes penalty of loading
> a module is actually important to you, you shouldn't
> be using the Common Gateway Interface for providing
> web content, and should be using one of mod_perl,
> mod_fastcgi, or mod_(speedycgi|persistantperl) instead.

Sometimes, alas, this choice is not yours, but that of your employer.

> > But in general, it is of course a good idea not to re-invent
> > the wheel and to use modules wherever possible.
> > I'm the last to object because I'm a module author myself. :-)



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

Date: Mon, 24 Feb 2003 09:55:39 GMT
From: Bart Lateur <bart.lateur@pandora.be>
Subject: Re: HTML::TokeParser: How to detect a <br>
Message-Id: <vhqj5vsv17213s53g4e8dnc8p8r6bv6f9k@4ax.com>

Francesco Moi wrote:

>I've got this HTML to parse:

>This story<BR>It is the text

>My Perl code:

>my $text = $parser->get_trimmed_text("/a");

>And I get:

>text = This storyIt is the text

>And I want to get rid of 'This story' or detect <br> in order to 
>remove some part of the text.
>
>Is this possible?

Yes, though it's a bit clumsy.

 A) Set $parser->{textify}{br} to some value, for example "alt". This
value will be ignored, as <br> commonly doesn't have any attributes. You
should get "[BR]" in your text.

 B) do

	$parser->get_tag('br');

first. You then have to be sure that there *will* be a <br> tag in your
text.

I would think writing a code snippet that recreates what
get_trimmed_text does, would be more flexible.

Untested:

	my $text = "";
	while(my $token = $parser->get_token) {
	    if($token->[0] eq 'T') {
	       $text .= $token->[1];
	    } elsif($token->[0] eq 'E' && $token->[1] eq 'a') {
	        last;
	    } elsif($token->[0] eq 'S' && $token->[1] eq 'br') {
	        $text = "";
	        # or... insert something. But what?
	    }
	}

-- 
	Bart.


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

Date: Mon, 24 Feb 2003 07:07:59 GMT
From: "John W. Krahn" <krahnj@acm.org>
Subject: Re: Just wanted to share this technique (and hear some opinions about  it)
Message-Id: <3E59C4BD.D0FDDD17@acm.org>

Benjamin Goldberg wrote:
> 
> "John W. Krahn" wrote:
> [snip]
> > > #!/usr/bin/perl -i.bak -lw
> > > use strict;
> > >
> > > my @pre=map sprintf('../../pics/%02d/', $_), 3..10;
> > >
> > > my ($cnt,$f);
> > > while ($f=<>) {
> > >     next if ++$cnt == @pre;
> >
> > The value of $cnt starts out at 0, then you increment here to 1, then
> > at the end of the loop you set it to 0 again so at this point the
> > value of $cnt will ALWAYS be 1
> 
> You're not seeing the 'redo' later in the loop.

Yes I saw it but I assumed (wrongly) that it wouldn't execute.  :-)

> The code you provided is *not* equivilant to his code, since it never
> alters the order of items in the @pre array.

No, I made a little mistake.  However, after some testing, this is
equilalent to the OP's code.

##!/usr/bin/perl -i.bak -lw
#use strict;

my @pre = map sprintf( '../../pics/%02d/', $_ ), 3 .. 10;

while ( my $f = <> ) {
    chomp $f;
    -e and print and last for map "$_$f", @pre;
    }

__END__



John
-- 
use Perl;
program
fulfillment


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

Date: Mon, 24 Feb 2003 01:01:59 -0500
From: "Smiley" <smiley@uvgotemail.com>
Subject: Re: LWP Requests
Message-Id: <v5jdbdj7tu820a@corp.supernews.com>


"Sharon Grant" <peakpeek@purethought.com> wrote in message
news:085g5vo4jupl5t26che59q5jcgsfndqglb@4ax.com...
> On Sat, 22 Feb 2003 18:44:36 -0500, in alt.perl, "Smiley"
<smiley@uvgotemail.com> wrote:
> So I'm guessing that I need to send a cookie as well
>
> I start again, capture the cookie, then send the cookie as
> well as the POST data
>
> Success
>
> The ASP script on that site is storing your search parameters
> in a server-side session database. It uses a cookie to look
> up the parameters each time you ask for the next page
>
> What you are trying to do is possible, but the site's use of
> cookies makes it harder that you first thought

That's funny - I set my browser to prompt me if any cookies were being set
then did a search and went through to the next page, but nothing came up.
Maybe I did it wrong.  I also tried setting :


use HTTP::Cookies;

my $ua = LWP::UserAgent->new;
$ua->cookie_jar(HTTP::Cookies->new(file => "lwpcookies.txt", autosave =>
1));


Which I gather is supposed to handle any cookies necessary, but don't get
anything.

What I find really odd is that the $res variable seems to be either being
set to the same page information each time, or the variable for some reason
isn't being updated at all and keeps the same data.  Do you have any ideas
about that?

And what cookies are you reading that it sets?




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

Date: 24 Feb 2003 07:43:39 GMT
From: "Tassilo v. Parseval" <tassilo.parseval@post.rwth-aachen.de>
Subject: Re: Newbie request for script review
Message-Id: <b3cifb$7ts$1@nets3.rz.RWTH-Aachen.DE>

Also sprach A. Sinan Unur:

> tadmc@augustmail.com (Tad McClellan) wrote in
> news:slrnb5ir9m.cru.tadmc@magna.augustmail.com: 

>> You should check to see if you got it:
>> 
>>   opendir(PHOTO_DIR, $photo_path) or die "could not open '$photo_path'
>>   dir $!"; 
> 
> I am a little confused about whether it is OK to use die in CGI scripts. 
> Admittedly, I have some reading to do but maybe someone can help clear it 
> up for me, especially if the script might run under mod_perl in Apache.

In this group the "or die" is often just a placeholder for
exception-handling. Your script is doing something with a directory and
obviously it can't do that if it fails to open it. In a CGI context you
probably want a more graceful exit to at least print out same valid
headers and a few lines of HTML:

    opendir PHOTO_DIR, $photo_path or bail_out();

    sub bail_out {
        my $file = shift;
        print "Content-type: text/html\n\n";
        print <<EOERROR;
    <html>
    Error-message to visitor
    </html>
    EOERROR
        die "$file: $!"; # goes to the webserver log
    }

Whether you include the directory that could not be opened or the error
in $! in the error-message is up to you. Some people wouldn't want to
exhibit these information to the side-visitors. But it should at least
show up in the logs to make debugging easier for you.

Tassilo
-- 
$_=q#",}])!JAPH!qq(tsuJ[{@"tnirp}3..0}_$;//::niam/s~=)]3[))_$-3(rellac(=_$({
pam{rekcahbus})(rekcah{lrePbus})(lreP{rehtonabus})!JAPH!qq(rehtona{tsuJbus#;
$_=reverse,s+(?<=sub).+q#q!'"qq.\t$&."'!#+sexisexiixesixeseg;y~\n~~dddd;eval


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

Date: 23 Feb 2003 21:24:47 -0800
From: flateyjarbok@yahoo.com (R Solberg)
Subject: Re: read web content
Message-Id: <386cc483.0302232124.692b5a83@posting.google.com>

Andrew Lee wrote in message news:<qdm24vc12e4gmig9h8gd618v2avkm8esvd@4ax.com>...
> On 3 Feb 2003 21:49:09 -0800, flateyjarbok@yahoo.com (R Solberg) wrote:
> 
> >"Pons" <pons@gmx.li> wrote in message news:<b1itlq$13i7go$1@ID-172702.news.dfncis.de>...
> >> I would like to write a script to read the content of
> >> Web page, and copy it to a file *.txt for later use
> >> such as filtering or putting it in a string?
> >> can any one help? if not ignore me !
> >> 
> >> 
> >> -Pons
> >> pons@gmx.li
> >
> >How do I get at a URL if the site is protected by a password (and I
> >have a legitimate password.  I know there are different types of
> >security, so for example can anyone explain with code how to access
> >wsj.com web pages?
> 
> Use LWP.
> 
> e.g.
> 
> my $ua = LWP::UserAgent->new;
> $ua->agent("Hi!  I am a user agent!");
> $ua->credentials("www.mydoian.com:80", "realm", "user", "pass");
> my $req = POST $options{'URL'},
>             [action => 'some_form',
>              more_info => 'list_all' ];
> 
> my $content = $ua->request($req)->as_string;
> 
> But, wsj.com may NOT appreciate you pulling content off ther server.
> You have to read their policies.
> 
> hth

Hi Andrew and all,
Thanks for the example code for getting to wsj.  I have substituted my
user id in "user" and my password in "pass" and I put wsj.com:80
instead of www.mydomain.com:80 and I substituted
http://online.wsj.com/documents/mktindex.htm?diaries.htm
for URL in $options('URL').

Do I need to make more substitutions and are the ones I made correct?
I get the following message
syntax error at c:\perl\myapps\wsj0103.pl line 19, near "$options{"

Thanks!!  Any help appreciated.


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

Date: Mon, 24 Feb 2003 07:14:49 GMT
From: Some One <nospam@mymail.com>
Subject: try my program out...
Message-Id: <1105_1046070889@news.usenetserver.com>

Its a guestbook program, i need it looked at and opinions given..

http://www.pcmedix.org/guestbook/guestbook.exe

thanks





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

Date: Mon, 24 Feb 2003 07:56:20 GMT
From: "Jürgen Exner" <jurgenex@hotmail.com>
Subject: Re: try my program out...
Message-Id: <Eek6a.5561$ES3.1697@nwrddc04.gnilink.net>

Some One wrote:
> Its a guestbook program, i need it looked at and opinions given..
>
> http://www.[...]/guestbook.exe

How stupid does someone have to be to run an unknown exe from an unknown web
site written/submitted by an unknown poster who is using a faked name and
doesn't even provide a valid email address for questions or to submit those
opinions he pretents to be looking for?

This doesn't smell like a virus or probably more like a Trojan horse, it
stinks like one for five miles against the wind.

jue





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

Date: Mon, 24 Feb 2003 10:11:53 +0100
From: Peter Wastholm <peter@wastholm.com>
Subject: Re: try my program out...
Message-Id: <b3cnbl$735$1@yggdrasil.utfors.se>

On Monday 24 February 2003 08.56, Jürgen Exner <jurgenex@hotmail.com> 
wrote:

> How stupid does someone have to be to run an unknown exe from an
> unknown web site written/submitted by an unknown poster who is using a
> faked name and doesn't even provide a valid email address for
> questions or to submit those opinions he pretents to be looking for?

Well, you're right, except the program runs on the server; you don't 
download it and run it on your own machine. I fail to see the Perl 
connection though, since the program appears to be written in some 
other language.

/Peter


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

Date: 24 Feb 2003 09:22:41 GMT
From: "Tassilo v. Parseval" <tassilo.parseval@post.rwth-aachen.de>
Subject: Re: try my program out...
Message-Id: <b3co91$dac$1@nets3.rz.RWTH-Aachen.DE>

Also sprach Peter Wastholm:

> On Monday 24 February 2003 08.56, Jürgen Exner <jurgenex@hotmail.com> 
> wrote:
> 
>> How stupid does someone have to be to run an unknown exe from an
>> unknown web site written/submitted by an unknown poster who is using a
>> faked name and doesn't even provide a valid email address for
>> questions or to submit those opinions he pretents to be looking for?
> 
> Well, you're right, except the program runs on the server; you don't 
> download it and run it on your own machine. I fail to see the Perl 
> connection though, since the program appears to be written in some 
> other language.

You can download a zip archive from there which contains an executable:

    ethan@ethan:/tmp$ xxd guestbook.exe | grep perl2exe
    00a4360: 3d20 2573 0a00 002f 7065 726c 3265 7865  = %s.../perl2exe
    00a4500: 6578 650a 0000 0023 7065 726c 3265 7865  exe....#perl2exe

So it has been written in Perl alright. But since we have no source,
there's not much to comment on for us.

Tassilo
-- 
$_=q#",}])!JAPH!qq(tsuJ[{@"tnirp}3..0}_$;//::niam/s~=)]3[))_$-3(rellac(=_$({
pam{rekcahbus})(rekcah{lrePbus})(lreP{rehtonabus})!JAPH!qq(rehtona{tsuJbus#;
$_=reverse,s+(?<=sub).+q#q!'"qq.\t$&."'!#+sexisexiixesixeseg;y~\n~~dddd;eval


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

Date: Mon, 24 Feb 2003 09:31:44 GMT
From: "Ian.H [dS]" <ian@WINDOZEdigiserv.net>
Subject: Re: try my program out...
Message-Id: <84pj5v4080hfj9aqmcut0r4sil6faj7anp@4ax.com>
Keywords: Remove WINDOZE to reply

-----BEGIN xxx SIGNED MESSAGE-----
Hash: SHA1

In a fit of excitement on Mon, 24 Feb 2003 07:56:20 GMT, "Jürgen
Exner" <jurgenex@hotmail.com> managed to scribble:

> Some One wrote:
> > Its a guestbook program, i need it looked at and opinions given..
> >
> > http://www.[...]/guestbook.exe
> 
> How stupid does someone have to be to run an unknown exe from an
> unknown web site written/submitted by an unknown poster who is
> using a faked name and doesn't even provide a valid email address
> for questions or to submit those opinions he pretents to be looking
> for?
> 
> This doesn't smell like a virus or probably more like a Trojan
> horse, it stinks like one for five miles against the wind.
> 
> jue


I'd go with the probability of it having been coded in C/C++.

It runs fine, and server side, so no viruses or trojan to be worried
about. The media way way over hype viruses and trojans and people
auto aume that a .exe is going to cause them harm.. seems you've
falled into the hysteria trap (please don't take that offensively..
many many do that maybe don't understand that particular aspect of
computing very well).

As it happens, a friend of mine who is a C whizz has coded a few CGI
applications in C for his site, all of which have a .exe extension.

As it happens now, he went out to buy a book on Perl to help learn as
from what he said, the code I had read (I'm no C/C++ whizz, but
understand some, with his great commenting too) the C versions were
harder to code and took so much longer to plan and write. Hopefully,
he'll be converting most of his stuff from C to Perl sometime in the
near future.

There's nothing wrong with using binary files on the server, some
would prefer the method as it keeps your program closed, rather than
a freely viewable script (if you have shell access maybe).

As for the actual output from this binary, it most certainly leaves 
a lot to be desired. Ok, it might work, but it's far from nice to
look at, and not something I personally would have posted to get
comments on as it's just too bland and looks like every other "n00b"
guestbook I've ever seen.

As Peter rightly says in his reply too, no idea why it's in a Perl
group, as it has sweet FA to do with Perl (unless it happens to be a
Perl compiled binary, which then to me, would be a complete and utter
waste of time).



Regards,

  Ian

-----BEGIN xxx SIGNATURE-----
Version: PGP 8.0

iQA/AwUBPlnmfmfqtj251CDhEQKf1wCg5gG20vg2RCK4QAg98rSFRPIocTsAoKZL
gRrIV1lmBmdieVQKJcfncl+v
=CWDg
-----END PGP SIGNATURE-----

-- 
Ian.H  [Design & Development]
digiServ Network - Web solutions
www.digiserv.net  |  irc.digiserv.net  |  forum.digiserv.net
Scripting, Web design, development & hosting.


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

Date: 24 Feb 2003 09:42:48 GMT
From: "Tassilo v. Parseval" <tassilo.parseval@post.rwth-aachen.de>
Subject: Re: try my program out...
Message-Id: <b3cpeo$egk$1@nets3.rz.RWTH-Aachen.DE>

Also sprach Ian.H [dS]:

> In a fit of excitement on Mon, 24 Feb 2003 07:56:20 GMT, "Jürgen
> Exner" <jurgenex@hotmail.com> managed to scribble:

>> How stupid does someone have to be to run an unknown exe from an
>> unknown web site written/submitted by an unknown poster who is
>> using a faked name and doesn't even provide a valid email address
>> for questions or to submit those opinions he pretents to be looking
>> for?

> I'd go with the probability of it having been coded in C/C++.

It has been written in Perl (see my other post).

> It runs fine, and server side, so no viruses or trojan to be worried
> about. The media way way over hype viruses and trojans and people
> auto aume that a .exe is going to cause them harm.. seems you've
> falled into the hysteria trap (please don't take that offensively..
> many many do that maybe don't understand that particular aspect of
> computing very well).

Who tells you that the program running on the server is the one that he
distributed in the zip archive? It just happens to have the same name,
so what?

Anyway, I don't think it's something malicious. But the whole thing is
futile nonetheless since we have no source code to look at and therefore
nothing to comment on.

> There's nothing wrong with using binary files on the server, some
> would prefer the method as it keeps your program closed, rather than
> a freely viewable script (if you have shell access maybe).

Yeah, and it keeps it unportable as well. There are thousands of
webservers around the world that do not understand Windows executables.

> As Peter rightly says in his reply too, no idea why it's in a Perl
> group, as it has sweet FA to do with Perl (unless it happens to be a
> Perl compiled binary, which then to me, would be a complete and utter
> waste of time).

Well, he wants to make money out of it. It's his privilege to do so but
since this group is about discussing Perl the language his post is
off-topic here.

Tassilo
-- 
$_=q#",}])!JAPH!qq(tsuJ[{@"tnirp}3..0}_$;//::niam/s~=)]3[))_$-3(rellac(=_$({
pam{rekcahbus})(rekcah{lrePbus})(lreP{rehtonabus})!JAPH!qq(rehtona{tsuJbus#;
$_=reverse,s+(?<=sub).+q#q!'"qq.\t$&."'!#+sexisexiixesixeseg;y~\n~~dddd;eval


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

Date: Mon, 24 Feb 2003 21:37:14 +1100
From: Martien Verbruggen <mgjv@tradingpost.com.au>
Subject: Re: Use or not to use modules [was: How do I ...]
Message-Id: <slrnb5jteq.2fm.mgjv@martien.heliotrope.home>

On 23 Feb 2003 14:48:48 GMT,
	Abigail <abigail@abigail.nl> wrote:
> Tad McClellan (tadmc@augustmail.com) wrote on MMMCDLXIII September
> MCMXCIII in <URL:news:slrnb5g7hi.32m.tadmc@magna.augustmail.com>:
> ()  Andrew Lee <spamtrap@nowhere.com> wrote:
> ()  
> () > I would not want to program C without
> () > libraries.
> ()  
> ()  
> ()  I don't believe it is possible to write a useful C program
> ()  without libraries.
> ()  
> ()  Can a program that does no I/O be useful?
> 
> 
> You can do I/O in C without libraries.

No, you can't. All I/O in C happens through functions provided by the C
library, and the function prototypes can be found in stdio.h. 

> How do *you* think the C libraries do I/O?

By using system calls, assembly, direct writes to system specific
hardware addresses, or other implementation-specific tricks which are
hidden to the C programmer, precisely because they are
implementation-specific. Some C library functions are implemented in C,
but at least one of them will have to do system specific stuff.

The Unix system calls, and other stuff, are not C. They are system calls
to the Unix kernel, which happen to have a C interface. Important
distinction.

Martien
-- 
                        | 
Martien Verbruggen      | 
                        | Hi, Dave here, what's the root password?
                        | 


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

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.  

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


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