[11130] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4730 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Jan 23 08:06:54 1999

Date: Sat, 23 Jan 99 05:00:32 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Sat, 23 Jan 1999     Volume: 8 Number: 4730

Today's topics:
    Re: [Perlscript + WSH]: Can't get it to work <nobody@nowhere.com>
    Re: ActivePerl on Win95 (Andreas Gustafsson)
    Re: Am I wrong about Symbolic References? <tchrist@mox.perl.com>
        CGI.pm File Upload  <fknetworxs@earthling.net>
        Cmpare PerlScript to VBScript and JScript voronezh@geocities.com
        Environment variable settingsin Perl cgi issue <blackk@dial.oleane.com>
    Re: Environment variable settingsin Perl cgi issue <abey@hill.ucr.edu>
    Re: First line skip when reading file <nils@hotmail.com>
        Getting the last number in an IP addr with a regex. <kims@tip.net.au>
        HELP WANTED: Appending a text file. networks@skynet.co.uk
        HELP!! Perl Viewer?? <hachon@hotmail.com>
    Re: HELP!! Perl Viewer?? <hachon@hotmail.com>
    Re: LWP::Simple  HELP!!! <gisle@aas.no>
    Re: Newbie question: writing file <m_ching@hotmail.com>
        OLE, parameter by reference, VARIANT DATE voronezh@geocities.com
    Re: PROOF: Jesus is NOT LORD of the Sabbath!         ,: (erikc)
    Re: PROOF: Jesus is NOT LORD of the Sabbath!         ,: <kdp10@mindspring.com>
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

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

Date: Sat, 23 Jan 1999 00:56:49 -0700
From: nobody <nobody@nowhere.com>
Subject: Re: [Perlscript + WSH]: Can't get it to work
Message-Id: <36A980C0.D0B968CC@nowhere.com>

Actually this should be a registry problem.  At least that was my
problem.  
Try this:
open the registry
look in hkey_classes_root for the .pl extension
find the class that it is asscociated with (PerlScriptFile on mine)
Its should have a ScriptEngine entry  (PerlScript on mine)
find that class and check it CLSID
locate that entry under hkey_classes_root\CLSID
the InprocServer32 key should point the perlse.dll  check the path

The PerlScript and PerlScriptFile entries should have been created when
you installed perlscript.

Matt Sergeant wrote:
> 
> Harshal Chhaya wrote:
> >
> > Hi
> >
> > I am trying to use the example scriptlets from the "Scriptlets" article in the
> > Perl Journal (issue #12).
> >
> > On my Win95 box, I have the WSH engine, the DCOM95 stuff, AS Perl (build 507)
> > and VB 6.0.
> >
> > The sample VBScript and JScript scriplets run fine (showing that the WSH stuff
> > works fine) but when I try to run the PerlScript file (via the Visual Basic
> > interface), I get an error saying "Cannot create script engine: PerlScript".
> > The debugger points to the "CreateObject" statement in the VB app.
> 
> I think this is a bug in either PerlScript, or the Scriplets Beta2. I
> had trouble with scriptlets beta2 and so went back to beta1. I don't
> think MS have beta1 available any more, so contact me directly and I'll
> try and find it on my drive.
> 
> --
> <Matt email="matt@teamamiga.org" />
> 
> | Fastnet Software Ltd              |   Perl in Active Server Pages   |
> | Perl Consultancy, Web Development |   Database Design   |    XML    |
> | http://come.to/fastnet            |    Information Consolidation    |


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

Date: 23 Jan 1999 13:12:18 +0100
From: ante@Zeke.Update.UU.SE (Andreas Gustafsson)
Subject: Re: ActivePerl on Win95
Message-Id: <78ceb2$8ej$1@Zeke.Update.UU.SE>

Jason Boyd <jboyd99@hotmail.com> writes:

>If anyone knows how I can get ActivePerl (509) to fuction properly on my
>Win95 system, could you please help me? 

>I can open the perl.exe in Windows, but any scripts I run shut down as
>soon as they have displayed, meaning I can't see the results. When I try
>to open perl from DOS, it tells me "this program doesn't run in DOS
>mode." Yet the docs that come with the build claim it is for Win NT, 95
>and 98 systems. 

No problem with the build, it's the one to use even though I prefer
the unix version I still think my ActivePerl508 works very fine.

What you can do is run the script from DOS using:
c:\perl nice_code.pl 

in a DOS window. Then you should be able to see the results. But you
could always put some <hit-CR-to-end> line at the bottom of your scripts
of course.

The other error message sounds mighty odd. Blame Mr. Gates.

Hope that helps.

/andreas
-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-= Ad Astra!! =-=-=-=-=-=-=-=-=-=-=-=-=-=
Me: sf-fan, philosopher, historian, dreamer...
Loves: my good friends, ale, art in many forms, dreaming...
=-=-=-=-=-=-=-=-=-=-=-=-=-=-= mail me: ante@update.uu.se  /FIAWOL!


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

Date: 23 Jan 1999 03:07:15 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Am I wrong about Symbolic References?
Message-Id: <36a99f53@csnews>

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

In comp.lang.perl.misc, Burton Kent <burton@mcs.net> writes:
:This is one time where Perl 
:didn't "do what you expect."

Symbolic references, by definition, refer to the symbol table.  Lexicals,
by nature, are not part of the symbol table, but of the block's scope.
Symbolic references, by definition, refer to the symbol table.

--tom
-- 
    Sorry.  My testing organization is either too small, or too large, depending
    on how you look at it.  :-)
            --Larry Wall in <1991Apr22.175438.8564@jpl-devvax.jpl.nasa.gov>


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

Date: Sat, 23 Jan 1999 09:18:51 +0100
From: FK <fknetworxs@earthling.net>
Subject: CGI.pm File Upload 
Message-Id: <36A985EB.4C15974@earthling.net>

Hi,

i4ve got a file upload script wich runs under linux (apache+mod_perl),
but if i run the same script under nt (iis4 +activeware) 
I4ve got some problems.

I call the skript from a html form where you can choose
a local file to upload to the webserver.

Here a few lines of the script:

> #!/usr/bin/perl
> 
> use CGI qw/:standard/;
> $CGI::POST_MAX=1024 * 2000;
> 
> $file_name = param('file_name');
>
>     open (MYFILE,">/usr/local/httpd/$file_name") || die $!;
>     while (<$file_name>) {print MYFILE $_; }
>     close (MYFILE);

running the script on the linux server the file is transfered
correctly to the server and stored with the correct filename
und file extension.
running the programm under nt the file is also transferred
to the server, but not with the correct filename and without
any file extension (eg CGITEMP214243)

Has anyone an idea what4s going wrong ?

fk

-- 
Florian Knirsch
mailto:fknetworxs@earthling.net
http://www.thepentagon.com/fk


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

Date: Sat, 23 Jan 1999 09:29:45 GMT
From: voronezh@geocities.com
Subject: Cmpare PerlScript to VBScript and JScript
Message-Id: <78c4q5$lcl$1@nnrp1.dejanews.com>

Can somebody compare PerlScript to VBScript or/and JScript from ASP point of
view.
I'd like to try using PerlScript instead of VB/JScript. I need to work with
COM/MTS components and regular Web development stuff.
Thanks.
Alexey.

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Sat, 23 Jan 1999 08:50:32 +0100
From: "Black K" <blackk@dial.oleane.com>
Subject: Environment variable settingsin Perl cgi issue
Message-Id: <78bv5g$990$1@minus.oleane.net>

I have a perl scipt calling C functions through XS.
I have to set an environment variable which gives the path of a directory
before calling a C function within an .XS file.

When I call it from the command line it works. When I am calling it form the
browser it does not work.
I removed it from the .XS file and I initialised it in my Perl program
before calling the extension. Same
effect.

Anybody could help me with this issue ?


Thanks

KB




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

Date: Sat, 23 Jan 1999 00:53:56 -0800
From: Abraham Grief <abey@hill.ucr.edu>
To: Black K <blackk@dial.oleane.com>
Subject: Re: Environment variable settingsin Perl cgi issue
Message-Id: <Pine.LNX.4.05.9901230051470.11166-100000@hill.ucr.edu>


Maybe you need to set the environment variable that you refer to
inside your perl script?  Try putting something like

$ENV{'XsEnvVarName'} = 'XsEnvPath';

near the top of your perl script, maybe that'll work.  Of course,
replace XsEnvVarName and XsEnvPath with the appropriate values.




On Sat, 23 Jan 1999, Black K wrote:

> I have a perl scipt calling C functions through XS.
> I have to set an environment variable which gives the path of a directory
> before calling a C function within an .XS file.
> 
> When I call it from the command line it works. When I am calling it form the
> browser it does not work.
> I removed it from the .XS file and I initialised it in my Perl program
> before calling the extension. Same
> effect.
> 
> Anybody could help me with this issue ?
> 
> 
> Thanks
> 
> KB
> 
> 
> 
> 



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

Date: Sat, 23 Jan 1999 13:07:32 +0100
From: "Fredrik Larsson" <nils@hotmail.com>
Subject: Re: First line skip when reading file
Message-Id: <PYiq2.34426$9S3.87158@nntpserver.swip.net>

The solution is very simple; you don't need that while-loop.

# This should work just fine:
open INDEX_DAT, "index.dat" or die "Can't open index.dat.\n";
@temp = <INDEX_DAT>;
close INDEX_DAT;

/Larzon
----------------------------------------------------------------------------
--------------------
>When trying to use a simple while loop to read in multi. lines from a
>text file the first line of the file is always skipped.
>
># This opens the index.dat file for reading into @temp
>   open(INDEX_DAT, "index.dat") || die "Can't open index.dat.\n";
>      while (<INDEX_DAT>) {
>         @temp = <INDEX_DAT>;
>      }
>   close(INDEX_DAT);
>
>
># This suggests that the first line del prob is prior to this code
>#  open(INDEX_TMP, ">index.tmp") || die "Can't open index.tmp.\n";
>      foreach $_ (sort @temp) {
>         print "$_\n";
>      }
>#  close(INDEX_TMP);
>exit;
>
>My text file (index.dat) looks simular to this:
>Bowden_Jeffrey_T        # line 1
>Brimhall_Trent_S          # line 2
>
>When I execute it at command line all I get is:
>>Brimhall_Trent_S
>
>Any clues as to why this is happening?
>
>
>Gary
>
>




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

Date: Sat, 23 Jan 1999 20:08:29 +1100
From: "Kim Saunders" <kims@tip.net.au>
Subject: Getting the last number in an IP addr with a regex.
Message-Id: <917082514.915608@draal.apex.net.au>

Hiya all,

could someone please help me with a regex to give me the last number in an
IP address with a regex???

That is, I have an IP w.x.y.z where w,x,y and z are numbers between 1 and
255 or so (the actual details of an IP are not important at the moment!)

I just want a regex to give me z, something that will work regardless of the
number of digits of each section.

I really need this ASAP, so please email me if you can, and I will try and
do it myself in the meantime.

Thanks,

KimS




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

Date: Sat, 23 Jan 1999 11:33:53 GMT
From: networks@skynet.co.uk
Subject: HELP WANTED: Appending a text file.
Message-Id: <36a9b29c.5442249@news.skynet.co.uk>

Hi,

Can someone help me with this: How do I append a text file? I'm
opening the file like this

open (DATAFILE, ">>names.txt");

but how do I add the new information to the file? the info will be one
word.

Hope someone can spare the time to help thiw this simple problem

Regards and thanks in advance.




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

Date: Sat, 23 Jan 1999 11:47:21 +0000
From: Julian Daniel <hachon@hotmail.com>
Subject: HELP!! Perl Viewer??
Message-Id: <36A9B6C9.7C969844@hotmail.com>

Hallo!
Ich habe folgende Frage (sorry, wenn sie dumm ist, bin aber kein
Profi...) Gibt es sowas wie einen "Perl-Viewer" mit dem ich perl-Scripte
auf Funktionalitdt pr|fen kann, ohne da_ ich auf einem Server bin, der
Perl installiert hat? Ganz lieb wdre mir so einen Viewer f|r Windows95
 ... Gibt es sowas??
Vielen Dank!!!!!
julian daniel

Hello!
I have the following question - is there a perl-viewer or something
alike with which i can test run a perl-program without being on a server
that has perl installed? I badly need such a tool for a Windows95
plattform...
Thanx!!!
julian daniel

Hola!!
Una pregunta: sabiis si existe un Viewer para perl que me permita "run"
programas en perl desde una plataforma que no tiene perl instalado?
Especialmente me harma falta para Windows95...
Muchas gracias!!
julian daniel
--
********************************************
julian daniel -- ad mortem tyrannorum cubanae
********************************************
schlafen kann ich, wenn ich tot bin... /
ya dormiri de sobra cuando esti muerto... /
i will sleep enough when i'm dead... /
(reiner werner fassbinder)




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

Date: Sat, 23 Jan 1999 12:55:52 +0000
From: Julian Daniel <hachon@hotmail.com>
Subject: Re: HELP!! Perl Viewer??
Message-Id: <36A9C6D7.14C722F7@hotmail.com>

Julian Daniel wrote:

> Hallo!
> Ich habe folgende Frage (sorry, wenn sie dumm ist, bin aber kein
> Profi...) Gibt es sowas wie einen "Perl-Viewer" mit dem ich perl-Scripte
> auf Funktionalitdt pr|fen kann, ohne da_ ich auf einem Server bin, der
> Perl installiert hat? Ganz lieb wdre mir so einen Viewer f|r Windows95
> ... Gibt es sowas??
> Vielen Dank!!!!!
> julian daniel
>
> Hello!
> I have the following question - is there a perl-viewer or something
> alike with which i can test run a perl-program without being on a server
> that has perl installed? I badly need such a tool for a Windows95
> plattform...
> Thanx!!!
> julian daniel
>
> Hola!!
> Una pregunta: sabiis si existe un Viewer para perl que me permita "run"
> programas en perl desde una plataforma que no tiene perl instalado?
> Especialmente me harma falta para Windows95...
> Muchas gracias!!
> julian daniel

vielleicht erkldre ich genauer, was ich brauche: ich programmiere ein wenig
mit perl (cgi-scripts) auf einem unix server im b|ro. ich bin aber ndchste
woche auf dienstreise und mu_ ein perl-script vor ort weiterentwickeln, und
dort habe ich kein server mit perl installiert (und kein telnet zugang zu
meinem dienst-server), so da_ ich "blind" programmieren m|_te, was
bekannterweise nicht sehr effektiv ist... daher brduchte ich ein tool, um am
PC wenigstens |berpr|fen zu kvnnen, das die scripts einigerma_en
funktionieren, wie ich sie haben mvchte...danke (antworten bitte an meine
email, ich werde ndchste woche kein zugriff haben auf die newsgroups)

may be a background explanation. i have been programming a few in perl  (cgi
scripts) at office where we have a unix server with perl installed. i will
be next week visiting a customer and developing there a few perl scripts.
the customer has not a server with perl installed (nor will i have telnet
access to my office server) so i want a tool for windows95 PC with which i
can at least test if the scripts i'm developing with the customer do what
they are supposed to do or if they are at all syntactically correct.
thanx (please answers per email since i won't have next week access to the
newsgroups neither)

********************************************
julian daniel -- ad mortem tyrannorum cubanae
********************************************
schlafen kann ich, wenn ich tot bin... /
ya dormiri de sobra cuando esti muerto... /
i will sleep enough when i'm dead... /
(reiner werner fassbinder)




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

Date: 23 Jan 1999 08:07:45 +0100
From: Gisle Aas <gisle@aas.no>
Subject: Re: LWP::Simple  HELP!!!
Message-Id: <m3pv8631ry.fsf@furu.g.aas.no>

"Michael Mongeau" <michael_mongeau@stratus.com> writes:

> >COMMAND LINE:
> >perl -w httptest.pl www.yahoo.com
> >
> 
> I can see two problems.  First you need to either pass the full URL on the
> command line (http://www.yahoo.com/) or modify the program to add the
> protocol header.
> 
>     $url = "http://" . $url . "/";

There is a module called URI::Heuristic that tries to do this
guesswork for you.

  use LWP::Simple    qw(get);
  use URI::Heuristic qw(uf_uristr);
  $url = shift;
  $doc = get(uf_uristr($url));
  print $doc;

-- 
Gisle Aas


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

Date: Fri, 22 Jan 1999 12:24:11 -1000
From: "Michael Ching" <m_ching@hotmail.com>
Subject: Re: Newbie question: writing file
Message-Id: <36a98816.0@news.hawaii.rr.com>

dont know if this will work, but try a ./ in front of $token_file_name.
Also, are you sure permissions allow you to open the file?


Kevin D. Chester wrote in message <36A987A3.E0A39ED5@ma.ultranet.com>...
>Hello Perl Group,
>
>What am I doing wrong here?
>
>#! /usr/local/bin/perl5.003
>...
>open(token_file, ">$token_file_name") || &err_trap("Cannot open
>$token_file_name for writing\n");
>print(token_file "$token\n");
>close token_file;
>...
>
>All I get is "Cannot open tokens/262805729 for writing ".
>
>Thanks for your help!
>
>Kevin
>




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

Date: Sat, 23 Jan 1999 09:26:30 GMT
From: voronezh@geocities.com
Subject: OLE, parameter by reference, VARIANT DATE
Message-Id: <78c4k2$l65$1@nnrp1.dejanews.com>

I'm trying to understand if ActiveSatte Perl and PerlScript meets my needs. I
have couple questions: -- I have COM component (C++) with method foo( [out]
VARIANT *p1 ). Can I call this method from Perl and get data beck into p1 ? I
mean that paramenter should be passed by reference. Does it work? Dow it work
with all VARIANT subtypes? -- I'm useing OLE DATE type in my COM components.
I would like to have set of functions to work with this type of DATE, e.g.
add/subtract dates, get week day, convert to string, etc. Is it possible from
Perl ? Is there any special library/module to do it?

I hate VBScript, but it seems like I have to use it if I do not find answers
on these questions.

Thanks for your help.
Please, CC: to my email also.

Alexey.

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Sat, 23 Jan 1999 09:55:49 GMT
From: firewevrMAPSITNA@insync.net (erikc)
Subject: Re: PROOF: Jesus is NOT LORD of the Sabbath!         ,: (5G`0(
Message-Id: <36a99c55.102753608@news.insync.net>

On Thu, 21 Jan 1999 20:45:48 -0700
"STONES ARE GOD!!" <Jesusisaphonygod@getreal.net> wrote:
-- origin: alt.atheism:
>|
>|
>|Anonymous wrote:
>|>A BUNCH OF SHIT!
>|
>|WHY THE FUCK ARE YOU POSTING THIS OFF-TOPIC SHIT AT THE STONES NEWSGROUP?
>|TAKE YOUR FUCKING LIES SOMEWHERE ELSE, ASSHOLE!!!!
>|YOU DON'T KNOW THE TRUTH, STOP READING THE BUYBULL AND THEN YOU WILL SEE THE REAL LIGHT!

Just another christer fuckwad blowing his load in the name of his
malignant deity.  We get this shit all the time in alt.atheism, some
of whom are Stones fans.



Erikc (alt.atheist #002) | "An Fhirinne in aghaidh an tSaoil." 
                         |      "The Truth against the World."
ICQ 26776011             |                           -- Bardic Motto
If we don't believe in freedom of expression for
people we despise, we don't believe in it at all.
   ---- Noam Chomsky


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

Date: Sat, 23 Jan 1999 04:59:56 -0500
From: "MindSpring User" <kdp10@mindspring.com>
Subject: Re: PROOF: Jesus is NOT LORD of the Sabbath!         ,: (5G`0(
Message-Id: <78c6qh$ime$1@samsara0.mindspring.com>

How about a little compassion the my friend ... hate is what is tearing this
world apart ... only unconditional love, compassion, and acceptance are
gonna make a difference ... granted most Bible thumpers have to learn this
much more than the rest of us ... but it has to start someplace ....


Cavalier





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

Date: 12 Dec 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Special: Digest Administrivia (Last modified: 12 Dec 98)
Message-Id: <null>


Administrivia:

Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing. 

]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body.  Majordomo will then send you instructions on how to confirm your
]subscription.  This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.

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

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