[8367] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1984 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Feb 27 08:07:27 1998

Date: Fri, 27 Feb 98 05:01:22 -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           Fri, 27 Feb 1998     Volume: 8 Number: 1984

Today's topics:
    Re: "Or" Operator? (Abigail)
    Re: "Or" Operator? (Abigail)
    Re: "Or" Operator? (Abigail)
        &ReadParse not working in PerlScript ASP <alan@globalec.com>
        Array into Hash index? (Thomas Munn)
    Re: Array into Hash index? <danboo@negia.net>
    Re: better way to do this? <metcher@spider.herston.uq.edu.au>
    Re: better way to do this? <uri@sysarch.com>
    Re: better way to do this? (Craig Berry)
    Re: boston PUG (was Regional PUGs) (Nathan V. Patwardhan)
    Re: Can I open a filehandle on a scalar? <ebohlman@netcom.com>
    Re: CGI.pm a part of Perl (was Re: Cookies) <jdporter@min.net>
        Creating new files. NOBODY? (dylan)
    Re: dbm file format? <jdporter@min.net>
    Re: extract part of a string (Brian Lavender)
        Function evaluation within strings? <fisher@ers.ibm.comREMOVETHIS>
    Re: Getting Directory Listing <nospam@Ile-Maurice.Com>
        Give c.l.p.m. Your Tough Love - WAS: Re: dbm files (Jeffrey Drumm)
        How do you put a string into a array? <seong@cse.bridgeport.edu>
    Re: How do you put a string into a array? <ebohlman@netcom.com>
    Re: How do you put a string into a array? <dimitri102@hotmail.com>
    Re: How do you put a string into a array? (Martien Verbruggen)
        How to map a network drive (NT) using Perl? <jrcruto@bechtel.com>
    Re: how to rename coderefs ? <norton@alum.mit.edu>
    Re: Install of tk800.000.gz tkperl <jsjacks@primenet.com>
        Install problem on AIX <tim.suz@mediaone.net>
    Re: Install problem on AIX (Martien Verbruggen)
    Re: Is perl -e broken? (Martien Verbruggen)
    Re: Is there a way??? (Martien Verbruggen)
    Re: Java's hidden flaw (Mike Stok)
    Re: Killfile Triage (Jim Britain)
        Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: 27 Feb 1998 06:33:09 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: "Or" Operator?
Message-Id: <6d5mn5$nfc$2@client3.news.psi.net>

Ryan Rucker (rxruck2@uswest.com) wrote on 1640 September 1993 in
<URL: news:34F5D10C.291C0B5F@uswest.com>:
++ Hello,
++ 
++ I'm new to programming in general and perl specifically.  Here's a basic
++ statement I'm having a problem with.
++ 
++ Consider this if statement:
++ 
++      if ($var1 ne 'value1' || $var1 ne 'value 2') {
++                print ('$var1 is not equal to value 1 or value 2',"\n");
++    } else {
++               print ('$var 1 is equal to either value 1 or value 2',
++ "\n");
++  }
++ 
++ I having problems when perl evaluates $var1.  With this if statement,
++ even when $var1 is equal to either value 1 or value 2, it won't drop
++ through to the else portion.  Instead, it executes the first print
++ statement.
++ 
++ I think this has something to do with the || operator, but I don't know
++ a way around it.

It has to do with your logic.

Try to negate it:

    !($var1 ne 'value1'  ||   $var1 ne 'value2')   ==    (Morgan's law)
    !($var1 ne 'value1') && !($var1 ne 'value2')   ==
      $var1 eq 'value1'  &&   $var1 eq 'value2'


Now, unless you have a value that is first equal to 'value1', and
then equal to 'value2' (yes, that *is* possible in Perl), the else
part will not execute.


What you probably want is:

    if ($var1 ne 'value1' && $var1 ne 'value2') {
        print ".....";
    } else {
        print ".....";
    }


Abigail
-- 
perl -we '%_ = map {local $_ = $_; y/a-z/n-za-m/; ($_, $_)} @_ = map {lc} <>;
          print grep {$_{$_}} @_' < /usr/dict/words


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

Date: 27 Feb 1998 06:34:10 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: "Or" Operator?
Message-Id: <6d5mp2$nfc$3@client3.news.psi.net>

Duncan Cameron (dcameron@nospam.bcs.org.uk) wrote on 1640 September 1993
in <URL: news:01bd42f9$5050bb80$e63163c3@dns.btinternet.com>:
++ Er....
++ 
++ Is this a hoax?  It's the most basic way of getting a compound conditional
++ wrong.  ANY value of $var1 will either not equal 1 or will not equal 2
++ (think about it).

Not in Perl!

(*You* think about it)



Abigail
-- 
perl -wleprint -eqq-@{[ -eqw\\- -eJust -eanother -ePerl -eHacker -e\\-]}-


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

Date: 27 Feb 1998 06:35:52 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: "Or" Operator?
Message-Id: <6d5ms8$nfc$4@client3.news.psi.net>

Jr. (df6954@eecs1.eecs.usma.edu) wrote on 1640 September 1993 in
<URL: news:34F5DCF1.5032@eecs1.eecs.usma.edu>:
++ 
++ There is no value that $var1 can have that will cause execution 
++ to process the second print statement.

Wanna bet?


Abigail
-- 
perl -wle '$, = " "; print grep {(1 x $_) !~ /^(11+)\1+$/} 2 .. shift'


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

Date: Fri, 27 Feb 1998 02:45:52 -0500
From: Alan <alan@globalec.com>
Subject: &ReadParse not working in PerlScript ASP
Message-Id: <34F66F2E.4524F265@globalec.com>

I am using PerlScript in ASP files to create dynamic pages.  However, I
can't get &ReadParse (from cgi-lib.pl) to pickup the info from the form
that executes the script.  There is no error, just nothing shows up.
Help!

Thanks
Alan Sturm




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

Date: Fri, 27 Feb 1998 04:10:47 GMT
From: munn@bigfoot.com (Thomas Munn)
Subject: Array into Hash index?
Message-Id: <6d5eed$3f0@nnrp3.farm.idt.net>

Everyone:

I have am array that contains elements like this:

1 usctjm04
2 munn

etc.

What I want to do is get this array into a hash table that will use the first 
value as the key, and the second value as the returned value.  In my reading I 
noticed that Randall Scwartz did something similar with the map operator using 
a file, but I still didn't understand it.  Here is His code:

 open IN, "myfile" or die "Cannot open myfile: $!";
        my %email = map /^(.*?)\|(.*)/, <IN>;
        close IN;

Will the map function do what I need, or is there another way to get my array 
into a hash??

Thomas


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

Date: Thu, 26 Feb 1998 23:56:55 -0500
From: Dan Boorstein <danboo@negia.net>
Subject: Re: Array into Hash index?
Message-Id: <34F64797.FD17CEBB@negia.net>

Thomas Munn wrote:
> 
> I have am array that contains elements like this:
> 
> 1 usctjm04
> 2 munn
> 
> What I want to do is get this array into a hash table that will use the first
> value as the key, and the second value as the returned value.  In my reading I
> noticed that Randall Scwartz did something similar with the map operator using
> a file, but I still didn't understand it.  Here is His code:
> 
>  open IN, "myfile" or die "Cannot open myfile: $!";
>         my %email = map /^(.*?)\|(.*)/, <IN>;
>         close IN;

it is close, but i think it needs some alterations for your purposes.

  my %email = map {split} @data;

briefly, each item returned by @data is passed through the map block
using the default variable $_. so running a split leaves you with two
elements for each line of your sample data. the resulting list feeds
nicely into your hash as key-value pairs. be warned though, if your
data gets funky this will break very quickly. unless your are certain
about the format of your data, i would opt for a more robust method
with error checking and such.

if you had talked to randal schwartz instead of randall scwartz, he
might have mentioned all of this. ;)

cheers,

-- 
dan boorstein


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

Date: Fri, 27 Feb 1998 13:40:09 +1100
From: Jaime Metcher <metcher@spider.herston.uq.edu.au>
Subject: Re: better way to do this?
Message-Id: <34F62789.C6649A20@spider.herston.uq.edu.au>

Craig Berry wrote:
> 
> Jaime Metcher (metcher@spider.herston.uq.edu.au) wrote:
> : My Blue Camel, which has a lovely list of pattern matching rules in
> : order of precedence, doesn't mention non-greedy modifiers.
> 
> You need a new Camel, I guess.  Mine (2nd edition, 9/96) has it on page
> 63.
> 

OK.  Having Re-read The exceptionally Fine Manual, I see it (although,
Uri, I don't see that table as being to do with non-greedy modifiers). 
Thanks for the explanation - I'll just go back to polishing my glasses
over and over and over and over and....

--
Jaime Metcher


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

Date: 26 Feb 1998 23:18:24 -0500
From: Uri Guttman <uri@sysarch.com>
Subject: Re: better way to do this?
Message-Id: <x7hg5l1y0f.fsf@sysarch.com>

Jaime Metcher <metcher@spider.herston.uq.edu.au> writes:

> Craig Berry wrote:
> > 
> > Jaime Metcher (metcher@spider.herston.uq.edu.au) wrote:
> > : My Blue Camel, which has a lovely list of pattern matching rules in
> > : order of precedence, doesn't mention non-greedy modifiers.
> > 
> > You need a new Camel, I guess.  Mine (2nd edition, 9/96) has it on page
> > 63.
> > 
> 
> OK.  Having Re-read The exceptionally Fine Manual, I see it (although,
> Uri, I don't see that table as being to do with non-greedy modifiers). 
> Thanks for the explanation - I'll just go back to polishing my glasses
> over and over and over and over and....

you need glasses :-). look at the table on p. 63. it has 3 columns. what
are they labeled?  (the table does not say greedy which is slang but
mentioned in the text in ""). what are those ?????

i leave the reading (with new glasses) as an exercise for jaime!

uri


-- 
Uri Guttman                     SYStems ARCHitecture and Software Engineering
uri@sysarch.com                                          Have Perl, Will Hack
http://www.sysarch.com                (781) 643-7504 x*2  FAX: (781) 643-2710
Try the Best Search Engine on the Net -------->  http://www.northernlight.com


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

Date: 27 Feb 1998 07:56:59 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: better way to do this?
Message-Id: <6d5rkb$nb6$2@marina.cinenet.net>

Jaime Metcher (metcher@spider.herston.uq.edu.au) wrote:
: Craig Berry wrote:
: > Jaime Metcher (metcher@spider.herston.uq.edu.au) wrote:
: > : My Blue Camel, which has a lovely list of pattern matching rules in
: > : order of precedence, doesn't mention non-greedy modifiers.
: > 
: > You need a new Camel, I guess.  Mine (2nd edition, 9/96) has it on page
: > 63.
: 
: OK.  Having Re-read The exceptionally Fine Manual, I see it (although,
: Uri, I don't see that table as being to do with non-greedy modifiers).

The table at the top of p. 63 uses slightly different terminology:

  greedy     => maximal
  non-greedy => minimal
 
---------------------------------------------------------------------
   |   Craig Berry - cberry@cinenet.net
 --*--    Home Page: http://www.cinenet.net/users/cberry/home.html
   |      Member of The HTML Writers Guild: http://www.hwg.org/   
       "Every man and every woman is a star."


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

Date: 27 Feb 1998 02:22:01 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: boston PUG (was Regional PUGs)
Message-Id: <6d5809$2u5@fridge.shore.net>

Uri Guttman (uri@sysarch.com) wrote:

: i am trying to start one in the boston area. i have a small list of 4
: who are interested. we haven't had our first meeting yet. anyone out
: there in the boston area is invited to contact me about a boston area
: perl group.

There's already a Boston Perl Mongers group that's underway.  Please
join us if you wish.  We met for the first time two or so weeks ago
and there's another meeting in the works for March.  Perhaps you
wouldn't mind adding your four to boston.pm.org?  The mailing address
can be found there.

--
Nathan V. Patwardhan



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

Date: Fri, 27 Feb 1998 03:29:17 GMT
From: Eric Bohlman <ebohlman@netcom.com>
Subject: Re: Can I open a filehandle on a scalar?
Message-Id: <ebohlmanEp0pot.1tq@netcom.com>

Luis J. Martinez <luis@utdallas.edu> wrote:
: I want to open a filehandle on a scalar string rather than a file, so I can
: do file operations on it. Is there a way to do this?

Do you mean that you want to be able to print, etc. into a string and 
then possibly read back from it?  If so, check out the section in perltie 
about tied filehandles.




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

Date: Thu, 26 Feb 1998 11:13:15 -0500
From: John Porter <jdporter@min.net>
Subject: Re: CGI.pm a part of Perl (was Re: Cookies)
Message-Id: <34F5949B.34DA@min.net>

Martien Verbruggen wrote:
> 
> Perldoc perlfaq1

Merde, merde, merde. ICBIDT.


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

Date: Fri, 27 Feb 98 03:24:53 GMT
From: sylan@spamnet.yahoo.com (dylan)
Subject: Creating new files. NOBODY?
Message-Id: <6d5bg4$r1p8@chinook.Generation.NET>

Hi,

I'm having a problem with perl as I try to create new files. The script runs 
under User NOBODY thus files created are not world read/writeable. Is there a 
way to have perl create files owned by the current user (ie not NOBODY) other 
than using cgiwrap?

Thanks,
Carl  <Snipe@SPam.Generation.Net>

to reply, you know what to remove !


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

Date: Thu, 26 Feb 1998 14:27:08 -0500
From: John Porter <jdporter@min.net>
Subject: Re: dbm file format?
Message-Id: <34F5C20C.7EFB@min.net>

Kevin B Cohen wrote:
> 
> having looked in the blue camel, and the blue llama, and sniffed about
> in the man pages/faq's, i can't quite figure out how you go about
> making the files that get used by the dbmXXX functions.  

Why create pain for yourself? Use the 'tie' function
(documented on Camel p. 232) to open and access a dbm
database, e.g. a SDBM_File (Camel p. 493).

> i read on the
> "Perl for Win32" faq's that "DBM files are "binary"", so i don't guess
> i'm just going to be creating a couple of text files.

You're catching on!

> do i need to
> write a script to do the initial creation of the files???

Not if you mean, to create the files before you can go about
using them in your main application.  The files will spring
into existence the first time you use them -- if you give
the right flags to the tie() function.

hth,
John Porter


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

Date: Fri, 27 Feb 1998 08:11:42 GMT
From: brian@brie.com (Brian Lavender)
Subject: Re: extract part of a string
Message-Id: <34fb74da.3818862@news.jps.net>

On Thu, 26 Feb 1998 03:02:36 -0800, Marty McKolskey <marty@marty.net>
wrote:

>Try this:
>
>$data  = "data1 data2 data3";
>@data  = split(/ /,$data);      # splits $data on space
>$data2 = $data[1];              # $data2 now equals "data2"
>
>If you know $data is going to have a fixed length, you can also use 
>substr to pull out the part you need.
>
>Maybe not the quickest solution, but it certainly works.
>
>Marty

Why not:

$data2 = (split ' ', $data)[1];

A little more efficient.

brian
----------------
Brian Lavender                           http://www.brie.com/brian/
PO Box 19184, Sacramento,CA 95819-0814   (916) 443-6195
I am looking for a job in web development. See my home page. 
CGI, PERL, HTML,SQL, GPS, GIS <--- Impressive or what :?


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

Date: Thu, 26 Feb 1998 17:03:47 -0500
From: "John Fisher" <fisher@ers.ibm.comREMOVETHIS>
Subject: Function evaluation within strings?
Message-Id: <6d53g2$1gng$1@rtpnews.raleigh.ibm.com>


Is it possible to evaluate a function within a string? I'd like to do
something like the following:

============================================
sub mytest {
  ($num) = $_;
  return "-- $num --";
}

$str = <<EOF ;
This is a test of &mytest(42).
EOF

print $str;

============================================

I would like this to print "This is a test of --42--." but it doesn't do the
evaluation. It would make for cleaner string building if I could insert my
function this way.

Thanks,
John






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

Date: Thu, 26 Feb 1998 21:17:48 +0100
From: Stephane Lee Chip Hing <nospam@Ile-Maurice.Com>
Subject: Re: Getting Directory Listing
Message-Id: <Pine.LNX.3.95.980226211517.615A-100000@ile-maurice.dyn.ml.org>

On Thu, 26 Feb 1998, Eike Grote wrote:

> Hi,
> 
> Alex wrote:
> > 
> > Anyone know howto read a directory listing into an array?
> 
> Use opendir() - readdir() - closedir():
> 
>    opendir(DIR,$directory);
>    @list = readdir(DIR);
>    closedir(DIR);
> 
> 

Better use this:

opendir(DIR,$directory) or die "Unable to open $directory: $!";
@list = sort grep(!/^\./,readdir(DIR));
closedir(DIR);



-- Stephane Lee Chip Hing

----------------------------------------------------------------------
  All on Mauritius - http://Ile-Maurice.Com - Tout sur l'ile Maurice
----------------------------------------------------------------------

Do not reply to this e-mail address. It will be simply deleted.



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

Date: Fri, 27 Feb 1998 03:25:45 GMT
From: drummj@mail.mmc.org (Jeffrey Drumm)
Subject: Give c.l.p.m. Your Tough Love - WAS: Re: dbm files
Message-Id: <34f82d22.9225840@news.mmc.org>

On Thu, 26 Feb 1998 09:50:08 -0800, John Callender <jbc@west.net> wrote:
 
>There's an element of sadism in posting a 20-line response upbraiding
>someone for not researching his question properly before posting,
>telling him that you know the answer, giving him hints he may or may not
>be able to understand, and all the while refusing to give the answer --
>which would have required only a single line of about 10 characters.

It's called "Tough Love." I love Perl. I love the good stuff on c.l.p.m.
But dealing with this group has become like dealing with a kid  on crack .
 . . whiny, demanding, asking for the same stuff over and over and over
again and acting irrational when he/she doesn't get it. Mom and dad can't
say yes all the time or the kid will self-destruct . . . but if they say no
in just the right way, maybe, just maybe, something good will happen.
Unfortunately, they only get to deal with the problems as they come . . .
but man oh man, lately they've been coming fast and furious.

But I rest comfortably knowing that this was one user that _might_ spend a
little more time checking the resources at hand before posting here.
Unfortunately, some other newbie will come by with another clueless
question to take his place . . . and he too will get sent packing on his
way, smarting from a virtual rap on the knuckles dispensed along with some
good advice.

>I know the standard explanation for this, and I actually agree with it
>to a point: Better to whet the student's appetite for knowledge and
>point them in the right direction, teach a man to fish and you feed him
>for a lifetime, etc...

Hey, we agree on at least one thing.

>But the fact is that just as it annoys tchrist and his imitators to see
>the same dumb questions posted over and over again, it annoys me (and
>probably a few others as well) to see six identically worded comebacks
>making fun of the questioner (none of which gives the answer the
>questioner is obviously seeking). If the "greater good" we're seeking is
>to improve the signal-to-noise ratio of the group, I humbly submit that
>we'd be better off just answering the damn question.

Six replies with fishes is just as much noise as six replies with fishing
instructions.  At least the latter will do just a little bit to keep those
same folks from coming back for another unearned meal.

"Teach a man to fish and he'll eat forever. Feed a man a fish and he'll be
back knockin' on your door every damn day, yew betcha."

Besides, if I've got to pick between annoying you or annoying Tom
Christiansen, um, sorry, John . . . don't take it personally.

>If you want to teach the person to fish while you're at it, great! But
>belittling someone is a pretty lame way to do it. (Actually, this was a
>pretty tame example as far as belittling goes. But you know what I
>mean.)

But belittling seems to either get their attention or make them go away.
Both seem to be entropy-reversing results.  Besides,  I can't smack 'em
from here.

You see, I'm a little bit selfish about c.l.p.m. I want TomC, Randal, TomP,
Chip, Joseph, Jon and all the other Nuclear PerlBrains to hang around. I
learn a LOT from them. They don't know me from Adam, but I'd find it much
harder to live (um, work?) without them.  Many of them aren't happy with
the current state of affairs. That makes me unhappy too. And cranky.

>Just felt like pulling down the SNR a little more...

Sigh . . . hope I haven't pissed off the folks I was defending.

-- 
                           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: Thu, 26 Feb 1998 21:41:14 -0500
From: "Seong Y. Kim" <seong@cse.bridgeport.edu>
Subject: How do you put a string into a array?
Message-Id: <34F627CA.E1FB2920@cse.bridgeport.edu>

Let's say that I have a string "I you he she they me her him
his them their", and I want the array like this.

$string = "I you he she they me her him his them their";

@array;
$array [1]= "I";
$array[2]= "you";
$array[3]="he";
 .....
$array[11]="their";

how do you do this?

thanks to .......   ;-)




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

Date: Fri, 27 Feb 1998 03:18:49 GMT
From: Eric Bohlman <ebohlman@netcom.com>
Subject: Re: How do you put a string into a array?
Message-Id: <ebohlmanEp0p7E.1DJ@netcom.com>

[modules group removed from followups]

Seong Y. Kim <seong@cse.bridgeport.edu> wrote:
: Let's say that I have a string "I you he she they me her him
: his them their", and I want the array like this.

: $string = "I you he she they me her him his them their";

: @array;
: $array [1]= "I";
: $array[2]= "you";
: $array[3]="he";
: .....
: $array[11]="their";

: how do you do this?

"perldoc -f split" will tell you all you need to know, and more.



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

Date: Thu, 26 Feb 1998 20:21:48 -0800
From: "DKD CEO." <dimitri102@hotmail.com>
Subject: Re: How do you put a string into a array?
Message-Id: <34F63F5C.CA6@hotmail.com>

Seong Y. Kim wrote:
> 
> Let's say that I have a string "I you he she they me her him
> his them their", and I want the array like this.
> 
> $string = "I you he she they me her him his them their";
> 
> @array;
> $array [1]= "I";
> $array[2]= "you";
> $array[3]="he";
> .....
> $array[11]="their";
> 
> how do you do this?
> 
> thanks to .......   ;-)

Just use:

@array = $string


There ya go!,

DK!
+=
http://dkd.home.ml.org/index.html -Web Design Like You've Never Seen.


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

Date: 27 Feb 1998 04:19:58 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: How do you put a string into a array?
Message-Id: <6d5ete$a2j$8@comdyn.comdyn.com.au>

[This has NOTHING to do with perl modules, removed clp.modules]

In article <34F627CA.E1FB2920@cse.bridgeport.edu>,
	"Seong Y. Kim" <seong@cse.bridgeport.edu> writes:
> Let's say that I have a string "I you he she they me her him
> his them their", and I want the array like this.
> 
> $string = "I you he she they me her him his them their";

Did you make ANY effort at all to find this answer yourself? Did you
look at any documentation? Did you read any of the other posts in this
group? Did you use dejanews to find an answer? I doubt it sincerely.

perldoc perl
perldoc -f split

And please, do yourself a favour and buy a good book about perl. And
visit http://www.perl.com/.

Martien
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | If it isn't broken, it doesn't have
Commercial Dynamics Pty. Ltd.       | enough features yet.
NSW, Australia                      | 


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

Date: Fri, 27 Feb 1998 02:25:26 GMT
From: "Jay Cruto" <jrcruto@bechtel.com>
Subject: How to map a network drive (NT) using Perl?
Message-Id: <01bd4326$d502f140$37520193@sinw0313.bechtel.com>

How to map a network drive using Perl?  

$root_drive     = "Z:";
$root_service   = "\\\\SINS0001\\BPS_DOCS";
$connect        = "NET USE $root_drive $root_service";
system ("$connect");  <--- is this ok?
open(LISTING, "$root_drive\\category.lst"))

Does NET.EXE needs to be in the \cgi-bin\ of the server also?
And if this command is executed, which one is actually mapping to the
drive, the local machine who opened up the page or the server itself? 
Anything wrong with the script?

Thanks for any help.






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

Date: 26 Feb 1998 21:31:17 -0600
From: Joseph Wayne Norton <norton@alum.mit.edu>
Subject: Re: how to rename coderefs ?
Message-Id: <87ra4praey.fsf@alum.mit.edu>


Thanks for both of your help. 

FYI - I am not able to use inheritance because I'm not the author of
the client code.  I have to modify some of the properties of the
LWP::UserAgent used inside the CPAN module to get outside of a
firewall. I feel this is the simplest and cleanest way changing it
behavior and not having to rewrite any of the CPAN module.

- joe

> 
> > use LWP::UserAgent;
> >
> >   package LWP::UserAgent;
> >   *_new{CODE} = *new{CODE};
> > 
> >   sub new {
> >     my ($self) = &_new(@_);
> >     $self->agent('Mozilla/3.01');
> >     return($self);
> >   }
> 
> I would say you are probably going about this the wrong way.
> If I were doing this, I would use inheritance.
> 
> package MyUserAgent;
>   @ISA = qw( LWP::UserAgent );
> 
>   sub new {
>     my $p = shift;
>     my $self = $p->SUPER::new( @_ );
>     $self->agent('Mozilla/3.01');
>     $self;
>     # or bless $self, $p; # if you override other methods.
>   }
> 
> Then you just need to make a new MyUserAgent in your
> client code, rather than new LWP::UserAgent.
> The object will still be a LWP::UserAgent. This is o.k.
> if the only method you override is new; if you need
> to override other methods, you will want to rebless the
> object as a MyUserAgent.
> 
> hth,
> 
> John Porter

-- 

--
Joe Norton
email:norton@alum.mit.edu


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

Date: 27 Feb 1998 01:14:02 -0700
From: Jerald Jackson <jsjacks@primenet.com>
Subject: Re: Install of tk800.000.gz tkperl
Message-Id: <Pine.BSI.3.96.980227011131.10857A-100000@usr06.primenet.com>

> TRANS(SocketUNIXConnect) () can't connect: errno = 111
> couldn't connect to display ":0" at blib/lib/Tk/MainWindow.pm line 54.
> MainWindow->new() at demos/widget line 21
> make: *** [test_dynamic] Error 111
> 

> Any ideas about where I am going wrong?

My guess would be that exporting your display would help.

For bash or ksh "export DISPLAY=my.ip.number.here:0.0"

> 
> Thanks
> 
No problem. :-)
> 



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

Date: Thu, 26 Feb 1998 21:15:14 -0500
From: Tim and Suzan <tim.suz@mediaone.net>
Subject: Install problem on AIX
Message-Id: <34F621B1.FAE1E9C1@mediaone.net>

Can anyone help us?
We're trying to install perl 4.04 on AIX, and seem to a bunch of error
messages having to do with dynaloader when we run the test.  Any
thoughts?

Also - any suggestions for support sources in the US?

Thanks,
Tim Twombly



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

Date: 27 Feb 1998 04:14:56 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Install problem on AIX
Message-Id: <6d5ek0$a2j$7@comdyn.comdyn.com.au>

In article <34F621B1.FAE1E9C1@mediaone.net>,
	Tim and Suzan <tim.suz@mediaone.net> writes:
> Can anyone help us?

doubtful.

> We're trying to install perl 4.04 on AIX, and seem to a bunch of error

There is no such beast as perl 4.04. Maybe you mean perl 5.004_04? You
really should be specific when you ask these sorts of questions.

> messages having to do with dynaloader when we run the test.  Any
> thoughts?

WHAT error messages? We're not psychic. If you want help, talk to us.

Did you read the README and INSTALL file for notes specific to AIX?

> Also - any suggestions for support sources in the US?

www.perl.com
comp.lang.perl.misc (if you ask sensible questions)

www.perltraining.com

Martien
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | I'm just very selective about what I
Commercial Dynamics Pty. Ltd.       | accept as reality - Calvin
NSW, Australia                      | 


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

Date: 27 Feb 1998 03:51:12 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Is perl -e broken?
Message-Id: <6d5d7g$a2j$1@comdyn.comdyn.com.au>

In article <34F5FF34.1419F71F@hq.caci.com>,
	Reed Scarce <rscarce@hq.caci.com> writes:

> From the prompt ('95 or NT)....
> C:\perl:>perl -e 'print "hello world\n";'

> Is the -e switch broken?

No, the DOS/NT shell is broken, or at least very insufficient.

have a look at the perlrun man page:

perldoc perlrun

and look for the explanation of the -e switch.

Martien
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | 
Commercial Dynamics Pty. Ltd.       | Curiouser and curiouser, said Alice.
NSW, Australia                      | 


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

Date: 27 Feb 1998 04:10:16 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Is there a way???
Message-Id: <6d5eb8$a2j$6@comdyn.comdyn.com.au>

In article <34f712bf.5430572@nntp.harborcom.net>,
	kschreff@harborcom.net (Schreffman) writes:
> 	In a Perl script running on NT, I want to check if another
> process is running.  For example, I want to check if xyz.exe is
> currently executing??  Can this be done???

If it is possible, it's NT specific. Check out the Win32:: modules on
CPAN:

http://www.perl.com/CPAN/modules/

Martien
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | A Freudian slip is when you say one
Commercial Dynamics Pty. Ltd.       | thing but mean your mother.
NSW, Australia                      | 


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

Date: 27 Feb 1998 01:54:10 GMT
From: mike@stok.co.uk (Mike Stok)
Subject: Re: Java's hidden flaw
Message-Id: <6d56c2$9bm@news-central.tiac.net>

In article <34F464FE.6DFC@min.net>, John Porter  <jdporter@min.net> wrote:
>[...]  After all, what
>computer scientist or hacker hasn't invented his own language
>or three?  But when Sun's marketroids get hold of it....
>Now look what they're doing to Tcl -- "SunScript".
>"A Sun development team dedicated to promoting Tcl/Tk as the
>scripting language for the next generation of enterprise and
>Internet applications." (sunscript.sun.com)

Shouldn't that be www.scriptics.com now :-)

Mike
-- 
mike@stok.co.uk                    |           The "`Stok' disclaimers" apply.
http://www.stok.co.uk/~mike/       |   PGP fingerprint FE 56 4D 7D 42 1A 4A 9C
http://www.tiac.net/users/stok/    |                   65 F3 3F 1D 27 22 B7 41
stok@colltech.com                  |            Collective Technologies (work)


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

Date: Fri, 27 Feb 1998 05:52:40 GMT
From: jbritain@home.com (Jim Britain)
Subject: Re: Killfile Triage
Message-Id: <34f6536b.1679058@news>

On Wed, 25 Feb 1998 04:49:42 GMT, nospam_synic@omen.net.au (peter
caffin) wrote:

>
>I simply do not see what the fuss is about. Sighting nospam_ masks in From:
>headers during a reply is trivial (unless you happen to be writing a spam-bot
>which does your replying for you).
>
No deal from me on that one (reading to the end of the text)  I answer
upwards of 100 help messages a day.  Quite simply, if a user does not
have a valid address in his message header, he does not get a
response.  I just don't have time to look for "special instructions"
to readdress a message.

I have one particular irate client from Australia.  Not only was his
"From:" address nospam@nowhere.org he also forgot to put a correct
address anywhere in the message.  I'm not going to dig for it.  He can
use the phone to call our 800 number.


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

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

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