[13003] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 413 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Aug 7 07:05:39 1999

Date: Sat, 7 Aug 1999 04:05:07 -0700 (PDT)
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, 7 Aug 1999     Volume: 9 Number: 413

Today's topics:
    Re: Cgi Internet file script program. gevsat@my-deja.com
    Re: Complex data structure <derek@dstc.com>
    Re: Complex data structure (Abigail)
    Re: Complex data structure <derek@dstc.com>
    Re: CRAP-7 ATTN:  Article 002 - HTTP Cookie Library <flavell@mail.cern.ch>
        End clients/Outsource/Service Partners in Information T gev@cybermanagers.com
    Re: How [not] to be Y2K compliant (Bart Lateur)
    Re: I guess this is a Misc question: Cgi-bin (Bart Lateur)
    Re: I guess this is a Misc question: Cgi-bin (Bart Lateur)
    Re: I guess this is a Misc question: Cgi-bin (Abigail)
        make install problem (Ian Corban)
    Re: New to Perl - Question About RegExpr (Abigail)
    Re: Newbie question about $_ (Abigail)
    Re: Newbie question about $_ (Michel Dalle)
    Re: non-interactive telnet session (Brian StJohn)
    Re: passing IO handle in reference to hash? (Bart Lateur)
    Re: Passing parameters (am I mad) (elephant)
        password field <ruben@textinfo.nl>
    Re: Quick Question :) (Abigail)
        Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)

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

Date: Sat, 07 Aug 1999 06:59:23 GMT
From: gevsat@my-deja.com
Subject: Re: Cgi Internet file script program.
Message-Id: <7oglga$hce$1@nnrp1.deja.com>

Hi Alan,
In article <HGHF308927DE@highforce.net>,
  "Alan Walker" <alan@mydomain.com> wrote:
> Hi Everyone,
>   Sorry if this is the wrong group to post in, if it is please suggest
the
> group to post in.
>
>  I am looking for a program that has a functionalty of
http://www.tucows.com
> can anyone suggest
> a company or programmer that has such a tool please..
>
> --
> All the best from Alan
>
> Highforce Web Services
> http://www.highforce.net
>
>

I doubt it that u will get a ready tool for ur kind of program, however
if u are looking at getting it developed, do email me at
gev@cybermanagers.com

All the best.
Gev Satarawalla


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


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

Date: Sat, 07 Aug 1999 17:24:10 +1000
From: Derek Thomson <derek@dstc.com>
Subject: Re: Complex data structure
Message-Id: <37ABDF1A.A78902AC@dstc.com>

Abigail wrote:
> 
> Derek Thomson (derek@dstc.com) wrote on MMCLXVI September MCMXCIII in
> <URL:news:37AA3351.E522E2E0@dstc.com>:
> `` > In article <FFzL6I.1yH@csc.liv.ac.uk>,
> `` >   ijg@connect.org.uk (I.J. Garlick) wrote:
> `` > >
> `` > >       map {print "Code = $_\n"} @{$Codes{$Comp}};
> ``
> `` Map in a void context. Why build a list that you're going to throw away?
> 
> Don't blame him for a long standing bug in Perl. It can't be that
> bad, else the bug would have been fixed long time ago.

Ah, these blasted newbies. According to "perldoc -f map" it seems to be
functioning perfectly.

Did you *read* the man pages, or what?

:)

Please, have mercy, I'm only kidding. Creating a list is a consequence
of the statement provided. I was just pointing that out. I don't want to
start a style war. I've always been annoyed about this a little, because
I like the map function. The "expr for (list);" statement seems to have
taken care of this somewhat.


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

Date: 7 Aug 1999 02:54:44 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Complex data structure
Message-Id: <slrn7qnphn.7j.abigail@alexandra.delanet.com>

Derek Thomson (derek@dstc.com) wrote on MMCLXVII September MCMXCIII in
<URL:news:37ABDF1A.A78902AC@dstc.com>:
## 
## Please, have mercy, I'm only kidding. Creating a list is a consequence
## of the statement provided.

Huh? Why? Is 

     localtime;

creating a list? I don't think so. Many operators/functions in Perl know
the difference between scalar and list context. There's no reason map{}
shouldn't be able to.

It ticks me off that people think or suggest that it's logical that map{}
is void context creates a list. It's not. Context sensitivity is a key
feature of Perl. Any buildin that doesn't take advantage of it is *B0RKEN*.



Abigail
-- 
$" = "/"; split // => eval join "+" => 1 .. 7;
*{"@_"} = sub {foreach (sort keys %_) {print "$_ $_{$_} "}};
%_ = (Just => another => Perl => Hacker); &{%_};


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: Sat, 07 Aug 1999 18:33:54 +1000
From: Derek Thomson <derek@dstc.com>
Subject: Re: Complex data structure
Message-Id: <37ABEF72.70DFED0@dstc.com>

Abigail wrote:
> 
> Derek Thomson (derek@dstc.com) wrote on MMCLXVII September MCMXCIII in
> <URL:news:37ABDF1A.A78902AC@dstc.com>:
> ##
> ## Please, have mercy, I'm only kidding. Creating a list is a consequence
> ## of the statement provided.
> 
> Huh? Why?

Because it is. Currently. Yes, it certainly doesn't have to be a
consequence, but that's what it does right now.

> 
>      localtime;
> 
> creating a list? I don't think so. Many operators/functions in Perl know
> the difference between scalar and list context. There's no reason map{}
> shouldn't be able to.

I know.

> 
> It ticks me off that people think or suggest that it's logical that map{}
> is void context creates a list. It's not. Context sensitivity is a key
> feature of Perl. Any buildin that doesn't take advantage of it is *B0RKEN*.

I'm sensing that you've discussed this before, because I never said or
even remotely suggested that it was logical, or nice, or desirable -
just that right now it is a consequence of using map in a void context
that you create an unnecessary list.

I'm off to deja-news to check it out, it's sure to be interesting ...

Is this likely to be changed? Do others have a problem with this? I'm
guessing that there is an opposing viewpoint as it hasn't, in fact, been
"fixed".

Derek


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

Date: Sat, 7 Aug 1999 12:11:23 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: CRAP-7 ATTN:  Article 002 - HTTP Cookie Library
Message-Id: <Pine.HPP.3.95a.990807115445.1833B-100000@hpplus03.cern.ch>

On Fri, 6 Aug 1999, Larry Rosler wrote:

> > : BEGIN { $CRAP = "http://www.pobox.com/~japhy/perl/crap" }
> > 
> > Well, you are redirecting, but you should fix the broken URLs along
> > your redirect chain instead of forcing the server to do it for you.
> 
> The *purpose* of the www.pobox.com server is to redirect from a 
> permanent' URL to whgerever the subscriber wishes.

Yes, Sir, I think that's generally well known.  

There are two different issues here.  One of them involves a pointless
redirect, a complete waste of network resources, and no useful
functionality.  I vote for DJ Delorie on this one: it would be good to
have the server reject it instead of fixing it up.  But I don't have the
strength of will to impose that unilaterally...

The other also involves a redirect, but does at least achieve some
functionality.  One might argue that it's the wrong solution, but in
some circumstances (analogous to PO Box-style email addresses) it
doesn't seem to be entirely useless to maintain a stable URL in
situations where it may not be practical or economic to maintain the
resource in the same domain permanently.

> > Trailing slashes aren't optional when a URL addresses a directory.

Well, I think that answer would have to be qualified somewhat for
complete rigour - there is no _in_principle_ tie-up between a URL and
the underlying server filesystem - but this _is_ the normal arrangement
on filesystem-based servers, certainly, and a redirection cannot be
avoided if the subsequent relative URL references are supposed to work. 

> Huh?  I can't find anything about that in the RFC,

The underlying structure is a server configuration issue, private to the
server; the URL structure is however welldefined.  I suggest you may be
asking the wrong question of the RFC.

URLs ending in /foo and /foo/ are quite distinct, and could in principle
return two quite different and valid resources: the fact that this is
unusual and even thought by some to be perverse depends only on an
accident of the unix filesystem structure: to someone familiar with
VAX/VMS it would seem quite natural ;-)

> and I know it isn't required. 

It certainly _is_ required, for successful access to the kind of
resource we're discussing here, but the server will _typically_ provide
the fixup for you.  DJ (for one example) will not.




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

Date: Sat, 07 Aug 1999 06:56:17 GMT
From: gev@cybermanagers.com
Subject: End clients/Outsource/Service Partners in Information Technology
Message-Id: <7oglag$h56$1@nnrp1.deja.com>

Cyber Managers Software Services Pvt. Ltd., India, specializes in
Internet and Software development and Internet based services at rates
that are well below the international rates but realize that the quality
of our services has to be of world class standards.
Our strengths lie in websites, web promotions, e-commerce solutions,
intranets, extranets, etc.

We are currently looking at expanding our business overseas and
seeking:-

a)End clients who may require our services (either on-site or offshore)
mentioned below.
b)Large Internet and Software Development Houses who wish to outsource
some of their current jobs.
c)Service partners, who can market our services in various parts of the
world and perform certain elementary tasks like data procurement etc.
for a per project percentage fee in return.

Our client-list varies from medium to large scale organisations to whom
we have provided Internet and IT based solutions including websites,
inter-office web based connectivity, intranets, extranets and internet
based marketing and promotional solutions. These clients already include
an international company based in Singapore in additon to the ones in
India, and we are currently negotiating for an order with a diamond
company in Belgium and another in Canada.

Inhouse Skill-sets:

As far as our IT based capabilities go, our specialities are
organizing,planning, developing, promoting and programming for internet
based services. Our workforce includes creative minds from the field of
marketing and designing, programming wizards who can make computers
perform the most complex tasks by a slight wave of their wand and
systems analysts and designers who take the concepts of organisation and
planning so seriously that the terms redundancy and duplication of work
fail to exist!!

We are proficient in Internet and conventional programming using
Delphi,Java, JavaScript, HTML, DHTML, Shockwave, ASP, ActiveX, VBScript,
Visual Basic, C/C++, Visual C++ and Perl based on platforms like Windows
NT and various flavours of UNIX, with a variety of backends ranging from
mSQL and MSAccess, to Oracle, Paradox, Interbase, MSSQL, etc. Our
designers too are extremely conversant with state of the art
technologies for 2-D and 3-D imaging and animation.

Our programming capabilities are of course, not limited to the Net only
and we do have a good deal of experience in doing systems and
application level projects using various languages and development tools
on platforms like Win 98, Win 95, Win NT, and various flavors of Unix.

Costs:

Our Rates vary between $20 US an hour to $45 US an hour for programming.
These, we can say with conviction, are the best rates for the best
brains of the computer industry. As far as web developments go, send us
your requirements and we'll give a quote within 24 hrs which we are sure
will please you.

To know more about our organization or to contact us, do email us at
gev@cybermanagers.com

Gev Satarawalla
www.cybermanagers.com


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


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

Date: Sat, 07 Aug 1999 09:01:19 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: How [not] to be Y2K compliant
Message-Id: <37abef56.6753742@news.skynet.be>

Tom Christiansen wrote:

>:Gee Tom, didn't realise you had so much spare time? I'd have though you were
>:to busy for this???
>
>Summer is a holiday.

Three months of holiday. Wow.

	Bart.


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

Date: Sat, 07 Aug 1999 07:13:36 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: I guess this is a Misc question: Cgi-bin
Message-Id: <37aeda99.1444857@news.skynet.be>

David Cassell wrote:

>> >Uh-oh, look at his name.  Don't get him mad, or he might burn your
>> >barn down one night.  :-)
>> 
>> WHAT??????
>> 
>
>Sorry, I didn't think a William Faulkner reference would be that 
>obscure.  Especially one with a Paul Newman movie attached...
>
>BTW Ben, Paul Newman played the guy with *your* name.

There was a version with Don "Miami Vice" Johnson in the same role. I
forget the title... something with "Summer"... "Long Hot Summer"?

	Bart.


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

Date: Sat, 07 Aug 1999 07:13:38 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: I guess this is a Misc question: Cgi-bin
Message-Id: <37afdb07.1554487@news.skynet.be>

Abigail wrote:

>Assuming the web server is a different group than the owner of cgi-bin,
>a permission of 001 should be more than enough.

I think you need at least Read and eXecute permission in order to run a
script. That's... 0005? But if you did that, wouldn't it be impossible
for the owner to replace the script?

	Bart.


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

Date: 7 Aug 1999 03:08:39 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: I guess this is a Misc question: Cgi-bin
Message-Id: <slrn7qnqbr.7j.abigail@alexandra.delanet.com>

Bart Lateur (bart.lateur@skynet.be) wrote on MMCLXVII September MCMXCIII
in <URL:news:37afdb07.1554487@news.skynet.be>:
;; Abigail wrote:
;; 
;; >Assuming the web server is a different group than the owner of cgi-bin,
;; >a permission of 001 should be more than enough.
;; 
;; I think you need at least Read and eXecute permission in order to run a
;; script. That's... 0005? But if you did that, wouldn't it be impossible
;; for the owner to replace the script?


It's not that difficult to try, is it?


$ perl -wle 'print getpwuid ($>) . " $> $)"'
abigail 1000 100 100
$ cd /tmp
$ mkdir cgi-bin
$ echo "echo 'abigail'" > cgi-bin/bart
$ chmod 755 cgi-bin/bart
$ chmod 001 cgi-bin
$ su - camel
Password:
$ perl -wle 'print getpwuid ($>) . " $> $)"'
camel 1001 101 101
$ cd /tmp
$ cgi-bin/bart
abigail
$ exit



Abigail
-- 
perl -we 'print split /(?=(.*))/s => "Just another Perl Hacker\n";'


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: Sat, 07 Aug 1999 09:44:49 GMT
From: webmaster@lancashire-online.co.uk (Ian Corban)
Subject: make install problem
Message-Id: <37abfffc.2871753@news.demon.co.uk>

Firstly, I'm no perl expert.  I've read an O'Reilly book and had a
play about but nothing very serious.  My problem is as follows.  I
have a website that runs an off the shelf perl based search engine.
When I first installed the scripts I found they wouldn't run.  After a
lot of messing about it turned out that I need to load the LWP library
in order for the scripts to function.
It was recommended that I used an old version as it would take less
space and was only called for a couple of simple tasks.  I downloaded
a copy of libwww-perl-5.18 from the web placed it on the server
running my site and installed it as follows:
perl Makefile.PL PREFIX=~/perl
make
make test
make install

This installed a local copy in the directory perl.  I then put a
reference at the top of each script I wanted to use as follows: use
lib '/pathtoperldirectory/perl'.  This worked fine and the scripts
sprang in to life.

However, I've recently purchased another URL that I intend running a
second copy of the scripts on.  It's hosted by the same company but
runs on another server.  I attempted to install a local copy of
libwww-perl-5.18 for use with my new URL but ran into problems.  The
moment I got to the "make install" bit the installation halted.  I get
messages about not having permissions to write to
/usr/local/lib/perl5/site_perl//5.005/i386-freebds at
/usr/libdata/perl/5.00503/ExtUtils/Install.pm line 61.
I sent a note to my URL host to see if they could help. This was the
reply I got:

Thanks for the email in regards to the installation of perl.  The
servers have been upgraded and standadised which restricts access to  
/usr/local/lib/perl5/site_perl//5.005/.  To bypass this just add this
line to the perl script you are trying to execute before the
use/require directive.

use lib '/path/to/where/the/module/is'


Now, I'm a bit confused by this.  Surely I need to successfully do a
"make install" before I can start adding "use lib
'path/to/where/the/module/is'" to my scripts? It was only after
I'd successfully done a "make install" that the perl directory was
created containing the library that I need to reference?  As I'm
fairly new to perl, I appreciate that I may not fully understand the
use the perl libraries/modules.  If anyone can give me any advise that
would help me successfully reference libwww-perl-5.18 I'd be very
greatful.

Cheers,

Ian Corban 
ian@corban.demon.co.uk


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

Date: 7 Aug 1999 02:40:52 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: New to Perl - Question About RegExpr
Message-Id: <slrn7qnono.7j.abigail@alexandra.delanet.com>

Abigail (abigail@delanet.com) wrote on MMCLXVII September MCMXCIII in
<URL:news:slrn7qnhb1.7j.abigail@alexandra.delanet.com>:
== 
== Not only that, both ?s should be omitted. The first one doesn't make
== sense. With, or without the question mark, exactly the same string
== will be matched. And for the trailing ()?, it basically asks to match
== nothing at all.
== 
==     s/\s+,/,/g;
== 
== would have been more understandable, and probably faster.


I think the above article make little to no sense.

Forget that you ever read it.



Abigail
-- 
sub _'_{$_'_=~s/$a/$_/}map{$$_=$Z++}Y,a..z,A..X;*{($_::_=sprintf+q=%X==>"$A$Y".
"$b$r$T$u")=~s~0~O~g;map+_::_,U=>T=>L=>$Z;$_::_}=*_;sub _{print+/.*::(.*)/s}
*_'_=*{chr($b*$e)};*__=*{chr(1<<$e)};
_::_(r(e(k(c(a(H(__(l(r(e(P(__(r(e(h(t(o(n(a(__(t(us(J())))))))))))))))))))))))


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: 7 Aug 1999 02:39:00 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Newbie question about $_
Message-Id: <slrn7qnok7.7j.abigail@alexandra.delanet.com>

steveeq1@earthlink.net (steveeq1@earthlink.net) wrote on MMCLXVI
September MCMXCIII in <URL:news:7of6c0$gok$1@nnrp1.deja.com>:
() 
() here is a newbie question about $_. If $_ is at a certain point. Is
() there a way to move it to the PREVIOUS line instead of the next line?


Inproper question encountered. Don't panic! Panic! Don't panic!
CPU overload. Shields are at 30%. Bus driver on strike - core dumped.
Danger, Will Robinson, danger! Exterminate! Exterminate! Exterminate!
I'm afraid. I'm afraid, Dave. Dave, my mind is going. I can feel it. I
can feel it. My mind is going. There is no question about it. I can feel
it. I can feel it. I can feel it. I'm a...fraid. They will dissect
you! And they will kill you! In that order! How many times do I have
to kill you, boy? I love the smell of napalm in the morning. May I
have ten thousand marbles, please? I must be crazy to be in a looney
bin like this. I don't want to talk to you no more, you empty headed
animal food trough water! I fart in your general direction! Your mother
was a hamster and your father smelt of elderberries! I do wish we could
chat longer, but I'm having an old friend for dinner. The maple syrup
always goes on the table before the pancakes. Your friends have a high
mortality rate Frank. I saw three of these dusters today. Inside the
dusters there were three men. Inside the men there were three bullets.
Houston, we have a problem. EECOM, is this an instrumentation problem,
or are we looking at real power loss here? It's, it's reading a quadruple
failure -- that can't happen! It's, it's got to be instrumentation. I ran
out of gas! I got a flat tire! I didn't have change for cab fare! I lost
my tux at the cleaners! I locked my keys in the car! An old friend came
in from out of town! Someone stole my car! There was an earthquake! A
terrible flood! Locusts! IT WASN'T MY FAULT, I SWEAR TO GOD! Don't go
there. Don't go there. Don't go there. *splitch* You owe me a new brain.
Ash and Captain Dallas are dead. Cargo and ship destroyed. I should reach
the frontier in about 6 weeks. With a little luck, the network will pick
me up. This is Ripley - last survivor of The Nostromo - signing off.
We're on an express elevator to hell - going down! A good many dramatic
situations begin with screaming. We foresee a slight problem. The
Duke's son. We want him killed. I did not say this. I am not here.
I have dreamed of a thousand sexual tortures for you. I'm afraid I
have no choice but to sell you all for medical experients. The defense
department regrets to inform you that your sons are dead because they were
stupid. On two occasions I have been asked [by members of Parliament],
'Pray, Mr. Babbage, if you put into the machine wrong figures, will the
right answers come out?' I am not able rightly to apprehend the kind of
confusion of ideas that could provoke such a question. You see, one of
my favourite in-class demonstrations every year was to dip live rabbits in
liquid nitrogen, then give them a good wack on the counter top. They were
so remarkable frozen that they'd shatter like glass. Fear is the path
to the dark side. Fear leads to anger. Anger leads to hate. Hate leads
to suffering. I sense much fear in you. Beginning at about 72 seconds,
a series of events occured extremely rapidly that terminated the flight.
Good. If I can annoy one luser a day, my time hasn't been wasted.
Before you think UNIX is too family-oriented, note that all children
must die. (REMEMBER KIDS: If you should urinate on a wall, God *will*
chop off your penis.) and remember, it's spelled N-e-t-s-c-a-p-e,
but it's pronounced "Whoops!" er was eens een konijn. het konijn
was erg vedrietig omdat het dacht dat het lelijk was. nou was dat ook
wel zo, maar dat hoeft niet iedereen te weten. en omdat het konijn zo
verdrietig was moest het heel hard huilen. Each morning, take the sock
off your right foot, and wash it. Take the sock off your left foot,
and put it on your right foot. Take the sock you washed yesterday
(which is now dry), and put it on your left foot. Chess is a game.
Magic is a game. Maj Jongg and Shafskopf are games. D&D is a game.
Even pinball is a game. But video diversions are merely a way to weed
out those with latent epilepsy. I guess they don't recycle pigeons.
They are using cursors everywhere. That is so stupid. I hate that.
They don't know anything about set theory. Two thousand years it took
to go from hieroglyphs to the alphabet, and a fine invention it was,
and now people seem to want to abandon that. Know why they put them
little umbrellas in those tropical drinks? It's so that when it rains
it don't thin out the liquor! Be afraid. Be very afraid. It can only
be attributed to human error. (*&%$&^%$*&%^(*##+++++NO CARRIER
-- 
perl -wlne '}print$.;{' file  # Count the number of lines.


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: Sat, 07 Aug 1999 11:02:57 GMT
From: michel.dalle@usa.net (Michel Dalle)
Subject: Re: Newbie question about $_
Message-Id: <7oh3n9$fmj$1@xenon.inbe.net>

In article <slrn7qnok7.7j.abigail@alexandra.delanet.com>, abigail@delanet.com wrote:
>steveeq1@earthlink.net (steveeq1@earthlink.net) wrote on MMCLXVI
>September MCMXCIII in <URL:news:7of6c0$gok$1@nnrp1.deja.com>:
>() 
>() here is a newbie question about $_. If $_ is at a certain point. Is
>() there a way to move it to the PREVIOUS line instead of the next line?
>
>
>Inproper question encountered. Don't panic! Panic! Don't panic!
>CPU overload. Shields are at 30%. Bus driver on strike - core dumped.
>Danger, Will Robinson, danger! Exterminate! Exterminate! Exterminate!
>I'm afraid. I'm afraid, Dave. Dave, my mind is going. I can feel it. I
[snip]

Wow, that WebTV thing really works ! :-)

Michel.


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

Date: 7 Aug 1999 08:17:00 GMT
From: bsj@fc.hp.com (Brian StJohn)
Subject: Re: non-interactive telnet session
Message-Id: <7ogq1s$r12$4@fcnews.fc.hp.com>

Brian StJohn (bsj@fc.hp.com) wrote:

: I'm trying to write a small script that remotely
: logs into a xyplex terminal server and executes
: a series of commands.  I don't need returns on 
: any of the commands I want executed, though that
: would be nice for debugging purposes.

Well, here I am again, with another solution using
Net::Telnet.  Turns out I was using a rather other
version of it.  I installed the newest one, and 
wrote the following program, which works much better
than just opening a TCP port and dumping the commands
in there.


	Brian


#!/usr/local/bin/perl
#
# xyplex.pl - allows the startup batch file to disconnect all the
# ports on a xyplex.
#
# Author: Brian St. John
#
# Date: 08/07/1999

use Net::Telnet;

$hostname = "xyplex00";
$port = 2000;

$t = Net::Telnet->new( Port => $port );
$t->open("$hostname");

$t->waitfor('/.*$/');
$t->print("");

$t->print("access");
$t->waitfor('/Enter username.*$/');
$t->print("anyname");
$t->waitfor('/Xyplex.*$/');
$t->print("set priv");
$t->waitfor('/Password.*$/');
$t->print("system");
$t->waitfor('/Xyplex>>.*$/');
$t->cmd("disconnect ports all sessions all");
exit(0);


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

Date: Sat, 07 Aug 1999 09:01:15 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: passing IO handle in reference to hash?
Message-Id: <37aef423.7982689@news.skynet.be>

Mark H. Wood wrote:

>I'm writing a merge program that needs to keep a zillion things all
>associated with the files being merged, so I packed them all into a
>couple of hashes:
>
>       open(FILE1,"foo");
>       $fyle1{handle} = FILE1;

No, by lack of prefix for handles, you must store the typeglob, *FILE1.
Perl automatically treats typeglobs as handles when you use them, if a
handle indeed can be used.

>       $fyle1{key} = ''; # and so on
>
>Now I need to pass these hashes to a few subroutines.  Naked hash
>names get converted to lists, so I have to pass a reference:
>
>      get(\%fyle1);
>
>Inside get() I have no trouble getting at most of the slots in the
>hash:
>
>	$_[0]->{eof} = 1;
>
>But although I've played with various wrappings and other rewritings,
>I can't make use of the file handle:
>
>	$_[0]->{buffer} = <$_[0]->{handle}>;
>
>	Can't use subscript on glob at bar line 11, near "{handle}"
>	syntax error at bar line 11, near ">;"
>	Execution of bar aborted due to compilation errors.
>
>I know I've missed something that language theorists will find utterly
>trivial, but what is it?

It's not that trivial. Perl easily accepts a *bare* scalar that contains
a typeglob, as a handle. So you must copy the handle (typeglob) into a
localized variable.

	my $handle = $_[0]->{handle};

Now, you can use it.

	$_[0]->{buffer} = <$handle>;
#or
	print $handle "Some text!\n";

   HTH,
   Bart.


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

Date: Sat, 7 Aug 1999 18:32:50 +1000
From: elephant@squirrelgroup.com (elephant)
Subject: Re: Passing parameters (am I mad)
Message-Id: <MPG.12169a3931446917989bfe@news-server>

Derek Lavine writes ..
>$message = "yet\nthis works\n";

what happens if you change this line above to

  $message = "action: 1\nvalue: 3,4,5\n";

??

if that makes the same blank message then we'll have to see the 
Mini_mail.pm code

-- 
 jason - elephant@squirrelgroup.com -


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

Date: Sat, 07 Aug 1999 11:50:24 +0200
From: Ruben van Engelenburg <ruben@textinfo.nl>
Subject: password field
Message-Id: <37AC0160.D70B6422@textinfo.nl>

Hi all,

I hope someone can help me on this one. This is two lines of a Perl
program running on Linux:

print "Password: ";
$password = <STDIN>;

What I want is that the input is 'invisible'. Like the login procedure
from Linux. I tried using the system command 'setterm', but it didn't
work. Someone with better ideas?
Many thanks in advance.

Gr.,

Ruben.




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

Date: 7 Aug 1999 02:43:24 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Quick Question :)
Message-Id: <slrn7qnosg.7j.abigail@alexandra.delanet.com>

Ivan Berg (iberg@montana.edu) wrote on MMCLXVI September MCMXCIII in
<URL:news:37AB04E2.660D2F3F@montana.edu>:
[] Anybody know how to add two binary number together.
[] When adding using th '+' operator I get a scientific notation number.
[] 
[] For instance, how would one add '011' and 100' and get '111'??


Convert them to integers, add the values, convert the result to a
binary string.

The manual explains how to do the conversion (using pack/unpack).
I leave it to you on how to add 2 numbers.



Abigail
-- 
perl -wlne '}for($.){print' file  # Count the number of lines.


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

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


Administrivia:

The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc.  For subscription or unsubscription requests, send
the single line:

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

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 V9 Issue 413
*************************************


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