[17841] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Jan 5 14:05:40 2001

Date: Fri, 5 Jan 2001 11:05:08 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <978721508-v10-i1@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Fri, 5 Jan 2001     Volume: 10 Number: 1

Today's topics:
    Re: $ENV{'QUERY_STRING'} Question <joe+usenet@sunstarsys.com>
    Re: [Q] matching many regular expressions [..] <ian.trudel@tr.cgocable.ca>
    Re: Any good Perl books? (Richard Zilavec)
    Re: Any good Perl books? (David H. Adler)
        Compiling perl scripts which use DBI with Oracle DBD on (Arek P)
        Directory monitoring canderson69@my-deja.com
    Re: Downgrading Perl (Steve Harvey)
    Re: evaluating character-literals (Tad McClellan)
    Re: evaluating character-literals (Tad McClellan)
    Re: FAQ 7.9:   How do I create a module? (Tad McClellan)
    Re: FAQ 7.9:   How do I create a module? (BUCK NAKED1)
        Pb with Perl 5.6.0 executing cgi <jlbeaudet@pathe.fr.kodak.com>
    Re: Pb with Perl 5.6.0 executing cgi (Rafael Garcia-Suarez)
    Re: perl and zombies (Martien Verbruggen)
    Re: perl and zombies (Mark Jason Dominus)
    Re: printing results from dbi script to html page <ronald.e.buchanan@irs.gov>
    Re: Remote Controll other windows software by Perl <news@NOSPAMjstrom.cjb.net>
    Re: Remote Controll other windows software by Perl roger_corbec@my-deja.com
    Re: Remote Controll other windows software by Perl <bart.lateur@skynet.be>
    Re: Remote Controll other windows software by Perl <founder@pege.org>
    Re: Remote Controll other windows software by Perl <founder@pege.org>
    Re: Reposting - Pattern match in an array of strings <dperham@dperham.eng.tvol.net>
    Re: Reposting - Pattern match in an array of strings <bart.lateur@skynet.be>
        Running setuid Perl scripts <tomedmond@lucent.com>
    Re: Search Engine - matching file from list of files (Tad McClellan)
    Re: Set IE5 default homepage WITHOUT JavaScript (Maggert)
    Re: Set IE5 default homepage WITHOUT JavaScript <bart.lateur@skynet.be>
        Thank You! <heidi@nospamtreesforlife.org>
        Using C code in Perl <ruittenb@best.ms.philips.com>
    Re: Using C code in Perl (Bernard El-Hagin)
    Re: Using C code in Perl <Jochen.Stenzel.gp@icn.siemens.de>
    Re: Using C code in Perl (Tad McClellan)
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: 05 Jan 2001 11:18:53 -0500
From: Joe Schaefer <joe+usenet@sunstarsys.com>
Subject: Re: $ENV{'QUERY_STRING'} Question
Message-Id: <m3ofxm2cr6.fsf@mumonkan.sunstarsys.com>

Ilmari Karonen <iltzu@sci.invalid> writes:

> Martien Verbruggen wrote:
> >On 4 Jan 2001 10:42:15 GMT,
> >	Ilmari Karonen <iltzu@sci.invalid> wrote:
> >>>On 3 Jan 2001 13:09:59 GMT,
> >>>	Ilmari Karonen <iltzu@sci.invalid> wrote:
> >>>> 
> >>>>   $q =~ s/[^ \w]/sprintf '%%%02X', ord $&/eg;
> >>>>   $q =~ tr/ /+/;
> >>>
>  [snip]
> >> 
> >>   $query =~ tr/+/ /;
> >>   $query =~ s/%([\dA-F][\dA-F])/chr hex $1/ieg;
> >> 
>  [snip]
> >
> >That's not the point. The point is that any escape sequence is allowed
> >to be used in a query string, regardless of whether it's reserved or
> >not. If I decide to escape the hypen, or _, or ~, then your CGI program
> >_should_ correctly deal with it. if you only implement partial decoding,
> >then you won't do everything correctly.
> 
> Um, if that's your point then obviously we agree.  I just don't see
> why you brought it up, since the two-liners I posted are both fully
> RFC 2396 compliant, nothing "partial" about it.  (They do assume ISO
> 8859-1 character encoding and no locale.)  Did you actually read them?

Your "two-liners" also implicitly assume that you're escaping 
the query string. RFC2396 says nothing about "URI equivalence" 
outside the unreserved characters, and declaring "%20" (escaped 
spaces) equivalent to "+" in your encoding-decoding algorithm 
is *not* part of the spec.  Most notably, the universally-adopted 
convention you're using here does *not* apply to the path portion 
of the URI (but this isn't discussed in RFC2396, either).

Separating parameter definitions by interleaving "=" with [&;] 
is also pure convention. There's nothing in the RFC that prevents 
you from desigining your own CGI handler to parse it this way:

http://mysite/cgi+bin/script.pl?a,ok?query,%2b=2b+or+!2b?ru,amused?#not!

But you'd just wind up with a wooden-wheeled website that has
no simple upgrade path.

Besides incorporating all commonly used conventions, CGI.pm
also includes workarounds for a number of platform-specific
bugs (both client and server-side).  Getting a feel for the
CGI module in a simple case like the OP was considering is 
*always* a good idea.

-- 
Joe Schaefer


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

Date: Fri, 05 Jan 2001 14:05:04 GMT
From: "Ian Trudel" <ian.trudel@tr.cgocable.ca>
Subject: Re: [Q] matching many regular expressions [..]
Message-Id: <kwk56.1256$Br2.124963@carnaval.risq.qc.ca>

"Anno Siegel" <anno4000@lublin.zrz.tu-berlin.de> a écrit dans le message
news: 934jlc$pbc$10@mamenchi.zrz.TU-Berlin.DE...
> Ian Trudel <ian.trudel@tr.cgocable.ca> wrote in comp.lang.perl.misc:
> >"Anno Siegel" <anno4000@lublin.zrz.tu-berlin.de> a écrit dans le message
> >news: 934g0r$pbc$8@mamenchi.zrz.TU-Berlin.DE...
> >> Ian Trudel <ian.trudel@tr.cgocable.ca> wrote in comp.lang.perl.misc:
>
> >Thanks for the pointer. I have read the perlre document on (?{ <code> }).
It
> >says PERL will evaluate any PERL expression, but beside affectation and
some
> >prints', I was unable to put condition within it. The document refers to
> >(?(condition)yes-pattern|no-pattern), which could also be interesting. As
if
> >the condition is met, the yes pattern is the next pattern to evaluate. If
it
> >is not met, you can omit the no pattern (or make it fails?) and the whole
> >expression will fail [since it won't match]. However, yet again, I was
> >unable to write the proper code. Honestly, I'm a PERL newbie with good
> >understanding of programming languages concepts. ::)
> >
> >Can you provide me help on this?
>
> Sorry, no.  After seeing that the remark about this being "experimental"
> isn't only cautionary (it actually doesn't work as expected in some
> cases), I decided not to play with it any more.  Just one hint, if
> you are going to take the risk:  If you use variables to transport
> information out of the embedded code, use package variables, not lexicals.
> They seem to work more reliably.

The experimental note didn't made me feel good either. I will work on what I
have in hands or look forward another solution. Thanks for all.

regards,
Ian
--
----------------------------------------------------------------
*squeak* *squeak* said the little mouse while eating a java hog.
Ian Trudel, mailto:ian.trudel@tr.cgocable.ca




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

Date: Fri, 05 Jan 2001 15:03:04 GMT
From: rzilavec@tcn.net (Richard Zilavec)
Subject: Re: Any good Perl books?
Message-Id: <3a56df5f.175204545@news.tcn.net>

On 4 Jan 2001 14:52:58 GMT, abigail@foad.org (Abigail) wrote:

>Bad ones:  Learning Perl

I think I might have put this with the good ones, it gave me enough
information to feel good about Perl and a basic understanding of what
it was capable of doing.

>           Advanced Perl Programming
>	   Perl in a nutshell
>	   Perl for System Administration
>	   Mastering Algorithms with Perl

These I have only browsed through in stores, I just could find a
reason to purchase any of the above, but then I have a few books on
data structures and algorithms from school left over.

>Good ones: The Camel

Yes, this is a very good book.

>           The Cookbook

This is also a great book but it drives me nuts when people add code
from it to their programs without any understanding how it works.

--
 Richard Zilavec
 rzilavec@tcn.net


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

Date: 5 Jan 2001 18:02:11 GMT
From: dha@panix2.panix.com (David H. Adler)
Subject: Re: Any good Perl books?
Message-Id: <slrn95c313.fp.dha@panix2.panix.com>

On Fri, 05 Jan 2001 15:03:04 GMT, Richard Zilavec <rzilavec@tcn.net>
wrote:

>On 4 Jan 2001 14:52:58 GMT, abigail@foad.org (Abigail) wrote:

>>Bad ones:  Learning Perl
>
>I think I might have put this with the good ones, it gave me enough
>information to feel good about Perl and a basic understanding of what
>it was capable of doing.

I think this one is the item in the list most open to opinion.  I
happen to like it.  Nevertheless, it is not necessarily the best book
for everyone to learn perl from.  It certainly wouldn't be my
recommendation for anyone who has never programmed.

This is a point on which Abigail and I disagree, but I wouldn't go so
far as to claim that she is *wrong*... we just differ.

dha, agreeing to disagree

-- 
David H. Adler - <dha@panix.com> - http://www.panix.com/~dha/
It's amazing what giant mutant ants that are the result of Man's
dabbling with the power of atomic energy can accomplish when they set
themselves to the task.	   - Mark Rogaski


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

Date: Fri,  5 Jan 2001 11:02:25 EST
From: Arek@nospam.tv (Arek P)
Subject: Compiling perl scripts which use DBI with Oracle DBD on NT; is it possible with perl2exe or any other compiler?
Message-Id: <934r6h$5nm$1@earth.superlink.net>

I was hoping to be able to make stand alone application 
(on NT box) which uses DBI to connect to oracle db; I was able to 
create those (with perl2exe) using odbc, but cannot get it to work
with DBI; I tried to specify Dbi location with 
use lib 'path/here'
but the compiler ommits it, exe file gets produced and it works until
it hits dbi calls; 
Does any one know if this is even possible?  

				ArekP


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

Date: Fri, 05 Jan 2001 16:01:58 GMT
From: canderson69@my-deja.com
Subject: Directory monitoring
Message-Id: <934r5f$mad$1@nnrp1.deja.com>

I know that a UNIX directory can be monitored via
stat() for any modifications... but that requires
a delay and periodically checking mtime. Is there
some kind of blocking function that will cause a
perl script to sleep until a directory is
modified? Thanks.


Sent via Deja.com
http://www.deja.com/


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

Date: 5 Jan 2001 14:36:21 GMT
From: steveharvey@geocities.com (Steve Harvey)
Subject: Re: Downgrading Perl
Message-Id: <934m55$irs$1@bob.news.rcn.net>

In article <3A54EC99.39B07644@lclcan.com>, Don wrote:
>Hi,
>
>It seems because of a bug in Perl 5.6, I have to downgrade to a previous
>release.  I'm working on a RedHat 7.0 machine.  How do I cleanly remove
>Perl 5.6 and install the previous release which I believe is 5.005_03?


If you installed Perl as an RPM package, you should be able to remove it by
logging in as root and typing:

# rpm -q perl

(returns the package name of the installed version of perl, if you don't
already know it)

# rpm --uninstall perl5.6

(or whatever the package version returned by -q is).


Please read the rpm man page before you do this so you understand what
you're doing.


-Steve



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

Date: Fri, 5 Jan 2001 07:24:31 -0500
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: evaluating character-literals
Message-Id: <slrn95bf7v.p2g.tadmc@magna.metronet.com>

Felix Drueke <fd@orga.com> wrote:
>
>I have a little problem with character-literals:


No, you have a problem distinguishing between what is "code"
and what is "data".

"character literals" are a concept valid only for "code" because
the parser can "do stuff" with code, data it just passes through
blindly (mostly).


>fd@fdrueke2:~/perl/tmp > cat littest1.pl 

>$_=<FH>;


The \012 are just 4 data characters in a string read from the file.

\012 represents Line Feed (probably) in double quoted strings. 
Data read from a file is not a double quoted string.


>$_ = "abcdef\012fedcba";


Now it is "code", so the perl parser gets a shot at doing
"double quotish" things.

>fd@fdrueke2:~/perl/tmp > cat file
>abcdef\012fedcba
>fd@fdrueke2:~/perl/tmp > perl littest1.pl 
>abcdef\012fedcba
>fd@fdrueke2:~/perl/tmp > perl littest2.pl 
>abcdef
>fedcba

>Why does littest1.pl does not output the same as littest2.pl ?


Because the \012 is "data" in littest1.pl and it is "code" in littest2.pl.


>Is there a way to evaluate the \012 when it is read from a file?
>The evaluation seems only to work, if it is assigned directly to a 
>variable. 


No, the "data" must be converted to "code" before double-quotish
things will happen. 


>But I want to read a string from a file and would like to have the
>characters "\012" replaced by the according character (newline).


If your data is encoded in some way, then it is up to you do decode it:

   s/\\(\d{3})/ chr(oct $1) /ge;   # convert "escapes"

or, probably better:

   s/\\([0-7]{3})/ chr(oct $1) /ge;   # convert "escapes"


-- 
    Tad McClellan                          SGML consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


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

Date: Fri, 5 Jan 2001 08:07:40 -0500
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: evaluating character-literals
Message-Id: <slrn95bhos.p61.tadmc@magna.metronet.com>

Martien Verbruggen <mgjv@tradingpost.com.au> wrote:

>Unless you can release Visual Perl++ soon. We need some buttons to
>click.


It would be very nice to be able to pay money to get relief
when the click-libido gets unbearable (but be on the lookout
for Vice Officers), but why we *really* need VP++ is so that 
there will be a help desk for the (l)users, to draw them away 
from this help de^H^H^H^H^H^H newsgroup.


-- 
    Tad McClellan                          SGML consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


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

Date: Fri, 5 Jan 2001 07:34:31 -0500
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: FAQ 7.9:   How do I create a module?
Message-Id: <slrn95bfqn.p2g.tadmc@magna.metronet.com>

BUCK NAKED1 <dennis100@webtv.net> wrote:

>Perldoc doesn't thoroughly explain how to install modules either. 


perldoc does not explain anything about anything.

It just shows you some documentation. It is a program, not data.

You seem to be discussing some documentation that it presented
to you. Maybe it was perlmodinstall or something, but you
haven't indicated what standard doc it is that you are
speaking of.

Now that you have recognized some places where perlmodinstall is
less than helpful, you have a "working list" to guide you when
you make the doc patches.


>Not
>all modules are created [or installed] equally. 


Then the place for documenting ones that are "different" would
be in the module documentation, not in the general purpose
documentation.


>And just how do "you"
>install modules without using telnet or CPAN.pm? 


I ftp the tarball, unzip it, read the README, and type the
Four Commands at the terminal that I am logged in on.

That sounds like "locally" to me. If you need to install it
"remotely" (i.e. on a computer different from the one that you
are logged in on) _then_ you need telnet or similar.

Sounds like you are not talking about installing "locally" at all
since you are fixated on the "must have telnet" thing.


>(If I'm incorrect, I
>got that tidbit about needing telnet to do it, by searching deja for
>this group. I must've read a post with incorrect info.) 


I would be willing to bet that the post had *correct* info and
that you have just misinterpreted it. Got a pointer to the
post that you are referring to?


-- 
    Tad McClellan                          SGML consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


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

Date: Fri, 5 Jan 2001 12:11:32 -0600 (CST)
From: dennis100@webtv.net (BUCK NAKED1)
Subject: Re: FAQ 7.9:   How do I create a module?
Message-Id: <27281-3A560E54-12@storefull-246.iap.bryant.webtv.net>

Yes, I've installed a couple of modules, but as a beginner in perl, I
don't think I'm  qualified to write documentation. Thanks for your
confidence, though. :)

I have always used a telnet script to install modules, and know of no
other way to do it. FWIW, my webhost doesn't have CPAN.pm, and I think
you need to be root to install CPAN.pm anyway.

Uri made some good points. However, the real reason that I posted to
this particular FAQ article is because this topic is a real sore spot
with me. It took me months of research, after reading the perldocs and
FAQ, and asking questions here on "how do I install a module locally",
to finally find out all that I needed to know in order to properly
install a module... and I still have problems doing it, at times.

IOW, there's often more to installing a module than just doing "perl
Makefile.PL lib=~/direc/path," "make," "make test," and "make install."
Also, the individual modules don't usually offer any additional
installation help in their README's, other than the usual "perl
Makefile.PL, make, etc." 

For one thing, the "use lib" path you put into your script file is
sometimes difficult to determine. For another, what garbage messages are
to be ignored when installing, and which ones should be heeded?

The FAQs, perldocs, etc. are definitely a good resource. I use them
often. My point is just that they are not the "end-all", as many people
here tend to imply. 

I agree that it is probably too much info to put in a FAQ. After a vast
search of the web, the best I could find on "installing modules" were
articles at About.com and Raytheon. Perhaps, someone needs to write a
thorough and detailed webpage about the entire process of installing
modules. I wish I knew how.

Regards,
Dennis

JAPB [ just  another perl beg-inner ]
 



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

Date: Fri, 05 Jan 2001 15:33:20 +0000
From: Jean-Luc BEAUDET <jlbeaudet@pathe.fr.kodak.com>
Subject: Pb with Perl 5.6.0 executing cgi
Message-Id: <3A55E940.ECB78D2B@pathe.fr.kodak.com>



Hi every body

Happy new year all of us!

Well. Go back to work...

Currently:
SOLARIS 7 on SUN Ultra5 station
Apache 1.3.14 installed dynamically (all DSO)
Perl 5.6.0

I want CGI scripts written with perl running under Apache.
Each time i try a real script perl ( "!/usr/local/bin/perl)
I get a big Internal Server Error
And the log file give me lines below:

ld.so.1: /usr/local/bin/perl5: fatal: libgdbm.so: open failed: No such
file or directory
[Thu Jan  4 19:30:22 2001] [error] [client 150.248.8.211] Premature end
of script headers: /home/jlbeaudet/cgi-bin/ListEnv.cgi

My script ListEnv.cgi runs good in a shell (sh/ksh)

The libgdbm.so stays in /usr/local/lib and my LD_LIBRARY_PATH feels OK.

Someone help to find out wath's goin' on ???

Best regards.

JLB :O(



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

Date: Fri, 05 Jan 2001 14:49:38 GMT
From: rgarciasuarez@free.fr (Rafael Garcia-Suarez)
Subject: Re: Pb with Perl 5.6.0 executing cgi
Message-Id: <slrn95bno7.qp6.rgarciasuarez@rafael.kazibao.net>

Jean-Luc BEAUDET wrote in comp.lang.perl.misc:
> 
> Currently:
> SOLARIS 7 on SUN Ultra5 station
> Apache 1.3.14 installed dynamically (all DSO)
> Perl 5.6.0
> 
> I want CGI scripts written with perl running under Apache.
> Each time i try a real script perl ( "!/usr/local/bin/perl)
> I get a big Internal Server Error
> And the log file give me lines below:
> 
> ld.so.1: /usr/local/bin/perl5: fatal: libgdbm.so: open failed: No such
> file or directory
> [Thu Jan  4 19:30:22 2001] [error] [client 150.248.8.211] Premature end
> of script headers: /home/jlbeaudet/cgi-bin/ListEnv.cgi
> 
> My script ListEnv.cgi runs good in a shell (sh/ksh)
> 
> The libgdbm.so stays in /usr/local/lib and my LD_LIBRARY_PATH feels OK.

And the LD_LIBRARY_PATH of the user that runs apache?
Try this CGI program to find out:
#!/bin/sh
echo $LD_LIBRARY_PATH

-- 
# Rafael Garcia-Suarez / http://rgarciasuarez.free.fr/


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

Date: Sat, 6 Jan 2001 01:19:50 +1100
From: mgjv@tradingpost.com.au (Martien Verbruggen)
Subject: Re: perl and zombies
Message-Id: <slrn95bm06.suo.mgjv@martien.heliotrope.home>

On Fri, 05 Jan 2001 14:01:09 GMT,
	Mark Jason Dominus <mjd@plover.com> wrote:
> In article <slrn95bjp4.suo.mgjv@martien.heliotrope.home>,
> Martien Verbruggen <mgjv@tradingpost.com.au> wrote:
>>perl 5.6 on linux 2.2.16-3, glibc 2.1.3, no defunct processes:
>>
>>#!/usr/local/bin/perl -w
>>use strict;
>>open(TIME, "/bin/date |") or die "Can't fork: $!";
> 
> Try removing the 'die', and with a bad path for the 'date' command.

Changed all dies to warnings, and used a wrong path for date, and
indeed, zombie confirmed.

It's a bug, but I'd probably call it a minor one. Not checking for
errors causes problems :)

Martien
-- 
Martien Verbruggen              | 
Interactive Media Division      | If at first you don't succeed, try
Commercial Dynamics Pty. Ltd.   | again. Then quit; there's no use
NSW, Australia                  | being a damn fool about it.


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

Date: Fri, 05 Jan 2001 14:28:27 GMT
From: mjd@plover.com (Mark Jason Dominus)
Subject: Re: perl and zombies
Message-Id: <3a55da0a.4e99$159@news.op.net>

In article <slrn95bm06.suo.mgjv@martien.heliotrope.home>,
Martien Verbruggen <mgjv@tradingpost.com.au> wrote:
>It's a bug, but I'd probably call it a minor one. Not checking for
>errors causes problems :)

I don't think you have thought this through.  "Not checking for
errors" is irrelevant.  Change the 'die' to 'warn' and it still leaves
a zombie.



-- 
@P=split//,".URRUU\c8R";@d=split//,"\nrekcah xinU / lreP rehtona tsuJ";sub p{
@p{"r$p","u$p"}=(P,P);pipe"r$p","u$p";++$p;($q*=2)+=$f=!fork;map{$P=$P[$f|ord
($p{$_})&6];$p{$_}=/ ^$P/ix?$P:close$_}keys%p}p;p;p;p;p;map{$p{$_}=~/^[P.]/&&
close$_}%p;wait until$?;map{/^r/&&<$_>}%p;$_=$d[$q];sleep rand(2)if/\S/;print


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

Date: Fri, 05 Jan 2001 14:30:07 -0000
From: REBUCH00 <ronald.e.buchanan@irs.gov>
Subject: Re: printing results from dbi script to html page
Message-Id: <t5bmjf1cikfr87@corp.supernews.com>


GooglePlexed wrote:
> 
> 
> Did you try this before sending your output:
> 
> print "Content-type:text/html\n\n";
> 
> ?
> 
> 
> --
> j-enterprises.com...
> custom software solutions for the enterprise
> 
> 
> Sent via Deja.com
> http://www.deja.com/


I modified the script to...

#!D:/PERL/BIN/PERL
use DBI;
print "Content-type:text/html\n\n";
#open connection to Access database
$dbh = DBI->connect("DBI:ODBC:top21","Admin","");

#prepare and execute SQL statement
$sqlstatement="SELECT problem FROM TICKET_CODING WHERE problem LIKE '%
CONNECT%'";
$sth = $dbh->prepare($sqlstatement);
$sth->execute || 
      die "Could not execute SQL statement ... maybe invalid?";

#output database results
while (@row=$sth->fetchrow_array)
 { print "@row\n" }

From the Browser All I get is 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=windows-1252" http-equiv=Content-
Type></HEAD>
<BODY></BODY></HTML>

From the command line I get the results...

Content-type:text/html

PROBLEM WITH USER CONNECTING  - UNKNOWN or SOFTWARE Settings
PROBLEMS WITH USER CONNECTING  - Problem with Phone line
PROBLEMS WITH USER CONNECTING  - Problem with HARDWARE
NO LOGIN PROMPT - CAN connect to other applications
NO LOGIN PROMPT - CANNOT connect to other applications
PROBLEMS PRINTING VIA TERMINAL EMULATOR (POWERTERM/INFO CONNECT)
NO CONNECTIVITY - CAUSE UNKNOWN or CIRCUIT
NO CONNECTIVITY - CAUSE UNKNOWN or CIRCUIT



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


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

Date: Fri, 05 Jan 2001 14:34:25 GMT
From: <news@NOSPAMjstrom.cjb.net>
Subject: Re: Remote Controll other windows software by Perl
Message-Id: <RXk56.3837$Qb7.501351@newsb.telia.net>

You have to make and install another program on the windows computer... And
then i would recomend using sockets to commincate...

"Mösl Roland" <founder@pege.org> skrev i meddelandet
news:3a55b42b$1$9846@SSP1NO25.highway.telekom.at...
> I would like to
>
> open Paint Shop Pro
> open some picture.jpg
> Save as some_picture_print.jpg
> resize, width=600
> Save as PARAMETER2.jpg
> resize, height=80
> Save as PARAMETER2_dir.jpg
>
> I had once under Windows 3.1 a script
> which converted several hundred pictures
> from a POV video into other format.
>
> So there should be something like this
> for Win 98 also where I can remote controll
> with Perl other Windows software.
>
> Is there any modul for this task?
>
> --
> Mösl Roland founder@pege.org
> http://www.pege.org clear targets for a confused civilization
> http://www.BeingFound.com web design starts at the search engine
>
>
>
>
>




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

Date: Fri, 05 Jan 2001 16:08:37 GMT
From: roger_corbec@my-deja.com
Subject: Re: Remote Controll other windows software by Perl
Message-Id: <934rhs$mpa$1@nnrp1.deja.com>

I believe the NT Reskit comes with a tool called "rcmd" (remote command)
which if installed can be used to initiate remote dos sessions.


> Question remains:
> how can one run an application on a remote NT or windows machine ? I
am
> very interested in this. I tries using telnet but that seems to be a
> nogo. In my case I only need to run cmd-line apps.
>
> Ronald
> http://ronr.nl/unix-dba
> The best way to accellerate a computer 'running' windows is by
> gravitation
>
> Sent via Deja.com
> http://www.deja.com/
>


Sent via Deja.com
http://www.deja.com/


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

Date: Fri, 05 Jan 2001 18:14:01 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: Remote Controll other windows software by Perl
Message-Id: <6a3c5tc3uholqi2au2b2d3emsuc8eopdk7@4ax.com>

Ronald J.H. Rood wrote:

>Question remains:
>how can one run an application on a remote NT or windows machine ? I am
>very interested in this.

What this, IMO, has in common with the original question, is that it
might be well possible to do it with Win32::OLE. The other app needs to
have a "(D)COM object model" implemented. See the docs for Win32::OLE at
<http://theoryx5.uwinnipeg.ca/CPAN/data/libwin32/OLE/Win32/OLE.html>.

In particular, remotely controlling an app needs DCOM. Search the doc at
the above URL for "DCOM", and you'll stumble across it.

-- 
	Bart.


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

Date: Fri, 5 Jan 2001 19:09:45 +0100
From: "Mösl Roland" <founder@pege.org>
Subject: Re: Remote Controll other windows software by Perl
Message-Id: <3a560f28$0$17062@SSP1NO25.highway.telekom.at>

<news@NOSPAMjstrom.cjb.net> wrote in message
news:RXk56.3837$Qb7.501351@newsb.telia.net...
> You have to make and install another program on the windows computer...
And
> then i would recomend using sockets to commincate...

I have absolut no idea about what You are talking.

What program?
Where are examples?


--
Mösl Roland founder@pege.org
http://www.pege.org clear targets for a confused civilization
http://www.BeingFound.com web design starts at the search engine




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

Date: Fri, 5 Jan 2001 19:52:14 +0100
From: "Mösl Roland" <founder@pege.org>
Subject: Re: Remote Controll other windows software by Perl
Message-Id: <3a5618c8$0$16006@SSP1NO25.highway.telekom.at>

"Martien Verbruggen" <mgjv@tradingpost.com.au> wrote in message
news:slrn95befk.t2v.mgjv@martien.heliotrope.home...
> [comp.lang.perl removed. That group is long dead, please informa your
> news admin]
>
> On Fri, 5 Jan 2001 12:47:18 +0100,
> Mösl Roland <founder@pege.org> wrote:
> > I would like to
> >
> > open Paint Shop Pro
> > open some picture.jpg
> > Save as some_picture_print.jpg
> > resize, width=600
> > Save as PARAMETER2.jpg
> > resize, height=80
> > Save as PARAMETER2_dir.jpg
>
> You will have to read the documentation on Paint Shop Pro to see how > you
> interact with it if you don't have a mouse.

I have in web design always the same routine task.

Save pictrue as name_print.jpg
resize to 600 width
Save picture as name.jpg
resize to 80 height
Save picture as name_dir.jpg

Since it are several 1000 pictures, I do not like
to click though the same idiot job again and again.

> Why do you need to use Paint Shop Pro? Image::Magick does all of the
> above, and does it from within Perl.

Because I want to have such a keystroke, mouse
emulator also to remote controll other software like
WinZip

> You can get Image::Magick from http://www.imagemagick.org/. Somewhere
> there's a link to download stuff, and there should be Win32 binaries
> available.
>
> > I had once under Windows 3.1 a script
> > which converted several hundred pictures
> > from a POV video into other format.
>
> POV video? DO you mean some animation in some format as spit out by
> povray or so?

I did a 20 second video with 500 pictures for Austrian television
in 1994. So I had to convert 500 pictures.

> > So there should be something like this
> > for Win 98 also where I can remote controll
> > with Perl other Windows software.
>
> That is an entirely different kettle of fish. You used to have a script
> that did something to images, so you conclude that there has to be
> something that allows you to remotely control windows software from
> Perl? What an odd logical step. It may very well be true, but I still
> don't see how they follow.

What is here unlogical?

I had on Windows 3.1 several task automated.

Now I have Windows 98 SE and have to click
around again and again for tasks, it was easy to
automat with Windows 3.1

> Take my advice: If you need to do serious work with images from Perl,
> get ImageMagick.

I will look at it


--
Mösl Roland founder@pege.org
http://www.pege.org clear targets for a confused civilization
http://www.BeingFound.com web design starts at the search engine




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

Date: 05 Jan 2001 09:59:41 -0500
From: Doug Perham <dperham@dperham.eng.tvol.net>
Subject: Re: Reposting - Pattern match in an array of strings
Message-Id: <81wvcaujs2.fsf@wgate.com>

Rocky Raccoon <rrocky@bigfoot.com> writes:

> If I have an array of strings, say
> @x = ("Hello\n", "World\n", "Hello to\n", "World");
> 
> I want to search for the string "Hello World".
> I should get found for @x[0], @x[1], but not found for @[2] , @[3]
> (because World doesn't follow to immediately).
> 
> What's the best way to do it ?
> chomp each line,

no need to chomp (otherwise you'd be eliminating the white space you
need in your pattern match)
 
> ... concatenate everything 

yes, that sounds reasonable.

> ... & then search for the pattern
> (/Hello\s+World/) or someother easier way. 

I don't know the exact pattern you'll be using, but if you employ
the '.' pattern in your match, then be sure to use the "s" option at the
end of your match expression so that it doesn't stop at the embedded
newlines. 

> I am not really interested in where it occurs, just whether it occurs
> or not. 
> 
> -- 
> Rocky
> RSC - http://www.slack.net/~shiva/rsc.html

-- 
Doug Perham                                          o{..}o     
dperham@wgate.com                                moo! (oo)___   
WorldGate Communications, Inc.                        (______)\ 
                                                      / \  / \  



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

Date: Fri, 05 Jan 2001 16:57:29 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: Reposting - Pattern match in an array of strings
Message-Id: <2rub5t8m0gcd7amb0d2g932l6burjapn9o@4ax.com>

Rocky Raccoon wrote:

>If I have an array of strings, say
>@x = ("Hello\n", "World\n", "Hello to\n", "World");

I'm not sure why you don't just make this:

  @x = ("Hello", "World", "Hello to", "World");

A single chomp() on the array will do that. You read this data from a
file, or what?

>I want to search for the string "Hello World".
>I should get found for @x[0], @x[1], but not found for @[2] , @[3]
>(because World doesn't follow to immediately).

You must have ment @x[2], @x[3]. But even that is suboptimal (and under
-w perl will complain about it), because you're using an array slice
('@' prefix) for a sinbgle item. use $x[0] etc. instead.

>What's the best way to do it ?
>chomp each line, concatenate everything & then search for the pattern
>(/Hello\s+World/) or someother easier way. 

Your spacification is too vague. What's so special about ("Hello",
"World") that doesn't exist for ("World", "Hello to")? Do you want to
treat your data in pairs?

Anyway, here's a thought:

	if(/$x[0]/g && /\G\s*$x[1]/g) {
		print "Found \"@x[0, 1]\"!\n";
	}

You need the /g modifier because that's the only way you can continue
matching, i.e. the second pattern continues where the first one stopped.

You can't use that /o modifier, and that's unfortunate for speed
reasons, if you want to loop through several pattern pairs.

-- 
	Bart.


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

Date: Fri, 05 Jan 2001 16:51:01 +0000
From: Thomas Edmond <tomedmond@lucent.com>
Subject: Running setuid Perl scripts
Message-Id: <3A55FB75.5D344CEB@lucent.com>

Hello,


I'm trying to run a Perl script from another program which is part of
our configuration and change management control system (called Sablime)
- this overall C&CMCS allows individual commands to run external scripts
as pre-<command_name> and post-<command_name> triggers - this command
and its trigger are run suid of the owner of the C&CMCS (not the user 
running the command)

My pre-<command> trigger script is a ksh script which extracts a Framemaker
file from theC&CMCS, turns it into text and then calls my perl script which
then parses it to extract relevant information.
The suid is causing me great problems - the perl script bombs out with fatal
errors due to "Insecure $ENV{PATH}..." problems.

I have tried most of the suggestions in Ch. 6 of the "bible", notably running
a forked process with UID set back to the user running the command but with
little success - it partially works when I run all the &Date_<??>" functions
inside the perl script as forked processes but I seem to get double the output
(one half correct, the other with errors although working on the same file)

Before I go and rewrite the parser in ksh (or awk or 'C'), has anybody got a
good (practical) example of this kind of thing working ??

BTW - perl versions 5.004 and 5.6.0 tried - same result


Cheers


Tom Edmond


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

Date: Fri, 5 Jan 2001 06:36:13 -0500
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Search Engine - matching file from list of files
Message-Id: <slrn95bcdd.oqr.tadmc@magna.metronet.com>

Renegade Master <renegade.master@dial.pipex.com> wrote:
>
>"Tad McClellan" <tadmc@metronet.com> wrote in message
>news:slrn959a1v.n9e.tadmc@magna.metronet.com...
>> Renegade Master <renegade.master@dial.pipex.com> wrote:
>> >
>> >I've got a search engine script running in Perl. What I'm trying to do is
>> >add the capability to have a list of "excluded" files.
>>
>> Load up a hash with the to-be-skipped filenames as hash keys
>> (hash values don't matter at all), then use exists() to
>> see if the current dir is a key in the hash:

>Excellent, thanks for the help Tad!


Note that my answer was just an adaptation of the answer
to this Perl FAQ:

   "How can I tell whether a list or array contains a certain element?"


-- 
    Tad McClellan                          SGML consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


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

Date: Fri, 05 Jan 2001 14:25:08 GMT
From: mag@ionet.net (Maggert)
Subject: Re: Set IE5 default homepage WITHOUT JavaScript
Message-Id: <3a55d816.36883966@news.ionet.net>

On Fri, 05 Jan 2001 05:26:10 GMT, foopah@my-deja.com wrote:


>I don't think yahoo is using javascript, because they never
>return/display a page... so something has to be done before they print
>the "Location: http://www.yahoo.com\n\n" thing.  Similar to how you
>would set a cookie.
>

	Well javascript is executed client side which would account
for them not having to load another page.
	What you're asking for doesn't exist on the server. It exists
on the client only so javascript or perhaps Java is the only way
you'll get what you're looking for.




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

Date: Fri, 05 Jan 2001 17:00:01 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: Set IE5 default homepage WITHOUT JavaScript
Message-Id: <vavb5tokcfv1v9a35hoauq6iasvh10npb3@4ax.com>

foopah@my-deja.com wrote:

>I'm looking to find a way to set the default homepage for a browser
>without using javascript.

AFAIK you can't change the browser's settings with a server side script.
Therefore, you NEED a client side scripting system. It would depend on
the browser, but that's OT for this newsgroup. 

-- 
	Bart.


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

Date: Fri, 05 Jan 2001 16:11:55 GMT
From: "hmm" <heidi@nospamtreesforlife.org>
Subject: Thank You!
Message-Id: <fnm56.32308$aI6.4605549@typhoon.kc.rr.com>

Thanks for the variety of responses to my beginner question.
The one I used worked like a charm!




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

Date: Fri, 05 Jan 2001 16:15:32 +0100
From: ruittenb <ruittenb@best.ms.philips.com>
Subject: Using C code in Perl
Message-Id: <3A55E514.FB62B208@best.ms.philips.com>

Hello everybody!

I've got a little problem which is the following :
I've got some C/C++ functions that I want to use in a perl program, but
I can't figure out how and if this is possible.
If you look at the standard .pm modules that you can download from CPAN,
there are some that use C code internally... I've been looking at these
programs awhile, but I can't seem to work out how to do it by myself.
Can anybody give me information about how to do this?
Thanks in advance,

Robert

robert.uittenbosch@philips.com



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

Date: Fri, 5 Jan 2001 15:21:14 +0000 (UTC)
From: bernard.el-hagin@lido-tech.net (Bernard El-Hagin)
Subject: Re: Using C code in Perl
Message-Id: <slrn95bpj2.2q0.bernard.el-hagin@gdndev25.lido-tech>

On Fri, 05 Jan 2001 16:15:32 +0100, ruittenb
<ruittenb@best.ms.philips.com> wrote:
>Hello everybody!

Hiyah.

>I've got a little problem which is the following :
>I've got some C/C++ functions that I want to use in a perl program, but
>I can't figure out how and if this is possible.
>If you look at the standard .pm modules that you can download from CPAN,
>there are some that use C code internally... I've been looking at these
>programs awhile, but I can't seem to work out how to do it by myself.
>Can anybody give me information about how to do this?

Yes, the standard documentation which you get for free with Perl.

Cheers,
Bernard
--
perl -le '$#="Just another Perl hacker,"; print \Bernard'


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

Date: Fri, 05 Jan 2001 16:32:48 +0100
From: Jochen Stenzel <Jochen.Stenzel.gp@icn.siemens.de>
To: ruittenb <ruittenb@best.ms.philips.com>
Subject: Re: Using C code in Perl
Message-Id: <3A55E920.167227E8@icn.siemens.de>


Hello, Robert,


> I've got some C/C++ functions that I want to use in a perl program, but
> I can't figure out how and if this is possible.

the new Inline module provides very transparent ways to do this. You can
embed the C functions just into your script as in

- snip --

greet($ARGV[0]);

use Inline C => DATA;

__END__

__C__

void greet(char * name)
 {
  printf("Hello, %s!\n", name);
 }

- snip --

For C++, please have a look at Inline::CPP.

            Jochen



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

Date: Fri, 5 Jan 2001 08:37:50 -0500
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Using C code in Perl
Message-Id: <slrn95bjhe.p8v.tadmc@magna.metronet.com>

ruittenb <ruittenb@best.ms.philips.com> wrote:
>
>I've got a little problem which is 

that you you cannot be bothered to check the Perl FAQ before
posting to the Perl newsgroup as is required by good netiquette.

Please stop abusing the newsgroup.


>I've got some C/C++ functions that I want to use in a perl program, but
>I can't figure out how and if this is possible.
                    ^^^     ^^

>If you look at the standard .pm modules that you can download from CPAN,
>there are some that use C code internally... 


When then the "if" part is answered, yes?


>programs awhile, but I can't seem to work out how to do it by myself.
>Can anybody give me information about how to do this?


The information you seek is already installed on your hard disk:

   perldoc -q C

Gak! Too much information...

   perldoc -q " C "


Ah, that's better:

   "Where can I learn about linking C with Perl?"


-- 
    Tad McClellan                          SGML consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


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

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


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