[8814] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 2432 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Apr 27 17:07:31 1998

Date: Mon, 27 Apr 98 14:01:37 -0700
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, 27 Apr 1998     Volume: 8 Number: 2432

Today's topics:
        LWP::UserAgent related question (Joonas Timo Taavetti Kekoni)
        NT map network d_laprade@hotmail.com
    Re: o-modifier <tchrist@mox.perl.com>
    Re: ODBC/DBI on WIN32 <peter.bady@intel.com>
        open (FH , "cmd | ") wierd ness when used inside Create <vvankayala@creo.com>
    Re: Perl script as NT service? <jkry3025@comenius.ms.mff.cuni.cz>
    Re: QRe: == vs. eq (John Moreno)
    Re: RMS should be invited to O'Reilly's "Free Software  (I R A Aggie)
    Re: script advice (JS Dill)
    Re: Text box alignmnet <dtbaker_@flash.net>
    Re: There *IS* a visual IDE for Perl! pault@corbina.ru
        version information for dll's hillr@ugsolutions.com
    Re: warnings and Getopt::Std <quentin@shaddam.amd.com>
    Re: Why doesn't this work? <jkry3025@comenius.ms.mff.cuni.cz>
        XML to HTML conversion (Brent A Ellingson)
        Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: 27 Apr 1998 20:34:28 GMT
From: jkekoni@cc.hut.fi (Joonas Timo Taavetti Kekoni)
Subject: LWP::UserAgent related question
Message-Id: <6i2q4k$olc$1@hiekkalaatikko.cs.hut.fi>

the following page kan snoop information about the last page visited.
http://www.anonymizer.com/cgi-bin/snoop.pl

How can I give some value to that field?
I am using LWP::UserAgent and HTTP::Request::Common .

Is there any script similar to that snoop.pl publickly available?

any pointer
--code starts

use HTTP::Request::Common;
use LWP::UserAgent;
use Getopt::Std;

my $ua ;
my $responce;

start:
$ua= LWP::UserAgent->new;
$ua->agent(["NOYB"]);
$responce= $ua->request( GET 'http://www.anonymizer.com/cgi-bin/snoop.pl' );
#$ua->agent('Mozilla/5.0');
#{      $ua="";
#       goto start;
#}
print $responce->content();

--code ends.



-- 
	_-  Joonas Kekoni       OH2MTF	    I                           -_
	_-internet:	jkekoni@cc.hut.fi   I       DO NOT EAT.         -_
	_-slowmail:	j{mer{ntaival 7a176 I                           -_
	_-		02150Espoo          I      It is a monitor      -_
	_-		Finland/Europe      I                           -_


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

Date: Mon, 27 Apr 1998 14:18:58 -0600
From: d_laprade@hotmail.com
Subject: NT map network
Message-Id: <6i2ln1$h1g$1@nnrp1.dejanews.com>

I am fairly new with Perl and would appreciate some help.

Does any one have any good ideas?

I am trying to (how do i )
first:
     check to see if any drive is mapped to a certain IP address.
     (ex. Z: is mapped to 100.1.10.2\thisDIR  )
Second:
     if there exists a mapped directory with IP address then
     I need to know the drive letter etc..

     else
       I need to dynamicly map a drive and I will need to know to what
       drive i am mapping to.

Third:
      How do I make a perl script run at a certain time every day with or
without being logged into the machine?

If anyone has done anything similiar to what I need help doing,
Please help.


Thanks

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/   Now offering spam-free web-based newsreading


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

Date: 27 Apr 1998 20:32:36 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: o-modifier
Message-Id: <6i2q14$f92$2@csnews.cs.colorado.edu>

 [courtesy cc of this posting sent to cited author via email]

In comp.lang.perl.misc, 
    "Robert Friberg" <robban@it-konsult.com> writes:
:The following piece of code is run at worst case 80000 times, therefore
:I'm interested in having the regexp compiled only once. The @words
:array is assigned only once but $#words varies.
:
:   for $w (@words){
:      $failed++ and last unless /$w/i;
:   }
:
:Does anyone have a trick for this? 

The perlfaq, perhaps?

--tom
-- 
	Tom Christiansen	tchrist@jhereg.perl.com

Let us be charitable, and call it a misleading feature  :-)
        --Larry Wall in <2609@jato.Jpl.Nasa.Gov>


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

Date: 27 Apr 1998 19:40:10 GMT
From: "Joe Cool" <peter.bady@intel.com>
Subject: Re: ODBC/DBI on WIN32
Message-Id: <01bd7214$65863ad0$fc1be984@fmcaces-status>

You can get an ODBC extension @ http://www.roth.net
I have not tried it yet but I hear it is good.

You may also want to upgrade PERL by getting the latest
version, which is available at http://www.activestate.com

Pete Bady
peter.bady@intel.com

Dennis Kowalski <dennis.kowalski@daytonoh.ncr.com> wrote in article
<353DFE2A.425E@daytonoh.ncr.com>...
> I am running on a NT 4.0 host and using the build 315 port from
> ActiveWare.
> 
> Can anyone tell me how to get the modules needed to access an ORACLE
> database in this WIN32 environment ??
> 
> I do not have a C compiler on my NT box.
> 
> I have read about the ODBC and DBI interfaces but I do not seem to have
> either one in my Perl installation.
> 
> Thanks
> 


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

Date: Mon, 27 Apr 1998 13:28:14 -0700
From: Vidyasagar Vankayala <vvankayala@creo.com>
Subject: open (FH , "cmd | ") wierd ness when used inside CreateProcess on NT
Message-Id: <3544EA5E.2A365089@creo.com>

Hi,

I am using ActiveState Perl for win32 (build 315) on NT 4.0 (Intel).

I have a C++ program which calls CreateProcess to create a new process.

This new process's cmd line is a perl script (tst.pl).

The perl script tst.pl contains code such as :

my $cmd = "dir c:\\tmp"; # a simple command

open (FH, "$cmd |") || die "Cant open pipe";
while (<FH>) {
etc;
etc;
}

My confusion is about the following behavior.

1. I always get "Cant open pipe" when tst.pl is called from
CreateProcess.
2. However, if I turn the perl script into a batch file running perl
script, everything is fine
3. If I just run perl tst.pl everything is fine.

What gives ? I would appreciate any information

Thanks
Vidya





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

Date: Mon, 27 Apr 1998 20:59:03 -0700
From: Jan Krynicky <jkry3025@comenius.ms.mff.cuni.cz>
To: Jim Lawson <jtlawson@emba.uvm.edu>
Subject: Re: Perl script as NT service?
Message-Id: <35455407.4291@comenius.ms.mff.cuni.cz>

Jim Lawson wrote:
> 
> Hi,
> 
> I've written a small script which opens a socket, listens, and takes SQL
> commands - after which it uses ODBC
> to talk to the MS SQL server.
> 
> It works OK, so I am now trying to get it to run as a service, so that
> no one has to be logged in while it is running.  Ah,
> for the days when I could just put a script in /etc/rc.d/init.d.
> 
> I've tried two different tools - srvany, and runexesrv.   I didn't have
> much success with srvany.  Runexesrv works - more or less - but it pops
> up a window for the perl script, regardless of who is logged in.  Worse,
> the service will sometimes die when people log in or out.
> 
> Is anyone successful in running a Perl script as an NT service?
> 
> --
> Jim Lawson                                              237 Votey Building
> EM Computer Facility                             The University of Vermont
> jtlawson+spam@emba.uvm.edu                            Burlington, VT 05405

I used srvany with no problem. 
(pop mails , do something with MS SQL server using Win32::ODBC, make an
archive,
send mails + attachments)
The service ran as Administrator, and the "command line" for srvany
started by the full path to perl.exe.

What problems did you have?

Jenda


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

Date: Mon, 27 Apr 1998 19:55:56 GMT
From: phenix@interpath.com (John Moreno)
Subject: Re: QRe: == vs. eq
Message-Id: <1d85ibp.bkdnl1vpgmq7N@roxboro0-056.dyn.interpath.net>

Allan M. Due <due@discovernet.net> wrote:

>     Any suggestions for "real newsreaders" for those of us doomed to operate
> in a Windoze environment.? Or, are we only real if we have access to UNIX?
> Feeling a bit surreal myself at the moment.  Never thought I would be judged
> by my header.

Take a look at Agent and Gravity (slrn is available also).

Another suggestion-take a look at:
    <http://www.xs4all.nl/~js/gnksa/gnksa-evaluations.html>

The closer it comes to passing the more likely that it's a real
newsreader.  Anything which fails 1/3 or more of the MUSTs is probably
seriously broken.  (Of course this isn't the only thing to consider when
you are looking for a newsreader, but it's not a bad place to start).

-- 
John Moreno


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

Date: Mon, 27 Apr 1998 15:38:41 -0500
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: RMS should be invited to O'Reilly's "Free Software Summit"
Message-Id: <fl_aggie-2704981538420001@aggie.coaps.fsu.edu>

In article <pudge-2704981239270001@ppp-25.ts-1.kin.idt.net>,
pudge@pobox.com (Chris Nandor) wrote:

+ In article <m3g1j2apl6.fsf@mute.eaglets.com>, Sam Steingold
<sds@usa.net> wrote:
 
+ # E.g., *AFAIK*, MS can, *at any time*, request that we stop running win95
+ # and erase it from our HDs, and whoever doesn't comply is a felon.  This
 
+ I don't think it would fall under any criminal statutes in any state. 
+ Just a civil offense.  No felony involved in the worst case.

Not only that, but does anyone think that software manufacturers want
the courts taking a long, hard look at shrink-wrap licensing?

James

-- 
Consulting Minister for Consultants, DNRC
The Bill of Rights is paid in Responsibilities - Jean McGuire
To cure your perl CGI problems, please look at:
<url:http://www.perl.com/CPAN-local/doc/FAQs/cgi/idiots-guide.html>


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

Date: Mon, 27 Apr 1998 15:04:43 -0400
From: jsd@pobox.com (JS Dill)
Subject: Re: script advice
Message-Id: <jsd-2704981504430001@usr2a43.rut.sover.net>

   :) 

   Actually, it is not even a project...Perl-wise I have no expertise and
so am hoping for some guiodence...this, hopefully, will get me moving in
the right direction...

In article <comdog-ya02408000R2704981440350001@news.panix.com>,
comdog@computerdog.com (brian d foy) wrote:

> In article <jsd-2704981416380001@usr2a43.rut.sover.net>, jsd@pobox.com
(JS Dill) posted:
> 
> >   In my work for an ISP I do a lot of grepping from termlogs to
> >identify/verify log-ons
> 
> >   What I would like to do is encounter/write a script that would allow
> >for this access with only a prompt for relevant specifics...say, date,
> >modem port, ip address, user name (if available).
> 
> >   Would this be possible/reasonable via Perl? 
> 
> this sounds very reasonable.  at which point of the project are you having
> problems?
>

-- 
                  First Nations/First Peoples Issues
                <http://www.dickshovel.com/index.html>


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

Date: Mon, 27 Apr 1998 12:59:07 -0600
From: Dan Baker <dtbaker_@flash.net>
Subject: Re: Text box alignmnet
Message-Id: <3544D57B.548B@flash.net>

not a perl topic really.... but try putting your data inside table
cells.

Dan

Martien Verbruggen wrote:
> 
> In article <6hc0e2$rj3$1@gte2.gte.net>,
>         "William Shaffer" <wpshaf@gte.net> writes:
> > Hi
> >
> >     Does any one know how to get text boxes to line up vertically?
> 
> Text boxes? perl has text boxes?
> 
> >     I want to have text boxes out from a *.cgi script (wwwboard) line up
> 
> Uhoh.. It's CGI. That makes this a HTML question, I guess. You should
> direct all your questions about web-related things to one of the
> groups in comp.infosystems.www.*. There is even a HTML group.
> 
> HTH,
> Martien
> --
> Martien Verbruggen                      |
> Webmaster www.tradingpost.com.au        | "In a world without fences,
> Commercial Dynamics Pty. Ltd.           |  who needs Gates?"
> NSW, Australia                          |


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

Date: Mon, 27 Apr 1998 14:39:59 -0600
From: pault@corbina.ru
Subject: Re: There *IS* a visual IDE for Perl!
Message-Id: <6i2mug$ipq$1@nnrp1.dejanews.com>

In article <m34szm25oj.fsf@cenderis.demon.co.uk>#1/1,
  Bruce Stephens <bruce@cenderis.demon.co.uk> wrote:
>
> seeker79@yahoo.com writes:
>
> > I have only worked with it a little while so far, but it looks great. It
is
> > very similar to VC++, it has color coding, you can set breakpoints in the
> > editor, and it even has the little yellow pop-ups that show variable
values.
> > Also lets you run cgi scripts w/o a webserver and see the results.
> >
> > Anyway, you can download it from http://www.solutionsoft.com/perl.htm.
>
> The screenshot looks pretty.  So, is it good enough that it would be
> worth using Windows 95 (or, assuming I had it, NT), which is not my
> favourite development environment.  (Does *anybody* who's developed
> under Unix *prefer* Windows 95?)
>
> What are the chances of some nice Unix graphical debugger?  (Caveat, I
> haven't tried the Perl/Emacs debugger thingy recently.  What certainly
> used to be missing, and is missing for C/C++ debuggers too (with the
> honorable exception of DDD) is a really nice data examiner, letting me
> click on pointers to dereference them and things.)
>

 http://www.qub.com/group/

 YeP visual perl debugger (written in perl. 25K of perl code) runs
 on UNIX / Windows, allows cgi debugging for both platforms and you
 can easy expand it yourself. As for data examiner - why not Data::Dumper?

Rgds.Paul.


-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/   Now offering spam-free web-based newsreading


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

Date: Mon, 27 Apr 1998 14:25:12 -0600
From: hillr@ugsolutions.com
Subject: version information for dll's
Message-Id: <6i2m36$hnj$1@nnrp1.dejanews.com>

Hello all,

I am trying to write a perl script which will return the version number of a
dll. I am using the win32::api module from cspan. The three things that I use
are GetFileVersionInfoSize, GetFileVersionInfo and VerQueryValue. I have the
first two working however I cannot get the VerQueryValue function to work.
Can anyone see what I am doing wrong? Thanks.



use Win32::API;

$GetVersionSize=new Win32::API("version","GetFileVersionInfoSize",[P,I],I);
$GetFileVersionInfo=new Win32::API
("version","GetFileVersionInfo",[P,N,N,P],V);
$VerQueryValue=new Win32::API("version","VerQueryValue",[P,P,P,P],V);


$lptstr="version.dll";
$dwhandle=0;
$dwlen = $GetVersionSize->Call($lptstr,$lpbuffer)||Error ();


$lpData=" " x "$dwlen";

$GetFileVersionInfo-> Call($lptstr,$dwhandle,$dwlen,$lpData)||Error ();


$dwBytes="          ";
$lpValue="(TEXT\"\\StringFileVarFileInfo\\Translation\")";


$lpxbuffer = $VerQueryValue-> Call($lpData,$lpValue,$lpxbuffer,$dwBytes)
||Error ();

print $lpxbuffer;




sub Error
{
return Win32::FormatMessage(Win32::GetLastError());
       }

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/   Now offering spam-free web-based newsreading


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

Date: 27 Apr 1998 14:55:40 -0500
From: Quentin  Fennessy <quentin@shaddam.amd.com>
Subject: Re: warnings and Getopt::Std
Message-Id: <ximemyjujib.fsf@shaddam.amd.com>


>From perldiag(1):

     Name "%s::%s" used only once: possible typo
         (W) Typographical errors often show up as unique
         variable names.  If you had a good reason for having a
         unique name, then just mention it again somehow to
         suppress the message.  The use vars pragma is provided
         for just this purpose.

Check out perlmod(1) for 'use vars'.

-- 
Quentin Fennessy			AMD, Austin Texas
Secret hacker rule #11 - hackers read manuals


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

Date: Mon, 27 Apr 1998 21:09:49 -0700
From: Jan Krynicky <jkry3025@comenius.ms.mff.cuni.cz>
To: smoothie@spiritone.com
Subject: Re: Why doesn't this work?
Message-Id: <3545568D.4235@comenius.ms.mff.cuni.cz>

Dave Neuer wrote:
> 
> I have written a script to extract the meta tags from several html
> documents. 
>
<snipped>
> 
> Thanks in advance,
> Dave Neuer
> 

Not a perl answer, sorry.

See HTMLelem at http://www.chipnet.cz/depot/HTMLelem.htm .
It does what you want and more. ( It was an old school project of mine
:-)

If you want to do it directly from perl, you should use some module.

Hi, Jenda


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

Date: 27 Apr 1998 19:34:50 GMT
From: bellings@badlands.NoDak.edu (Brent A Ellingson)
Subject: XML to HTML conversion
Message-Id: <6i2mkq$r8m$1@node2.nodak.edu>

I am very new to XML, and I have some questions I hope someone
can help answer.  

I have a couple of small databases (department directories, course 
schedules, etc.), that sit behind some of the pages on a website 
I maintain.  Right now, I am using small "custom" perl scripts 
to transform this data into HTML tables, blocks of HTML'ized text, 
or whatever the requirements are for the page that uses the data, 
and include that HTML in the web page using server-side includes.

I am certain people do this all the time, and there must be 
a "standard", "simpler" way to do it.  I've started looking at 
XML, and it seems a step closer to what I want to do.

Are there "standard" ways to take XML data, do some simple
data transforms, and inject the data into HTML?  What I roughly
imagine doing is take something like the following (again, I am
very, very new to XML)

<!-- orinal XML record -->
<person>
   <name>Kilroy Jones</name>
   <url>www.math.ndsu.nodak.edu/faculty/kjones/</url>
   <university>Sand Hill University</university>
   <year>1982</year>
   <title>Assoc Prof</title>
   <email>kjones@ndsu.nodak.edu</email>
</person>

and "automagically" massage it into something like:

<!-- resulting HTML record -->
<tr>
   <td><a href="www.math.ndsu.nodak.edu/faculty/kjones/">Kilroy Jones</a>,
       Sand Hill University, 1982</td>
   <td>Associate Professor</td>                   <!-- note expansion -->
   <td><a href="mailto:kjones@ndsu.nodak.edu">
       <address>kjones@ndsu.nodak.edu</address></a></td>
</tr>

Are "custom" perl scripts the easiest way to do this, or is there
something better?  I'd like to find something GPL'd (or close to
GPL'd) if at all possible.  I'd also like to find a system that's
relatively simple to use.

(It _doesn't_ have to be simple to setup!  I'll be doing
 that, and I have a high pain tolerance.  However, I imagine
 a system that, once setup, many other people can use to stick data 
 into _their_ web pages...)

Thanks for any info you can give me,
Brent Ellingson
bellings@badlands.nodak.edu



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

Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 8 Mar 97)
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.misc (and this Digest), send your
article to perl-users@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.

The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.

The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.

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 V8 Issue 2432
**************************************

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