[10217] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3810 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Sep 24 06:07:19 1998

Date: Thu, 24 Sep 98 03:00:19 -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           Thu, 24 Sep 1998     Volume: 8 Number: 3810

Today's topics:
    Re: any way to encrypt my script? <zenin@bawdycaste.org>
        Confused: visibility of "my" vars (Koos Pol)
    Re: file opened with "+>>"  query <steph@hotkey.net.au>
        GD problems on NT platform (Bjvrn Nilsson)
        Passing a Variable to a Text Input...strange question. (Vikram Pant)
    Re: Perl & Java - differences and uses <zenin@bawdycaste.org>
    Re: PERL 5 vs PERL 4 - strange socket behavior <zenin@bawdycaste.org>
        Perl and Javascript sr12@hdm-stuttgart.de
    Re: Perl and Javascript <Tony.Curtis+usenet@vcpc.univie.ac.at>
    Re: Poll: How Did You Learn Perl? (Bart Lateur)
    Re: Poll: How Did You Learn Perl? (Bart Lateur)
    Re: Poll: How Did You Learn Perl? (David Cantrell)
    Re: Poll: How Did You Learn Perl? (Matthew Bafford)
    Re: problem retreiving cookie <guillaume@nospam.com>
    Re: Question from newbie, Executing DOS commands from P kryppa@my-dejanews.com
    Re: Regular Expression Beautifier (Ilya Zakharevich)
    Re: send geroge reese (was Re: Call for Participation:  <zenin@bawdycaste.org>
    Re: sock the heck out of port 23 <qdtcall@esb.ericsson.se>
    Re: sock the heck out of port 23 <duff@duffduff.com>
    Re: system call treats vars as literals... (perl 5.005) (Lack Mr G M)
        System() help <sales@madm.com>
    Re: undefined value as ARRAY reference (David A. Black)
        URL & special characters guelkev@de.polygram.com
        Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)

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

Date: 24 Sep 1998 07:00:21 GMT
From: Zenin <zenin@bawdycaste.org>
Subject: Re: any way to encrypt my script?
Message-Id: <906620410.569011@thrush.omix.com>

Paul David Fardy <pdf@morgan.ucs.mun.ca> wrote:
	>snip<
: Turf the terminology: it's not relevant.  An openly readable copy of
: the original Perl source is the only persistent form of the program.
: That's the central point here.

	See, but that's just it.  This is not the case, despite the
	common folklore seen in c.l.p.m.

: Indeed, it does not _have_ to be that way.

	Nore is it, thank goodness.

: And, finally, if you explain how that can be done, you'll at least be
: going one step closer to answering the question: is there "any way
: encrypt my script?"  ... because we know that what the writer really
: wants is to protect the source.  It may not be encryption, but it's closer
: to what's desired than distributing the Perl source.

	Ok, here is the way you "encrypt", or more accurately, give a
	(arguably small) layer of protection to your code.  It works with
	Perl, shell, and a bunch of other "interpreted" (clear text exec)
	languages.

	First, download, build, and install "shc" (Shell Script Compiler).
	I've got a copy on my workstation:

		ftp://thrush.omix.com/pub/misc/shc-3.0b3.tgz

	shc -h will give you a summary, but basic usage for what you
	ask for here is:

		shc -f foo_script

	This will generate the files:

		foo_script.x.c
		foo_script.x

	foo_script.x.c is the C source that shc built which is a lightly
	encrypted form of your original script with some C wrapper code.
	foo_script.x is the compiled, runnable version.  You can probably
	throw foo_script.x.c away, but it's somewhat interesting to look
	at.

	Now you've got an "encrypted" (albeit lightly), "real" executable.
	It still needs perl (or sh, etc) on the system however.  Even
	if a user runs "strings" they will not see anything interesting.

	Now, even better then the "encryption" is the fact that most all
	Unix systems allow "real" executables to be run without read
	permissions.  That's right, you just need executable permissions
	to run it.  This allows you to let others run your program but
	not read it.  This is even better then the encryption aspect because
	if they can not even read your program, they can't even try to
	decrypt it.  If you've got root access, you can make the program
	owned by root with permissions set to 711 and only those with root
	access will be able to read it, but everyone can run it.

	There, that's how you "encrypt" a perl script.  No, it is not
	the end all be all of encryption or security, but it will put
	a much larger layer to go through.  Is it security by
	obscurity?  Of course, but then no security is completely safe.
	It is all about putting up walls.  The bigger the wall, the
	better security, but *any* wall can be broken through if someone
	has a big enough hammer and/or enough time.

	Personally, I trust the security of shc with chmod 711 far more
	then I trust sendmail, bind, or named. :-)

-- 
-Zenin (zenin@archive.rhps.org)           From The Blue Camel we learn:
BSD:  A psychoactive drug, popular in the 80s, probably developed at UC
Berkeley or thereabouts.  Similar in many ways to the prescription-only
medication called "System V", but infinitely more useful. (Or, at least,
more fun.)  The full chemical name is "Berkeley Standard Distribution".


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

Date: 24 Sep 1998 07:34:55 GMT
From: koos@stag.nl.compuware.com (Koos Pol)
Subject: Confused: visibility of "my" vars
Message-Id: <6ucsn0$f5r@news.nl.compuware.com>

"my" variables which are declared in the main body, are visible in
subs. But declared in a sub, a "my" is invisible everywhere else.
'perldoc -f my' explicitely talks about an anclosing block. This implies
the same behaviour for the main body. Isn't the main body an enclosing
block?

-- 
Koos Pol
----------------------------------------------------------------------
S.C. Pol                          T: +31 20 3116122
Systems Administrator             F: +31 20 3116200
Compuware Europe B.V.             E: Koos_Pol@nl.compuware.com
Amsterdam                         PGP public key available


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

Date: Thu, 24 Sep 1998 17:33:58 +1000
From: Stephan Carydakis <steph@hotkey.net.au>
Subject: Re: file opened with "+>>"  query
Message-Id: <3609F5E6.2803@hotkey.net.au>

Sorry folks!

For some reason, I added this line:  seek FILE, 0, 0; after this line:
while (defined ($line = <FILE>) ) { $index++; } and it now writes to the
file at the ISP. Why my version of Perl at home doesn't require the
extra seek line, I dont know. Thanks anyways

_____________________________________________________
 Stephan Carydakis       steph@hotkey.net.au
_____________________________________________________


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

Date: Thu, 24 Sep 1998 07:34:29 GMT
From: bjorn.w.nilsson@edt.ericsson.se (Bjvrn Nilsson)
Subject: GD problems on NT platform
Message-Id: <3609f551.228196118@news.ericsson.se>

Hi all!

I'm trying to use GD (ver 1.01 I think) with ActivePerl 5.002. The
first example program runs fine when I run it at the command prompt.
(At least it outputs some kind of binary output which looks strange.
:-)

My intentions are to use this module for picking up data in a CGI
context. There is where my problems start. I'm currently trying this
out on an IIS4 server on my NT4ws. A collegue of mine have tried to do
the same thing from a Netscape Fasttrack server on a similar NT4ws.
(No, I do not use the PerlIIS, just standard Perl, apart from ASP
PerlScript, but that is another issue.)
On the HTML page I call the script as follows:
<img src="../scripts/GDtest.pl">
which renders a broken image icon.
I did read an article last year in the November or so issue of Linux
Journal on using GD in a CGI context. Obviously the approach I've
tried is the "correct" one from a UNIX/Apache perspective, but IIS
seems a bit more fuzzy.

The html code in full (not much :-):

<html>
<head>
<title>GD testing</title>
</head>
<body>
<h1>A test of GD</h1>

<img src="../scripts/GDtest2.pl">

</body>
</html>

and the perl code (which is well known):

#!/usr/local/bin/perl

use GD;

# create a new image
$im = new GD::Image(100,100);

# allocate some colors
$white = $im->colorAllocate(255,255,255);
$black = $im->colorAllocate(0,0,0);       
$red = $im->colorAllocate(255,0,0);      
$blue = $im->colorAllocate(0,0,255);

# make the background transparent and interlaced
$im->transparent($white);
$im->interlaced('true');

# Put a black frame around the picture
$im->rectangle(0,0,99,99,$black);

# Draw a blue oval
$im->arc(50,50,95,75,0,360,$blue);

# And fill it with red
$im->fill(50,50,$red);

# make sure we are writing to a binary stream
binmode STDOUT;

# Convert the image to GIF and print it on standard output
print $im->gif;


Thanks in advance for any help. 

Bjvrn


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

Date: Wed, 23 Sep 1998 19:36:23 -0400
From: nospam@wam.umd.edu (Vikram Pant)
Subject: Passing a Variable to a Text Input...strange question.
Message-Id: <MPG.1073500694b5279098969d@news.wam.umd.edu>


I have a situation that I can't get around.

I have a text file that is called into several Perl scripts.  Problem is 
that in the text input file I have a few variables I would like replaced 
when called into the script itself.

The way I have it written now is

#top of perl script
$Type = "Movies";
 .
 .
open(FILE, "$TopGrayBarFile");
	while(<FILE>) {
		$Line = $_;
	}
close(FILE);
 .
 .

In the text file, there is this line:
print HTML "<font size="1"><b> <a href="../">MIDI-Fest Home</a> / $Type 
</b></font>";

Only thing is that when the text file is called and printed to the 
screen, the variable is $Type and not Movies like I would like it to be.

Any way around this one?
Thanks for the help,
Vikram Pant


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

Date: 24 Sep 98 07:42:32 GMT
From: Zenin <zenin@bawdycaste.org>
Subject: Re: Perl & Java - differences and uses
Message-Id: <906623228.262303@thrush.omix.com>

bjohnsto_usa_net <bjohnsto_usa_net@my-dejanews.com> wrote:
	>snip<
: David Formosa <dformosa@zeta.org.au> wrote in article 
: > A lambda style function is a function that has no name.  For example in
: > perl I can go,
	>snip<
: Is a lambda style function functionally different to inner classes?

	Yes.  David's example was of an anonymous function, not a lambda
	function or "closure".

: I find that inner classes do what I could use smalltalk code blocks [ ... ]
: for.

	Yes, I believe so, though I'm not the SmallTalk expert.

: Here is how an inner class looks.
	>snip<
: Although the SIGNATURE of the function has a name (ifunc.f) the actual
: functions do not.

	Now, if that was a real lambda function it might look something
	like this:

public class lambda {
    interface ifunc {
        public double f(double d);
    }

    public static void main(String args[]) {
        double foo;

        foo = 10;
        ifunc o1 = new ifunc() { public double f(double d) { return d * foo; } };

        foo = 20;
        ifunc o2 = new ifunc() { public double f(double d) { return d * foo; } };

        System.out.println("ifunc 4.0 - " + o1.f(4.0)+ "\n");
        System.out.println("ifunc 4.0 - " + o2.f(4.0)+ "\n");
    }
}

	And print out 40 and 80.  This of course, will not compile.  More
	over, it wouldn't be the best example of a closure since we are
	using two different pieces of code (o1 and o2 use two complete
	blocks of code).  Indeed, as Java does not support real closures
	an example in Java can't really be done (at least not well, and
	definedly not that will compile).

	Here is a better example in Perl:

		sub times_something {
		    my $x = shift;
		    return sub { $x * shift };
		}

		my $o1 = times_something (10);
		my $o2 = times_something (20);

		print $o1->(4.0), "\n";
		print $o2->(4.0), "\n";

	This prints 40 and 80 respectively.  Funky hey?

	The value passed to times_something() is bound at *run time* in
	the particular anonymous function pointer.  Indeed, the ability to
	bind values in the context of the run time environment is key to
	what a lambda function is.

	Java can only bind values to a context at compile/load time, which
	is why it can not support closures (lambda functions).

: Java typed solution is definitely more verbose than the other languages.

	True, but verbosity is not the issue.  Mear ability is.  Java simply
	can't do closures, and neither can its byte code which is why a
	Scheme Java byte code compiler is impossible.

	Inner classes are a major kluge at best to try and make up for
	*some* of the functionality, but not all or even most of it.

	To do closures you need to have at least one context stack in the
	runtime.  The system does not provide this, and neither does the
	JVM.  Therefor, to do closures you would need to build anothern
	runtime system/VM *on top* of the JVM ala the Python written in
	Java.  A Python in Java however is much easier then a Perl in
	Java, simply because Python does not properly support closures
	anyway so this isn't a concern there.  Lisp, Scheme, or Perl
	runtimes in Java would be harder, but possible.  Pure Java byte
	code backends for them however, are likely impossible.

: If there is some design which needs lambda style functions instead of inner
: classes I would be interested.

	Any functional programming book should be able to give you dozens
	of examples.  If that fails, I'm sure a couple clicks off of
	www.scheme.org should fill this order and then some. :-)

-- 
-Zenin (zenin@archive.rhps.org)           From The Blue Camel we learn:
BSD:  A psychoactive drug, popular in the 80s, probably developed at UC
Berkeley or thereabouts.  Similar in many ways to the prescription-only
medication called "System V", but infinitely more useful. (Or, at least,
more fun.)  The full chemical name is "Berkeley Standard Distribution".


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

Date: 24 Sep 1998 08:32:25 GMT
From: Zenin <zenin@bawdycaste.org>
Subject: Re: PERL 5 vs PERL 4 - strange socket behavior
Message-Id: <906625915.385298@thrush.omix.com>

D461-David_F_Haertig(Dave)83040 <dfh@dwroll.lucent.com> wrote:
: Are there any differences in socket-based code between PERL 4
: and PERL 5?

	Shouldn't be, but maybe your perl4 was statically linked
	to an older socket lib?  Hmm, that doesn't really follow either...

: I have a PERL 4 server that has been running fine for years.
: Under PERL 5 it behaves oddly.
	>snip<
: 'netstat' shows one LISTEN and one CLOSE_WAIT.  What's this CLOSE_WAIT?

	Page 35, Unix Network Programming vol 1 edition 2, Stevens:

	"If the application calls close before receiving an end-of-file (an
	active close), the transition is to the FIN_WAIT_1 state.  But if
	the application receives a FIN while in the ESTABLISHED state (a
	passive close), the transition is to the CLOSE_WAIT state.

	We denote the normal client transitions with a darker solid line
 	[the FIN_WAIT_1 transition] and the normal server transition with a
	darker dashed line [the CLOSE_WAIT transition]."

	           recv: FIN               appl: close             recv: ACK
	ESTABLISHED - - - - - -> CLOSE_WAIT - - - - - - -> LAST_ACK - - - - ->
	           send: ACK               send: FIN               send: <nothing>

	Any of this look like it might pertain to your conditions?

	If you're doing TCP work, at any level, get a copy of the above
	book.  It will make your life *much* easier.
-- 
-Zenin (zenin@archive.rhps.org)           From The Blue Camel we learn:
BSD:  A psychoactive drug, popular in the 80s, probably developed at UC
Berkeley or thereabouts.  Similar in many ways to the prescription-only
medication called "System V", but infinitely more useful. (Or, at least,
more fun.)  The full chemical name is "Berkeley Standard Distribution".


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

Date: Thu, 24 Sep 1998 10:01:31 +0200
From: sr12@hdm-stuttgart.de
Subject: Perl and Javascript
Message-Id: <3609FC5B.716B@hdm-stuttgart.de>

Hi,

I'm trying to generate HTML-Code that contains some Javascript-Commands
with a perlscript.
That far everything works perfectly, but if I execute the perlscript via
a internet-browser, the browser doesn't complete loading the page
(netscape stop button stays red; some elements are not displayed),
although all tags etc. have been loaded, as you see, looking at the
"document source".
When I remove the Javascriptcode from the perl-generated HTML,
everything works fine.

Does anybody know what went wrong?

Thanx
	Sebastian


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

Date: 24 Sep 1998 10:07:37 +0200
From: Tony Curtis <Tony.Curtis+usenet@vcpc.univie.ac.at>
Subject: Re: Perl and Javascript
Message-Id: <83g1di7x2u.fsf@vcpc.univie.ac.at>

Re: Perl and Javascript, sr12 <sr12@hdm-stuttgart.de> said:

sr12> Hi, I'm trying to generate HTML-Code that contains
sr12> some Javascript-Commands with a perlscript.
sr12> That far everything works perfectly

So it's not a perl problem then is it?

sr12> Does anybody know what went wrong?

Yes, you didn't post any code.

hth
tony
-- 
Tony Curtis, Systems Manager, VCPC,    | Tel +43 1 310 93 96 - 12; Fax - 13
Liechtensteinstrasse 22, A-1090 Wien,  | <URI:http://www.vcpc.univie.ac.at/>
"You see? You see? Your stupid minds!  | private email:
    Stupid! Stupid!" ~ Eros, Plan9 fOS.| <URI:mailto:tony_curtis32@hotmail.com>


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

Date: Thu, 24 Sep 1998 09:53:12 GMT
From: bart.mediamind@ping.be (Bart Lateur)
Subject: Re: Poll: How Did You Learn Perl?
Message-Id: <360b0c7c.2518640@news.ping.be>

Tad McClellan wrote:

>: Excellent point - maybe the question should be,
>: "How did you learn enough perl to start hacking Matt's scripts?"
>
>Or:
>
>"How did you learn enough perl to recognize that many of Matt's scripts
>are significantly sub-optimal"

Nah. Most of the trouble with Matt's Scripts are related to making them
robust, for example he forgot most of the file locking. Things that, if
you would ask about them on clpm, the response might well be: "This has
nothing to do with Perl". ;-)

In short: the shortcomings of Matt's Scripts have nothing to do with
Perl. 

	Bart.


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

Date: Thu, 24 Sep 1998 09:53:15 GMT
From: bart.mediamind@ping.be (Bart Lateur)
Subject: Re: Poll: How Did You Learn Perl?
Message-Id: <360c0d10.2665729@news.ping.be>

Colin Kuskie wrote:

>Most of the FMTEYETKs were developed from postings Tom Christiansen
>made on comp.lang.perl.

Oh, yes. Let's not forget about those.

I can remember that, when wading through the online docs for the first
time, it took me over two hours to grok the first five pages. The info
was, well, very dense.

The Camel (v1) is good as a reference, but not suitable to learn things.
The Llama (v1)was a lot better for that. And: it was easy to read. After
that, the Camel made a lot more sense to me.

And then: the FMTYEWTK series, by Tom C.. That really topped it of.
After getting through those, I *really* started to get the hang of Perl.

For those who don't know: the acronym stands for "Far More Than You ever
Wanted To Know about...", and these online docs are probably still
accessible on Tom C.'s site, <www.perl.com>.

I still think that the included online docs are a bit dense.

	Bart.


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

Date: Thu, 24 Sep 1998 09:12:56 GMT
From: NukeEmUp@ThePentagon.com (David Cantrell)
Subject: Re: Poll: How Did You Learn Perl?
Message-Id: <360d0c81.58155423@thunder>

On 23 Sep 1998 11:25:18 -0700,
  larry@kiev.wall.org (Larry Wall) enlightened us thusly:

>In article <360923EC.8E9919D0@min.net>, John Porter  <jdporter@min.net> wrote:
>>From what resource(s) did you learn Perl?
>
>I dunno how I learned it.

>From the source code?

-- 
David Cantrell, part-time Unix/perl/SQL/java techie
                full-time chef/musician/homebrewer
                http://www.ThePentagon.com/NukeEmUp


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

Date: Thu, 24 Sep 1998 05:41:16 -0400
From: dragons@scescape.net (Matthew Bafford)
Subject: Re: Poll: How Did You Learn Perl?
Message-Id: <MPG.1073ddc8516a39399896b5@news.south-carolina.net>

In article <uhfxyniwp.fsf@jimbosntserver.soundimages.co.uk> on 24 
Sep 1998 07:07:02 +0100, Jim Brewer (jimbo@soundimages.co.uk) 
pounded in the following text:
=> Randal Schwartz <merlyn@stonehenge.com> writes:
=> 
=> > 
=> > Let's say the word "free" means "with peanut butter"
=> > 
=> > (ducking)
=> 
=> So let's get this straight. With every jar of Skippy, creamy or
=> chunky, I get a Perl latest.tar.gz? Now, is this in the jar (like in a
=> ceral box) or is it attched (by some means currently ill-defined) to
=> the outside of the jar? Will it add much to the cost of Skippy? Or,
=> will the fear of such a potent Skippy cause a downturn in Skippy

Potent?  All latest.tar.gz is is a readme file, now. :)

=> uptake and therefore a radical re-pricing making Skippy much less
=> expensive and by extension my latest.tar.gz even free-er?
=> 
=> Personally, I hate peanut butter. Can we say "free" means "large
=> double pepperoni with extra cheese"? Now where do they attach the
=> latest.tar.gz?
=> 


--Matthew (also ducking)


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

Date: Thu, 24 Sep 1998 10:08:22 +0100
From: "Guillaume Buat-Menard" <guillaume@nospam.com>
Subject: Re: problem retreiving cookie
Message-Id: <6ud2a4$bgt$1@newsreader2.core.theplanet.net>

The problem is not how I read the cookie string because I have a standard
Library that I use for reading and setting cookie that works fine and I've
been working with cookies for quite a while now.
As I said the scripts work on another server, its just that on this one I
can't figure out why the cookie string is empty even if I know the cookie
was sent.
I even thought of domain problems and sent a cookie with a javascript on an
HTML page. The cookie is there and in my cookie folder but when I connect as
a client on this particular server I get no cookie values or names...

Any Idea...


Thanks,

Guillaume.


Rich Grise wrote in message <36093F4F.1523@entheosengineering.com>...
>Guillaume Buat-Menard wrote:
>>
>> Hi all,
>>[...]
>> ... $ENV{HTTP_COOKIE}
>>[...]
>> If not have you got any Idea why my cookie string is empty?
>>
>> thanks for your help,
>>
>> Guillaume.
>
>Well, I don't know if this is right or not, but try $ENV{'HTTP_COOKIE'}
>
>(note single quotes ``'")
>
>--
>Rich Grise
>richgrise@entheosengineering.com
>(No need to futz with my e-mail: I have a "Delete" button!)




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

Date: Thu, 24 Sep 1998 07:26:54 GMT
From: kryppa@my-dejanews.com
Subject: Re: Question from newbie, Executing DOS commands from PERL
Message-Id: <6ucs7t$ff7$1@nnrp1.dejanews.com>

Try this

system "del \\directory\\*.* /y";

when using backslash in path make it doubble, otherwise PERL inteprets it as
here comes a special sign.

/kryppa@bigfoot.com

In article <6u7nqt$4tb$1@nnrp1.dejanews.com>,
  dave@mag-sol.com wrote:
> In article <6u70e8$et2$1@holly.prod.itd.earthlink.net>,
>   "djones" <dcjones3@earthlink.com> wrote:
> > I'm trying to delete the contents of a directory.
> >
> > This is what I have tried:
> >
> > $delete = "command /C del *.* /Q";
> > $i=1;
> >
> >         if($i=1)  {
> >             chdir "c:\anydir";
> >             system $delete;
> >             }
>
> Maybe you should look at the 'unlink' function.
>
> Dave...
>
> --
> dave@mag-sol.com
> London Perl M[ou]ngers: <http://www.mag-sol.com/London.pm/>
>
> -----== Posted via Deja News, The Leader in Internet Discussion ==-----
> http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum
>


-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

Date: 24 Sep 1998 07:06:40 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: Regular Expression Beautifier
Message-Id: <6ucr20$r9d$1@mathserv.mps.ohio-state.edu>

[A complimentary Cc of this posting was sent to Martin Gregory 
<mgregory@asc.sps.mot.com>],
who wrote in article <r8ww6u2xmt.fsf@asc.sps.mot.com>:
> One might note that the original problem specification was explicitly
> to include commenting the regex.

  $i++;			# Increment $i

Thanks, no, thanks.  (Though putting ordinals of "(" and ")" into
comments may be a nice addition to CPerl's beautifier.)

Ilya


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

Date: 24 Sep 1998 08:03:45 GMT
From: Zenin <zenin@bawdycaste.org>
Subject: Re: send geroge reese (was Re: Call for Participation: Python Conference)
Message-Id: <906624183.20863@thrush.omix.com>

Jeremy Hylton <jeremy@cnri.reston.va.us> wrote:
: That's not such a bad idea <0.5 wink> (not George in particular).
: There is an introdction to Python tutorial being held the first
: morning of the conference (and an introduction to JPython in the
: afternoon).  The occasionaly debate might be more productive, and I
: imagine that Perl programmers could learn a thing or two about OO from 
: Python (even if they contain to use Perl).
	>snip<

	Of course they could, after all, where do you think Perl came
	up with its original object design?  None other then Python.

	I think a SmallTalk conference might do a better job of teaching
	OO however.

	A Scheme conference though, would give us much more interesting
	code in the long run. <evil grin>

-- 
-Zenin (zenin@archive.rhps.org)           From The Blue Camel we learn:
BSD:  A psychoactive drug, popular in the 80s, probably developed at UC
Berkeley or thereabouts.  Similar in many ways to the prescription-only
medication called "System V", but infinitely more useful. (Or, at least,
more fun.)  The full chemical name is "Berkeley Standard Distribution".


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

Date: 24 Sep 1998 10:51:46 +0200
From: Calle Dybedahl <qdtcall@esb.ericsson.se>
Subject: Re: sock the heck out of port 23
Message-Id: <is1zp128rh.fsf@godzilla.kiere.ericsson.se>

MadMonkey <samblack@earthlink.net> writes:

> Could anyone help or maybe give me an example code to work off of to
> connect to telnet port?

The telnet protocol is described in RFCs 854 and 855 (plus a few
others for extensions, RFC 748 in particular may be interesting).

There are also modules on CPAN that might be useful to you.
-- 
                    Calle Dybedahl, UNIX Sysadmin
       qdtcall@esavionics.se  http://www.lysator.liu.se/~calle/


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

Date: Thu, 24 Sep 1998 10:17:06 +0100
From: "Gary Mc Closkey" <duff@duffduff.com>
Subject: Re: sock the heck out of port 23
Message-Id: <6ud2pc$sk2$1@ezekiel.eunet.ie>

See the IPC documentation for this - though I didn't get their multi-thread
example to work on my VMS box. I've also tracked down Net::telnet  - see
CPAN. Net::telnet seems very good, but according to the author is still in
early stages of development.

Gary

--
gmc_duff@indigo.ie. Remove underscore_duff to mail me.

NOTICE TO BULK E-MAILERS: Pursuant to US Code, Title 47, Chapter 5,
Subchapter
II, 227, and all unsolicited commercial e-mail sent to this address is
subject
to a download and archival fee in the amount of $500 US.

MadMonkey wrote in message <36097FB7.D589E937@earthlink.net>...
>Hi guys.
>   I'm having a weird problem. I wrote a simple little prog that should
>connect to the server I tell it to on the port I tell it to.
>         --- it does---     except for port 23.
[snip]



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

Date: Thu, 24 Sep 1998 09:58:24 BST
From: gml4410@ggr.co.uk (Lack Mr G M)
Subject: Re: system call treats vars as literals... (perl 5.005)
Message-Id: <1998Sep24.095824@ukwit01>

In article <3609BFFD.29AFA9E5@OBJS.com>, Paul Pazandak <pazandak@OBJS.com> writes:
|> I am trying to simply call cat (win95) with three vars, but they are treated as literals...
|> Why?

   Because you tell it to.

|> system ( 'cat i:\foo.txt $_ > $mytmpfile');
|> 
|> Doing a print works:
|> print $_ ;
|> or
|> print "Processing file: $_" ;

   Note that you use " in the print and ' in the system call.  Does it
not occur to you that there might be a difference here?  There is. 
Specifically, there is no variabel interpolation done in '-delimited
strings.  

|> Were's this darn oddity documented in "Programming Perl"?

  p.39:  "String Literals"  (or 'String Literals', in this case there is
not difference to the result).

-- 
----------- Gordon Lack ----------------- gml4410@ggr.co.uk  ------------
The contents of this message *may* reflect my personal opinion.  They are
*not* intended to reflect those of my employer, or anyone else.



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

Date: Thu, 24 Sep 1998 02:12:41 -0700
From: "Doyle Johnson" <sales@madm.com>
Subject: System() help
Message-Id: <6ud37r$b06$1@nnrp02.primenet.com>

I have read through the man and the FAQ and I find information on system()
but I'm not 100% sure it will work for what I want.

   I need to call a server function and print what the server returns to a
file or to an array....

  Can anyone give me the correct syntax for exicuting a server command and
capturing the output?

Thanks

D. Johnson






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

Date: Wed, 23 Sep 1998 18:45:10 EDT
From: dblack@saturn.superlink.net (David A. Black)
Subject: Re: undefined value as ARRAY reference
Message-Id: <6ubtlm$fus$1@earth.superlink.net>

Hello -

Farhad Farzaneh <ff@creative.net> writes:

>Hello,

>I have some code that includes (modified for testing):


I think it's a bit *too* modified....

>	    my $r = $rField->range;  # a method of object instance $rField
>	    print "Undefined\n" if ( !defined($r));
>	    my @range = @$r;

>and which does print the "Undefined".  It chokes on the last line with the
>following error:

># Can't use an undefined value as an ARRAY reference.

>However, when I try to build a short script to test this, I never get this
>error.  I'm not sure why this error occurrs in one case and not in another. 
>Is it because I'm using an object in the former case??  That doesn't make any
>sense to me...


There are many ways of failing to assign an array reference to a scalar - 
calling an object method that doesn't return an array reference is just 
one of them :-)

The problem seems to lie in the range() method, which isn't return an
array reference.  By the time you get to the "Can't use..." message,
the die is cast. 


David Black
dblack@saturn.superlink.net


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

Date: Thu, 24 Sep 1998 07:04:50 GMT
From: guelkev@de.polygram.com
Subject: URL & special characters
Message-Id: <6ucqui$d5r$1@nnrp1.dejanews.com>

Hello everybody, I have a problem with transfering special characters (in my
case german umlauts) to a perl program through the URL of my webbrowser. How
can I parse the URL that I can get all characters I send? Please answer also
bye email, because my news-system is broken at the moment and I don't read
often with Deja News. Thanks, Volker

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

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


Administrivia:

Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.

If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu. 


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

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