[8862] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 2479 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat May 2 19:05:51 1998

Date: Sat, 2 May 98 16:00:26 -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           Sat, 2 May 1998     Volume: 8 Number: 2479

Today's topics:
    Re: 1701 days hath September (was: Re: rename funciton) <ljz@asfast.com>
        Apache Logfile Parser? <mocat@best.com>
        Array of Arrays, sorting and using (bernd wolfsegger)
    Re: Array of Arrays, sorting and using (brian d foy)
    Re: Encryption of perl scripts (brian d foy)
    Re: extracting a sub-string (Jonathan Stowe)
    Re: extracting a sub-string (brian d foy)
    Re: extracting a sub-string <alpaca@iname.com>
    Re: extracting a sub-string (brian d foy)
    Re: extracting a sub-string (Hakan Hjelmstrom)
    Re: extracting a sub-string <alpaca@iname.com>
    Re: How do I print an array in the format I want it? <dont@want.spam>
        How meta search works? tietzmann@yahoo.com
    Re: How meta search works? (Jonathan Stowe)
    Re: looking for a little bit of help here. <alpaca@iname.com>
    Re: matching problem <alpaca@iname.com>
    Re: matching problem (Jonathan Stowe)
    Re: matching problem (Belg4mit)
    Re: QRe: == vs. eq (Jonathan Stowe)
        regex help mehta@mama.indstate.edu
        Socket <cabustos@nevado.cui.edu.co>
    Re: Socket (Jonathan Stowe)
    Re: Sybperl (Jonathan Stowe)
    Re: Using the -- notation? <rootbeer@teleport.com>
    Re: Win32::NetResource::AddConnection exhibiting undocu (Jeffrey Drumm)
        Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: 02 May 1998 15:06:12 -0400
From: Lloyd Zusman <ljz@asfast.com>
Subject: Re: 1701 days hath September (was: Re: rename funciton)
Message-Id: <ltk984lcgr.fsf@asfast.com>

"Alan J. Flavell" <flavell@mail.cern.ch> writes:

> On 2 May 1998, Lloyd Zusman wrote:
> 
> ...
> > rules that was put forth concerned the non-acceptance of posts that
> > repeat information that is found in the FAQ, and a significant
> > percentage of my posts do just that.
> 
> May I ask why you'd do that?

It's a matter of personal preference, mostly.  I often derive pleasure
from answering questions.

Furthermore, I question things all the time, and some of my greatest
joys come to me when I finally receive the answer to a long-standing
question of mine.  For me, it doesn't matter whether this answer comes
from a person, a book, a FAQ list, the results of diligent
trial-and-error, a sudden inspiration, or whatever.  For me, it's the
answer itself that provides the joy, not the source of the answer.

Therefore, if I can provide an answer to someone's question,
long-standing or otherwise, and if that person feels any of the joy
that I would feel upon obtaining an answer in a similar situation,
then I'm happy.

> It's a dangerous precedent to set to usenauts (IMHO) to lead them to
> believe that if they post an FAQ, someone will dutifully come along and
> read the answer out verbatim to them.  I'd suggest that at most a
> "taster" could be posted from the answer, to demonstrate to them that
> they failed to use due diligence, but still requiring them to actually
> look inside the FAQ document to find a complete enough answer for making
> further progress.

Well, in my experience, my style of answering questions hasn't
generally caused people to become dependent on my answers instead of
written documentation or personal experience.  Even when I don't spell
out "There is more in the docs" or "Try it yourself and you will see",
the people I deal with generally seem to know the value of the docs
and of personal experimentation both before and after receiving an
answer from me.

Furthermore, there is no lack of people on usenet in general and here
in c.l.p.m specifically who will make "Go to the FAQ" statements in
response to most commonly asked questions, and so I don't feel I need
to add my voice to the chorus ... especially since I usually find this
to be a personally distasteful task.

> (They also need to learn that asking an FAQ is very likely to get them a
> string of bogus answers from others who are almost as clueless as they
> are.)

Well, most people very quickly find out on their own that it's easy to
receive incorrect or misleading information by asking questions in
forums such as these.

> > Remember, a moderated group can still be *read* by anyone. 
> 
> Quite.  Glory be to intelligent lurkers.

Halleluja! :)


-- 
 Lloyd Zusman   ljz@asfast.com
 perl -e '$n=170;for($d=2;($d*$d)<=$n;$d+=(1+($d%2))){for($t=0;($n%$d)==0;
 $t++){$n=int($n/$d);}while($t-->0){push(@r,$d);}}if($n>1){push(@r,$n);}
 $x=0;map{$x+=(($_>0)?(1<<log($_-0.5)/log(2.0)+1):1)}@r;print"$x\n"'


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

Date: Sat, 2 May 1998 15:20:44 -0700
From: jay <mocat@best.com>
Subject: Apache Logfile Parser?
Message-Id: <Pine.BSF.3.96.980502151827.19624A-100000@shell9.ba.best.com>


I'm helping a friend of mine with a few scripts for his new server... 
what he needs is an Apache logfile parser
(/var/log/www/hostname/access.log)...
Was wondering if there is a module to make this easier on myself, or do I
have to do it manually?
Either way, it's no problem.... just wondering.

Thanks for any help...
j




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

Date: Sat, 02 May 1998 23:02:24 +0200
From: eggsite@berlin.snafu.de (bernd wolfsegger)
Subject: Array of Arrays, sorting and using
Message-Id: <eggsite-ya023380000205982302240001@news.snafu.de>

Hy,

can anybody tell me how I can sort an Array of Arrays (No Hashes),
depending on the Arraysfields of the Array.
And then put the sorted thing in another Array to use it?

Well, I' hope you will understand my english on this complecated theme...

Thanxs for any response

Bernd


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

Date: Sat, 02 May 1998 17:25:38 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: Array of Arrays, sorting and using
Message-Id: <comdog-ya02408000R0205981725380001@news.panix.com>
Keywords: from just another new york perl hacker

In article <eggsite-ya023380000205982302240001@news.snafu.de>, eggsite@berlin.snafu.de posted:

>can anybody tell me how I can sort an Array of Arrays (No Hashes),
>depending on the Arraysfields of the Array.
>And then put the sorted thing in another Array to use it?

the perldsc and perllol manpages have lots of examples.

good luck :)

-- 
brian d foy                                  <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>
Perl Mongers <URL:http://www.pm.org>


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

Date: Sat, 02 May 1998 16:20:17 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: Encryption of perl scripts
Message-Id: <comdog-ya02408000R0205981620170001@news.panix.com>
Keywords: from just another new york perl hacker

[all the stuff Tom said, and ...]

In article <354B4B52.5E547E9E@koan.de>, hophuels@koan.de posted:

>I have to write a perl/CGI script. It will be distributed on several
>computers. How can I achive that nobody changes the script.

well, you can't stop them from changing it, but you can keep the MD5
digest handy so you know when they do.  if you want to make that part
of the license agreement somehow, that's up to you.

>Is there a posibity that the Script is encrypted and decrypted 
>at execution time.

curious idea, but it wouldn't stop the determined.  what about storing
gzipped scripts that are uncopressed then fed to the perl interpreter.
seems like a simple, fake wrapper "perl" could do that for you.  probably
doesn't solve your problem and is easy to crack, but sounds like a cool 
hack :)

good luck :)

-- 
brian d foy                                  <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>
Perl Mongers <URL:http://www.pm.org>


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

Date: Fri, 01 May 1998 10:47:02 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: extracting a sub-string
Message-Id: <35499c56.3186693@news.btinternet.com>

On Sat, 02 May 1998 18:49:22 GMT, Paul Farber wrote :

>Hello all, 
>
>Perl is good, regular (m/// s/// tr///) epressions are killing me.
>
>How the heck do you pull a string from sentence???
>
>The info I need is between < and >, split won't work as the placement
>of the  < > will vary, so I need an expression to rip out this string
>and put it into a scalar.

Go on admit it your trying to parse HTML. ;-}

There has been a wealth of discussion on these matters here recently.


You might examine the perlre manpage^H^H^H^H^H^H^H^Hdocument if you
have difficulty with regular expressions.  If you really are dealing
with HTML then you might also want to read perlfaq9 and/or use
HTML::Parser.

>Should I put the sentence into @sentence and POP off each word?  

How exactly would one go about doing this ?

I reckon you should post some snippet of code that you find to not
work so we might point you in the right direction.

Hmm perhaps a bit grumpy but I just went out and found the town full
of morris dancers.

/J\
Jonathan Stowe
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>



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

Date: Sat, 02 May 1998 16:27:22 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: extracting a sub-string
Message-Id: <comdog-ya02408000R0205981627220001@news.panix.com>
Keywords: from just another new york perl hacker

In article <354b697d.4262021@news.f-tech.net>, farber@f-tech.net posted:

>How the heck do you pull a string from sentence???
>
>The info I need is between < and >, split won't work as the placement
>of the  < > will vary, so I need an expression to rip out this string
>and put it into a scalar.

if you are playing with HTML, see the HTML::Parser module.

else, i would play with index() and substr().  but that's just me.

good luck :)

-- 
brian d foy                                  <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>
Perl Mongers <URL:http://www.pm.org>


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

Date: 2 May 1998 21:23:25 GMT
From: "Allan M. Due" <alpaca@iname.com>
Subject: Re: extracting a sub-string
Message-Id: <6ig2sd$pgt$0@206.165.146.171>


Paul Farber wrote in message <354b697d.4262021@news.f-tech.net>...
>Hello all,
>
>Perl is good, regular (m/// s/// tr///) epressions are killing me.
>
>How the heck do you pull a string from sentence???
>

Well, I like $& which is described in perlvar

so to find <this stuff> or <this other stuff which is still stuff> in
@the_array :

foreach (@the_array) {
     /(<this.*stuff>)/;
     $save_it = $&;
     }

HTH

Allan M. Due
Due@discovernet.net
Admin@WhiteCrow.net

"There are two major products that come out of Berkeley: LSD and UNIX. We
don't believe this to be a coincidence."
-Jeremy S. Anderson




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

Date: Sat, 02 May 1998 17:32:38 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: extracting a sub-string
Message-Id: <comdog-ya02408000R0205981732380001@news.panix.com>
Keywords: from just another new york perl hacker

In article <6ig2sd$pgt$0@206.165.146.171>, "Allan M. Due" <alpaca@iname.com> posted:

>Paul Farber wrote in message <354b697d.4262021@news.f-tech.net>...
>>How the heck do you pull a string from sentence???

>Well, I like $& which is described in perlvar

are you sure that you like it?  you can generally perform the same
thing in other ways without getting the BIG performance penalty.

>so to find <this stuff> or <this other stuff which is still stuff> in
>@the_array :

>foreach (@the_array) {
>     /(<this.*stuff>)/;
>     $save_it = $&;

since you are capturing everything that you matched in $1, why not 
just use that?

   $save_it = $1;


good luck :)

-- 
brian d foy                                  <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>
Perl Mongers <URL:http://www.pm.org>


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

Date: Sat, 02 May 1998 21:33:43 GMT
From: hawk@algonet.se (Hakan Hjelmstrom)
Subject: Re: extracting a sub-string
Message-Id: <354b8d17.112424678@news.algonet.se>

On Sat, 02 May 1998 16:27:22 -0400, brian d foy wrote:
> In article <354b697d.4262021@news.f-tech.net>, farber@f-tech.net posted:
> >The info I need is between < and >, split won't work as the placement
> >of the  < > will vary, so I need an expression to rip out this string
> >and put it into a scalar.
> if you are playing with HTML, see the HTML::Parser module.
> else, i would play with index() and substr().  but that's just me.

Why use index & substr? What's so terribly wrong with something like:

#!/usr/bin/perl -w

use strict;

open( HTML, "index.html" ) || die( "No can do:\n$!" );

while ( <HTML> ) {
    foreach ( /<.*?>/g ) { 
        print "$_\n";
    }
}

close HTML || die( "Nope, closing index.html wouldn't work:\n$!" );

I guess it's not foolproof, but I've only just begun reading Friedl's
"Mastering Regular Expressions" and I'm still having a hard time
eradicating any spurious "<" or ">", but I'll get there soon.

Hekan Hjelmstrvm
hawk@algonet.se


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

Date: 2 May 1998 22:32:39 GMT
From: "Allan M. Due" <alpaca@iname.com>
Subject: Re: extracting a sub-string
Message-Id: <6ig6u7$3vc$0@206.165.146.146>

Doh!
    I meant to take the () out before I posted (I was cutting and pasting
don't you know).  Was trying to illustrate $&  but my example went astray.
$1 is just as good in this instance.  Sorry for the confusion.

AmD
Allan M. Due
Due@discovernet.net
Admin@WhiteCrow.net

"There are two major products that come out of Berkeley: LSD and UNIX. We
don't believe this to be a coincidence."
-Jeremy S. Anderson

brian d foy wrote in message ...
>In article <6ig2sd$pgt$0@206.165.146.171>, "Allan M. Due"
<alpaca@iname.com> posted:
>
>>Paul Farber wrote in message <354b697d.4262021@news.f-tech.net>...
>>>How the heck do you pull a string from sentence???
>
>>Well, I like $& which is described in perlvar
>
>are you sure that you like it?  you can generally perform the same
>thing in other ways without getting the BIG performance penalty.
>
>>so to find <this stuff> or <this other stuff which is still stuff> in
>>@the_array :
>
>>foreach (@the_array) {
>>     /(<this.*stuff>)/;
>>     $save_it = $&;
>
>since you are capturing everything that you matched in $1, why not
>just use that?
>
>   $save_it = $1;
>
>
>good luck :)
>
>--
>brian d foy                                  <comdog@computerdog.com>
>CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
>Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>
>Perl Mongers <URL:http://www.pm.org>




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

Date: Sat, 2 May 1998 17:55:36 -0500
From: "Charles Kerekes" <dont@want.spam>
Subject: Re: How do I print an array in the format I want it?
Message-Id: <6ig83f$p4g$1@supernews.com>

Take a look at the sprintf function. Here is a short sub that I use to align
the periods in IP addresses. The unformatted IP address is passed to the sub
and is asigned to $ip then the octets are split into the @octets array. Hope
this helps.


Charlie.

sub PadIp {
# This sub pads IP address with spaces, if needed, to align the periods.

    my ($ip) = @_[0];
    my @octets = split(/\./,$ip);

    # Format the IP and return as result of sub
    $ip = sprintf
("%3d.%3d.%3d.%3d",$octets[0],$octets[1],$octets[2],$octets[3]);

}





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

Date: Sat, 02 May 1998 16:40:43 -0600
From: tietzmann@yahoo.com
Subject: How meta search works?
Message-Id: <6ig3sr$9da$1@nnrp1.dejanews.com>

Hi,

I'm looking for some information regarding how a meta search works. Meta
search engines such as Metacrawler ( http://www.metacrawler.com ), can use
another search engine (Yahoo, Altavista, Excite) to find pages, but displaying
the results on their own HTML pages.

How they do it? Where can I find a CGI to do it?


Thanks for your help.
Juliano Tietzmann
mailto:tietzmann@yahoo.com

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


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

Date: Fri, 01 May 1998 13:12:49 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: How meta search works?
Message-Id: <3549c76c.13451352@news.btinternet.com>

On Sat, 02 May 1998 16:40:43 -0600, tietzmann@yahoo.com wrote :

>Hi,
>
>I'm looking for some information regarding how a meta search works. Meta
>search engines such as Metacrawler ( http://www.metacrawler.com ), can use
>another search engine (Yahoo, Altavista, Excite) to find pages, but displaying
>the results on their own HTML pages.
>
>How they do it? Where can I find a CGI to do it?
>

I dont know how *they* do it.  But I would use LWP::UserAgent to pose
the requests to said servers;  HTML::parser to extract the relevant
stuff from the returned pages and CGI to get around all of those fussy
little extras.

/J\
Jonathan Stowe
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>



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

Date: 2 May 1998 19:14:23 GMT
From: "Allan M. Due" <alpaca@iname.com>
Subject: Re: looking for a little bit of help here.
Message-Id: <6ifraf$bo9$0@206.165.146.171>


> $_=$in;


not really sure what the above is doing, but that's me.

> if (/\\lib\\y\//) {
>    $in =~ s/\\y\//\\..//g;


on the other hand, I do know that you need some more backslashes.  Both of
those periods need to be escaped. You have so many you might want to use
another character for the delimiter. So something like:

while ($in=<IN>)

    $in =~ s|\\y\/|\\\.\.\/|g;
print $in;
}


and for more readability use quotema:

while ($in=<IN>)

$in =~ s|\Q\y/|\../\E|g;
print $in;
}


So there is one place to start.  HTH

Allan M. Due
Due@discovernet.net
Due@WhiteCrow.net

"There are two major products that come out of Berkeley: LSD and UNIX. We
don't believe this to be a coincidence."
-Jeremy S. Anderson





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

Date: 2 May 1998 20:43:46 GMT
From: "Allan M. Due" <alpaca@iname.com>
Subject: Re: matching problem
Message-Id: <6ig0i2$lbr$0@206.165.146.171>

Belg4mit wrote in message
<1998050218434300.OAA18533@ladder01.news.aol.com>...

<snip>
>so that's where I slipped and was under the impression it denoted an
optional
>clause/expression


Yup,

    [] denotes a "pattern-matching character class ... One and only one of
the characters must be present at the corresponding part of the string for
the pattern to match".  To quote from the llama book.

Hope this helps.

AmD

Allan M. Due
Due@discovernet.net
Due@WhiteCrow.net

"There are two major products that come out of Berkeley: LSD and UNIX. We
don't believe this to be a coincidence."
-Jeremy S. Anderson




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

Date: Fri, 01 May 1998 12:15:23 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: matching problem
Message-Id: <3549b0f9.8333550@news.btinternet.com>

On 02 May 1998 18:40:56 GMT, Belg4mit wrote :
>
>I suppose I could use an html parser, but it's just supposed to be a quick and
>dirty check to make sure that all the container tags are matched. since weblint
>seems  to be poor at doing this.
>

Actually HTML::Parser would provide an easy way to do this kind of
thing without much more code than you would have without it.  It can
look kinda scary until you get the hang of it but hey you could be the
chairman of the European Union Monetary Unification summit.

If you're interested in going down that route I have got a fairly
basic and frankly pretty crap example (admittedly with a different
purpose) at:

<URL:http://www.btinternet.com/~gellyfish/resources/htbeauty.pl>

Have fun

/J\
Jonathan Stowe
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>



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

Date: 02 May 1998 22:05:35 GMT
From: belg4mit@aol.com (Belg4mit)
Subject: Re: matching problem
Message-Id: <1998050222053500.SAA08075@ladder01.news.aol.com>

Okay thanks! I'll take a look at it...

For now, a non HTML::parser version is available at:
http://ww.mit.edu/~belg4mit/software/bin/container

I should probably be using getopt too...

Any comments suggestions would be appreciated


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

Date: Fri, 01 May 1998 10:46:59 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: QRe: == vs. eq
Message-Id: <354998fa.2326677@news.btinternet.com>

On 2 May 1998 17:02:12 GMT, ? the platypus {aka David Formosa} wrote :

>In <354927f9.3181860@news.btinternet.com> Gellyfish@btinternet.com (Jonathan Stowe) writes:
>
>>On Sat, 02 May 1998 05:02:02 +0200, N i c l a s O l o f s s o n wrote
>[...]
>
>>>entertaining. FTM, who needs it!
>>>
>>You did WHAT to the manual?
>
>After long nights of programming the Cammel on the cover starts looking
>mighty attractive.
>
I have noticed that its left fore leg is sort of suggestive and
possibly is that a wink in its eye ?

/J\
Jonathan Stowe
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>



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

Date: Sat, 02 May 1998 16:59:01 -0600
From: mehta@mama.indstate.edu
Subject: regex help
Message-Id: <6ig4v4$at7$1@nnrp1.dejanews.com>

I am having to qualify the interface constants in java files.  I used
following which works kind of first time but misses few cases like if:
x = CONSTANT;

and also if I re run it then it produces o/p like
InterfaceName.InterfaceName.identifier.

First time it produces fine InterfaceName.identifier.

The regex is like:
$prefix = "InterfaceName\.";
s/([^\.]*)(identifier)/$1$prefix$2/g;

if I could convey my problem could you help to perfect the regex.  Basically
its to be

(any char other than dott including no char)(constants from interface)
substituted by
$1$interface$2

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


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

Date: Sat, 2 May 1998 14:40:05 -0500
From: "cesar" <cabustos@nevado.cui.edu.co>
Subject: Socket
Message-Id: <6ifb8j$k4m3@obenisco.cetcol.net.co>

Hi,

Where can I found a full manual of sockets in perl.

I use IO:sockets

thanks!




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

Date: Fri, 01 May 1998 12:15:21 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: Socket
Message-Id: <3549ad04.7330125@news.btinternet.com>

On Sat, 2 May 1998 14:40:05 -0500, cesar wrote :

>Hi,
>
>Where can I found a full manual of sockets in perl.
>
>I use IO:sockets
>

You might start with:

perldoc IO::Socket

There are also a few small examples through the various perlfaq.

The older (pink) Camel book had some example sockets code which I
think is the same that can be found in the eg/ directory of the
distribution.

However, for more detail on the subject of sockets in general you
might want to get a book on TCP/IP programming under unix.

/J\
Jonathan Stowe
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>



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

Date: Fri, 01 May 1998 12:55:08 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: Sybperl
Message-Id: <3549c27e.12189615@news.btinternet.com>

On Thu, 30 Apr 1998 18:41:27 -0400, LOI N PHAM wrote :

>I got Sybperl for NT binary contributed by Davide Ferina from
>
>http://www.mbay.net/~mpeppler/
>
>I copied *.pll files to /Perl/lib/Auto/Sybase, and *.pm to /Perl/Sybase.
>
>and make some script to query some data.
>
<snip code>
>
>I gave me the error:
>Error:  Parse exception.
>
>1) Did I install Sybperl binary correctly?  There was no instruction to
>install .pm

I'm not entirely convinced about the location to which you copied your
 .pm files if that is not a typo.  The "standard" distribution of perl
for 32 bit MS-Windows will have "dmake" with it and thus you should be
able to install in the usual fashion on NT.  

/J\
Jonathan Stowe
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>



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

Date: Sat, 02 May 1998 22:21:40 GMT
From: Tom Phoenix <rootbeer@teleport.com>
To: Jonas Bofjall <m9418@abc.se>
Subject: Re: Using the -- notation?
Message-Id: <Pine.GSO.3.96.980502151756.8809G-100000@user2.teleport.com>

On 2 May 1998, Jonas Bofjall wrote:

> Why doesn't this:
>   open(blaj, ">$ARGV[$#ARGV--]");
> work like this:
>   open(blaj, ">$ARGV[$#ARGV]");
>   $#ARGV--;
> 
> It seems to work with variables other than ARGV.

Really? If so, that's a (minor) bug in perl. But I couldn't get it to do
anything useful in a quick test. (Maybe you're using an old version?) 

Of course, even when your script is "just an example" (and perhaps
especially in that case!) you should _always_ check the return value after
opening a file. And it's generally recommended that filehandles should be
named in all caps. 

> Is there a more simple way to achieve the same result? 

I think you want pop, although shift is the more traditional choice. 

    $filename = pop @ARGV;		# or shift?
    open BLAJ ">$filename"
	or die "Can't open file '$filename' for write: $!";

Hope this helps! 

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: Sat, 02 May 1998 19:12:27 GMT
From: drummj@mail.mmc.org (Jeffrey Drumm)
Subject: Re: Win32::NetResource::AddConnection exhibiting undocumented behaviour ?
Message-Id: <354b6acd.416885309@news.mmc.org>

[posted and mailed]

On Fri, 01 May 1998 05:22:12 GMT, Gellyfish@btinternet.com (Jonathan Stowe)
wrote:

(snip)

>Hey, how did you know that the first thing to fail was opendir ?

Because that's all I used in one of the many tests I tried. Normally, if
you're NDS-authenticated, you can use UNCs to any file server/directory to
which you've been given rights. You don't _need_ to create a connection
unless you're _not_ authenticated . . . so getting a directory listing is
as easy as:

opendir(UNCDIR,"//server/volume/path") or die "Dammit! $!\n";
@files = readdir(UNCDIR);

>I have tried running the schedule service under various accounts
>including Administrator and fiddled with the user rights in various
>ways, I have tried both Novell & M$ clients etc etc but that is all NT
>stuff and not Perl.

Unfortunately, NT is the problem.

>What I am more concerned with here is why AddConnection is returning a
>true value when it hasnt actually made the connection.  The answer to
>this no doubt lies in some NT bollocks though.

I think the problem might be that AddConnection can't get to the resources
it needs to diddle to initialize the connection creation process in the
first place, and this is something its author didn't foresee. Returning
true in this case is certainly a bug.

>I'd love to be running this on a Linux machine however that netware
>client aint NDS aware and I dont want to be going asking the Netware
>administrator to set up umpteen separate accounts for each machine.

If these are IntraNetware 4.11 file servers, they do come equipped with a
limited-function but usable FTP server. If all you need to do is ship
around some files, Net::FTP should work, and you _could_ do it from Linux
if you like. ;-)

I move files from AIX to IntraNetware every single day this way. You log in
using the fully qualified NDS name; for example:

$ftp->login('.rtesi.services.mmcf','password') or die "Oh crap. $!\n";

What's neat about this is that the NDS account's home directory can reside
on any file server, but the ftp server only needs to run on one server in
the domain. The ftp server transparently provides you with access to your
home server.

>Ho,hum. back to the drawing board.

Good luck . . .
-- 
                           Jeffrey R. Drumm, Systems Integration Specialist
                                  Maine Medical Center Information Services
                                     420 Cumberland Ave, Portland, ME 04101
                                                        drummj@mail.mmc.org
"Broken? Hell no! Uniquely implemented." -me


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

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

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