[12701] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 110 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Jul 11 14:08:03 1999

Date: Sun, 11 Jul 1999 11:05:08 -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           Sun, 11 Jul 1999     Volume: 9 Number: 110

Today's topics:
    Re: Array of Hash References (Ronald J Kimball)
    Re: Assigning args with regular expressions (Ronald J Kimball)
        BannerMaster NT port...? <chumly@v-wave.com>
    Re: Changing case local-specifically (Jack Applin)
    Re: checking Perl offline (Ronald J Kimball)
    Re: checking Perl offline <tchrist@mox.perl.com>
    Re: checking Perl offline (Abigail)
    Re: data validation routines?? (Abigail)
        date format (hoz)
    Re: FAQ 5.19: I still don't get locking.  I just want t (Ronald J Kimball)
    Re: ftp (Thomas Weholt)
        Fw: How can I disconnect an NT resource handle w/ Perl? <smontgomery@digitialblaze.net>
    Re: Help!  My pingecho to Linux is going pong! (Kai Henningsen)
    Re: How do I keep all values for duplicate keys in hash (Ronald J Kimball)
    Re: How do I keep all values for duplicate keys in hash (Philip 'Yes, that's my address' Newton)
    Re: I need to hide the source (Kai Henningsen)
    Re: I need to hide the source (Kai Henningsen)
    Re: I need to hide the source (Kai Henningsen)
    Re: md5 passwords via perl <carvdawg@patriot.net>
    Re: open+0 (Kai Henningsen)
    Re: OT(ish): What is "Perl golf"?! (Ronald J Kimball)
    Re: Perl Everywhere : That's what I want (Kai Henningsen)
    Re: PERL: read dir and print out its files - Engels <wouter@nospam.almetaal.com>
    Re: Q:a simple update to index (Kai Henningsen)
        Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)

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

Date: Sun, 11 Jul 1999 13:13:57 -0400
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: Array of Hash References
Message-Id: <1dus1oe.q9de4j1m50c9iN@p103.tc2.state.ma.tiac.com>

Ashish Kadakia <anonymous@web.remarq.com> wrote:

> I have simple question:
> $a = {};
> push @ary, $a;
> foreach (@p){ print "Matches" if /$a/; }
> 
> dosen't work..
> 
> If I replace the first line by
> $a=10;
> 
> it works fine..
> 
> somehow it fails to match the hash-references.
> Can you point me, how I should modify my if-statement.

Why are you using a hash reference as a regular expression in a pattern
match?  That is not a sensical thing to do.

Perhaps you wanted:

foreach (@p) { print "Matches" if $_ eq $a }
# matches if $_ and $a are references to the same thing
# (including tiedness)

or:

foreach (@p) { print "Matches" if $_ == $a }
# matches if $_ and $a are references to the same memory address

-- 
 _ / '  _      /       - aka -
( /)//)//)(//)/(   Ronald J Kimball      rjk@linguist.dartmouth.edu
    /                                http://www.tiac.net/users/chipmunk/
        "It's funny 'cause it's true ... and vice versa."


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

Date: Sun, 11 Jul 1999 13:13:58 -0400
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: Assigning args with regular expressions
Message-Id: <1dus1vk.113ny6818rvuthN@p103.tc2.state.ma.tiac.com>

Ronald J Kimball <rjk@linguist.dartmouth.edu> wrote:

> theoddone33 <anonymous@web.remarq.com> wrote:
> 
> > So the $1 $2, etc variables keep their values even outside
> > the regular expression, eh?  Thanks!
> 
> The $1 $2 etc variables *only* have their values outside the regular
> expression.  Inside the regular expression, you have to use \1 \2 etc.
> 
> (You can interpolate $1 $2 etc in a regular expression, but they'll
> still have their values from the previous successful match at that
> point.)

Clarification, by request:

In a substitution, the right-hand-side (RHS) is outside the regular
expression.

s/inside regular expression/outside regular expression/;
"outside regular expression also";

s/use \1 here/use $1 here/;
"use $1 here";

-- 
 _ / '  _      /       - aka -
( /)//)//)(//)/(   Ronald J Kimball      rjk@linguist.dartmouth.edu
    /                                http://www.tiac.net/users/chipmunk/
perl -e '$_="\012534`!./4(%2`\cp%2,`(!#+%2j";s/./"\"\\c$&\""/gees;print'


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

Date: Sat, 10 Jul 1999 15:10:19 -0600
From: "kevin traub" <chumly@v-wave.com>
Subject: BannerMaster NT port...?
Message-Id: <931715560.638.26@news.remarQ.com>

Anyone know were I can find a Windows port of BannerMaster ad management
program?  ( or anything like it with the same feature... )





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

Date: 11 Jul 1999 17:45:17 GMT
From: neutron@fc.hp.com (Jack Applin)
Subject: Re: Changing case local-specifically
Message-Id: <7mal7d$61$1@fcnews.fc.hp.com>

I like what Neko came up with, with Larry's stroke-saving modification.

	my @left  = map chr, ord('A') .. 0xFF;
	my @right = map {uc ne $_ ? uc : lc} @left;
	eval "sub TR { \$_[0] =~ tr/@left/@right/ }";
	$@ and die $@;

What disturbs me is the assurance that there are no alphabetics before 'A'.
This is true in ASCII, but I want to avoid character set dependencies.
Of course, this doesn't work:

	my @left  = map chr, 0 .. 0xFF;

because now @left and @right contain /, which confuses tr, using / as a
delimiter.  This works:

	my @left  = grep /\w/, map chr, 0..0xFF;

This assures that @left doesn't contain /, only alphanumerics and _.

Here's what I'm going with:

	use locale;

	BEGIN {
		my @left  = grep /\w/, map chr, 0..0xFF;
		my @right = map {uc ne $_ ? uc : lc} @left;
		eval "sub flip(\$) { \$_[0] =~ tr/@left/@right/ }";
		die $@ if $@;
	}

	$_ = "AeÎö\n";
	flip $_;
	print;

Since the eval is inside BEGIN, the prototype is visible at compile-time.


						-Jack Applin
						 neutron@fc.hp.com


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

Date: Sun, 11 Jul 1999 13:13:59 -0400
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: checking Perl offline
Message-Id: <1dus2dh.1e3tkt01tx9tl2N@p103.tc2.state.ma.tiac.com>

Uri Guttman <uri@sysarch.com> wrote:

> having first learned to program on punch cards with multi-hour turnaround
> (overwhelmed 2000 lpm line printers), i do lots of analysis and use
> strategically placed print statements. i can usually debug faster and
> better than most who use debuggers.

Not always, though, right Uri?  ;)


Assuming that most programmers use debuggers, what you are saying is
essentially "I can usually debug faster and better than most."  That is
hardly surprising, considering your extensive programming experience.
In other words, I think it is not your use of print statements, but
rather your experience that makes you more effective at finding bugs.


Both methods have their advantages and disadvantages:

Using print statements easily preserves the debugging between
executions.  Adding print statements requires recompiling and
reexecuting, however.  If you want to know the value of $x, you have to
add another print and start all over again.

Using the debugger, one can do further debugging within a single
execution, but one may have to set up the debugging again in a later
execution.  If you want to know the value of $x, you just use the
debugger command to examine $x.

-- 
 _ / '  _      /       - aka -
( /)//)//)(//)/(   Ronald J Kimball      rjk@linguist.dartmouth.edu
    /                                http://www.tiac.net/users/chipmunk/
        "It's funny 'cause it's true ... and vice versa."


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

Date: 11 Jul 1999 11:55:49 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: checking Perl offline
Message-Id: <3788daa5@cs.colorado.edu>

     [courtesy cc of this posting mailed to cited author]

In comp.lang.perl.misc, 
    miker3@ix.netcom.com (Michael Rubenstein) writes:
:From the Oxford English Dictionary certainly does not agree with
:Tom:

You are yourself incorrect for you have misunderstood the OED.
It is saying that "offline" is a computer term that indicates
something that is not connected to a computer system--which
you will note is in fact my usage.

--tom
-- 
Ken is very smart but also very opinionated.  --Doug Gwyn


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

Date: 11 Jul 1999 12:58:23 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: checking Perl offline
Message-Id: <slrn7ohmp7.h7.abigail@alexandra.delanet.com>

Ronald J Kimball (rjk@linguist.dartmouth.edu) wrote on MMCXL September
MCMXCIII in <URL:news:1dus2dh.1e3tkt01tx9tl2N@p103.tc2.state.ma.tiac.com>:
&& Uri Guttman <uri@sysarch.com> wrote:
&& 
&& > having first learned to program on punch cards with multi-hour turnaround
&& > (overwhelmed 2000 lpm line printers), i do lots of analysis and use
&& > strategically placed print statements. i can usually debug faster and
&& > better than most who use debuggers.
&& 
&& Not always, though, right Uri?  ;)
&& 
&& 
&& Assuming that most programmers use debuggers, what you are saying is
&& essentially "I can usually debug faster and better than most."  That is
&& hardly surprising, considering your extensive programming experience.
&& In other words, I think it is not your use of print statements, but
&& rather your experience that makes you more effective at finding bugs.
&& 
&& 
&& Both methods have their advantages and disadvantages:
&& 
&& Using print statements easily preserves the debugging between
&& executions.  Adding print statements requires recompiling and
&& reexecuting, however.  If you want to know the value of $x, you have to
&& add another print and start all over again.


Well, a good debugger doesn't make bugs in his debugging code. ;)


Of course one of the reasons Larry is so fast in his debugging is that
he doesn't make many mistakes to begin with. :)



Abigail
-- 
perl -MTime::JulianDay -lwe'@r=reverse(M=>(0)x99=>CM=>(0)x399=>D=>(0)x99=>CD=>(
0)x299=>C=>(0)x9=>XC=>(0)x39=>L=>(0)x9=>XL=>(0)x29=>X=>IX=>0=>0=>0=>V=>IV=>0=>0
=>I=>$r=-2449231+gm_julian_day+time);do{until($r<$#r){$_.=$r[$#r];$r-=$#r}for(;
!$r[--$#r];){}}while$r;$,="\x20";print+$_=>September=>MCMXCIII=>()'


  -----------== 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: 11 Jul 1999 13:00:04 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: data validation routines??
Message-Id: <slrn7ohmsd.h7.abigail@alexandra.delanet.com>

hoz (hoz@rocketmail.com) wrote on MMCXL September MCMXCIII in
<URL:news:3788f5cd.264603507@news.netvision.net.il>:
;; 
;; does anyone have any pointers to some common data vaildation
;; routines...


CPAN



Abigail
-- 
%0=map{reverse+chop,$_}ABC,ACB,BAC,BCA,CAB,CBA;$_=shift().AC;1while+s/(\d+)((.)
(.))/($0=$1-1)?"$0$3$0{$2}1$2$0$0{$2}$4":"$3 => $4\n"/xeg;print#Towers of Hanoi


  -----------== 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: Mon, 12 Jul 1999 02:47:57 GMT
From: hoz@rocketmail.com (hoz)
Subject: date format
Message-Id: <37895696.10669711@news.netvision.net.il>

sorry for the multiple posting...its been one of those days....
how do I in perl get a date format (YYYYMMDD) that resembles this is
shell `date +%Y%m%d`
I've tried localtime and system to no luck....seems like a no brainer
but sometimes....

hoz


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

Date: Sun, 11 Jul 1999 13:14:00 -0400
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: FAQ 5.19: I still don't get locking.  I just want to increment the number in the file.  How can I do this?
Message-Id: <1dus2us.1w3vx0e17gb1tsN@p103.tc2.state.ma.tiac.com>

Tony Greenwood <tony@webscripts.org> wrote:

> I thought using close would automatically unlock the file

That is correct.  Unlocking the file explicitly before the close() may
create a race condition that will allow another process to access the
file before your process flushes its buffers and closes the filehandle.

You should let close() unlock the file for you.

-- 
 _ / '  _      /       - aka -
( /)//)//)(//)/(   Ronald J Kimball      rjk@linguist.dartmouth.edu
    /                                http://www.tiac.net/users/chipmunk/
        "It's funny 'cause it's true ... and vice versa."


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

Date: Sun, 11 Jul 1999 00:22:43 GMT
From: u970130@studbo.hit.no (Thomas Weholt)
Subject: Re: ftp
Message-Id: <3787e2a7.1413187@news.eunet.no>

Hi,

Eventhough you should have gotten some pointers on where to find
examples, here`s recipe 18.2 from THE great Perl Cookbook ( it
contains examples on almost everything. ) 

use Net::FTP;

$ftp = Net::FTP->new("ftp.host.com") or die "Error connecting ....\n";
$ftp->login($username, $password) or die "Error connecting ... \n";
$ftp->cwd($directory) or die " Err ...\n";
$ftp->get($filename) or die " ....";
$ftp->put($filename) or  ....

The 'or die "Error ..." ' part has been cut down a bit.

Hope this helps if you don`t have money to buy the book, cuz that
would be your only valid excuse. ;->

Thomas

On Fri, 09 Jul 1999 14:45:37 +0100, Ian Mortimer
<ianmorty@nortelnetworks.com> wrote:

>Thomas,
>
>Do you think you could post these 'easy' solutions ? 
>
>I haven't had much experience with running shell stuff !
>
>Ian.
>
>
>Thomas Weholt wrote:
>> 
>> Yo,
>> 
>> I looked at the CPAN-module and also at some examples in the Perl
>> CookBook. It seems as if simlpe things like just put or get is easy to
>> implement, but I haven`t seen any examples doing more than that. I`d
>> like to get the results of ls, pipe it to a file and process the
>> contents.
>> 
>> Any thoughts?
>> 
>> Thomas.



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

Date: Sun, 11 Jul 1999 11:21:25 -0600
From: "Sean Montgomery" <smontgomery@digitialblaze.net>
Subject: Fw: How can I disconnect an NT resource handle w/ Perl?
Message-Id: <up4i3.2186$U6.6747@newsfeed.slurp.net>


I have an application where I am using Perl to copy files from a source
server to several remote servers on a weekly basis.  Sometimes, a file
doesn't copy successfully because the file on the remote computer is in use.
If that happens I'd like for my Perl script to close the open filehandle on
that remote server and attempt the copy again.

Is there a way to do this with Perl?  The equivalent NT procedure would
include selecting the server in Server Manager, looking at the "In Use" list
and selecting "Close Resource".  Another comparable is in the Microsoft SDK
(NetFileClose).

Thank you in advance for your help.

Sean Montgomery




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

Date: 11 Jul 1999 17:58:00 +0200
From: kaih=7KgA1TWHw-B@khms.westfalen.de (Kai Henningsen)
Subject: Re: Help!  My pingecho to Linux is going pong!
Message-Id: <7KgA1TWHw-B@khms.westfalen.de>

anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)  wrote on 09.07.99 in <7m3pph$75q$1@lublin.zrz.tu-berlin.de>:

> Rusty Williamson <rwilliamson@uno.gers.com> wrote in comp.lang.perl.misc:
> >Hi!
> >
> >I'm using pingecho to determine if a server is responding before I start
> >sending commands to it and this is working great for all of my UNIX servers
> >(DG/DGUX, Sequent/DYNIX, IBM/AIX, etc.) except for two Linux boxes.
> >Although both respond to a ping at the UNIX prompt, the pingecho within my
> >Perl script fails no matter how much I bump the timeout value.  Does anyone
> >know what could be going wrong or have any experience with this?
>
> Yes, I see similar behavior here.  Pingecho uses the tcp protocol
> to establish accessibility, which seems to work with hosts running
> anything but linux.  The newer ping objects give you a choice of

I've not seen pingecho, but from the description it tries to connect to  
the TCP echo service. Many hosts have this service disabled for security  
reasons.

If you've seen it primarily on Linux machines, that just means that those  
Linux machines are administrated by more security-conscious admins, or  
using distribution defaults from more security-conscious distributions -  
probably the latter. (Remember: the rule is to turn off everything except  
what you need.)

Typically, this is configured in /etc/inetd.conf.

Kai
--
http://www.westfalen.de/private/khms/
"... by God I *KNOW* what this network is for, and you can't have it."
  - Russ Allbery (rra@stanford.edu)


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

Date: Sun, 11 Jul 1999 13:14:01 -0400
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: How do I keep all values for duplicate keys in hashes.
Message-Id: <1dus39q.1c3jn3q1a3sz00N@p103.tc2.state.ma.tiac.com>

John Hennessy <john@hendigital.com.au> wrote:

> I have a simple while loop that contains a couple of hashes.
> 
> The first hash holds real names with unique login names as the key.
> The second hash is the opposite holding the login name with the real name
> as the key.
> 
> My problem arises when I have matching real names as keys. The hash stores
> only
> the last value for that key.

Use a hash whose keys are real names and whose values are references to
anonymous arrays of login names.

perllol
perlreftut
perlref

-- 
 _ / '  _      /       - aka -
( /)//)//)(//)/(   Ronald J Kimball      rjk@linguist.dartmouth.edu
    /                                http://www.tiac.net/users/chipmunk/
        "It's funny 'cause it's true ... and vice versa."


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

Date: Sun, 11 Jul 1999 17:36:38 GMT
From: nospam.newton@gmx.net (Philip 'Yes, that's my address' Newton)
Subject: Re: How do I keep all values for duplicate keys in hashes.
Message-Id: <3788cd82.253079249@news.nikoma.de>

On 11 Jul 1999 22:58:45 -0800, "John Hennessy"
<john@hendigital.com.au> wrote:

>I have a simple while loop that contains a couple of hashes.
>
>The first hash holds real names with unique login names as the key.
>The second hash is the opposite holding the login name with the real name
>as the key.
>
>My problem arises when I have matching real names as keys. The hash stores
>only
>the last value for that key.
>
>I need to be able to sort by real name without loosing values.
>Obviously having unique login names as keys avoids this problem.

The second hash can contain the real name as key, and have as value
not "the" (assumes there is only one) login name, but a reference to
an anonymous array of login names, of which there can be one or more.

e.g. $hash{"Philip Newton"} = ['pne', 'pnewton'];
$hash{"John Hennessy"} = ['hennessyj'];

or similar.

Cheers,
Philip
-- 
Philip Newton <nospam.newton@gmx.net>


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

Date: 11 Jul 1999 15:15:00 +0200
From: kaih=7Kg9zgm1w-B@khms.westfalen.de (Kai Henningsen)
Subject: Re: I need to hide the source
Message-Id: <7Kg9zgm1w-B@khms.westfalen.de>

juex@my-dejanews.com (Jürgen Exner)  wrote on 08.07.99 in <7m2rau$lgr@news.dns.microsoft.com>:

> Abigail <abigail@delanet.com> wrote in message
> news:slrn7o7lb6.ued.abigail@alexandra.delanet.com...
> > rdosser@my-deja.com (rdosser@my-deja.com) wrote on MMCXXXVI September
> > MCMXCIII in <URL:news:7m09vd$m44$1@nnrp1.deja.com>:
> > ``
> > `` I should have explained more: I'm trying to conceal a decryption
> > `` algorithm for confidential data.
> >
> > And you don't trust root? Buhahhahhahahhahaa. That's stupid.
> > Find a root who you can trust.
>
> Although I have to aggree that security by obsfucation is not the right way
> to go, still the administrator of e.g. a hospital network has no business
> reading my medical records.
>
> So not trusting root for confidential data is a very valid case.

That is why we have laws about handling data like that - at least, we have  
them in Germany. This is a social, not a technical problem.

(Basically, the law says you MUST chose trustworthy admins, and if they  
still get caught doing bad things, they won't be happy. And it also says  
you have to report the database to the authorities, and you have to  
explain it to the patients, and there are still only a limited number of  
things you may do with the data. In any case, you have to have someone  
whose job is to make sure these laws are kept - a  
"Datenschutzbeauftragter".)

Kai
-- 
http://www.westfalen.de/private/khms/
"... by God I *KNOW* what this network is for, and you can't have it."
  - Russ Allbery (rra@stanford.edu)


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

Date: 11 Jul 1999 15:18:00 +0200
From: kaih=7Kg9zooXw-B@khms.westfalen.de (Kai Henningsen)
Subject: Re: I need to hide the source
Message-Id: <7Kg9zooXw-B@khms.westfalen.de>

juex@my-dejanews.com (Jürgen Exner)  wrote on 09.07.99 in <7m5b1v$d6l@news.dns.microsoft.com>:

> - And in e.g. Germany by law you must protect e.g. medical data in such a
> way, that unauthorized persons don't have access to that data. Unauthorized
> means the janitor for the file cabinet (which  must be locked) just as well
> as the sysadmin for online records.

I suspect you seriously misunderstand the law in question. You probably  
want to talk to a lawyer.

Kai
-- 
http://www.westfalen.de/private/khms/
"... by God I *KNOW* what this network is for, and you can't have it."
  - Russ Allbery (rra@stanford.edu)


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

Date: 11 Jul 1999 15:32:00 +0200
From: kaih=7Kg9-RUHw-B@khms.westfalen.de (Kai Henningsen)
Subject: Re: I need to hide the source
Message-Id: <7Kg9-RUHw-B@khms.westfalen.de>

bart.lateur@skynet.be (Bart Lateur)  wrote on 07.07.99 in <3785b3db.1840536@news.skynet.be>:

> rdosser@my-deja.com wrote:
>
> >Odd request here - I need to write a script in perl, but somehow encrypt
> >or encapsulate the source in a binary so that other users on the host -
> >including root - cannot read it.
> >
> >Any thoughts?
>
> 	rm -f script.pl
>
> The only bug is that the script no longer runs.

Also that it isn't very secure. You just removed the directory entry, not  
the actual script.

This is a little bit better (but not all that much):

#! /usr/bin/perl -w

use strict;

my $script = 'script.pl';

my $size = -s $script;

my $zeroes = '\x00' x $size;
my $ones = '\xff' x $size;

open SCRIPT, "+> $script" or die "cannot open $script: $!";
select((select(SCRIPT), $| = 1)[0]);

seek SCRIPT, 0, 0;

print SCRIPT $zeroes;

seek SCRIPT, 0, 0;

print SCRIPT $ones;

close SCRIPT;

unlink $script;

__END__

Kai
--
http://www.westfalen.de/private/khms/
"... by God I *KNOW* what this network is for, and you can't have it."
  - Russ Allbery (rra@stanford.edu)


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

Date: Sun, 11 Jul 1999 14:06:09 +0100
From: Marquis de Carvdawg <carvdawg@patriot.net>
Subject: Re: md5 passwords via perl
Message-Id: <378896C1.83742E1C@patriot.net>

I use the MD5 module from ActiveState, on NT.  Check CPAN for
a module for your Linux...

Greg Dickson wrote:

> Im trying to get a handle on md5 password generation
> has anyone got an idea how to generate a md5 encrypted string
> from perl.
>
> Thanks
> Greg
>
> --
>            Greg Dickson
>  ('>   witchy@netserv.net.au
>  //\    Linux System Admin,
>  v_/_ Perl and Java Programing
>
> Margaret River Western Australia





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

Date: 11 Jul 1999 16:41:00 +0200
From: kaih=7Kg9-uhHw-B@khms.westfalen.de (Kai Henningsen)
Subject: Re: open+0
Message-Id: <7Kg9-uhHw-B@khms.westfalen.de>

abigail@delanet.com (Abigail)  wrote on 08.07.99 in <slrn7oav7l.5k.abigail@alexandra.delanet.com>:

> Hah! Except me. I always start my programs with $[ = 7.
>
>
>
> Abigail
> --
> package Just_another_Perl_Hacker; sub print {($_=$_[0])=~ s/_/ /g;
>                                       print } sub __PACKAGE__ { &
>                                       print (     __PACKAGE__)} &
>                                                   __PACKAGE__
>                                             (                )

Hmm. Hmmhmm. Why does this work with $[=7?


Kai
-- 
http://www.westfalen.de/private/khms/
"... by God I *KNOW* what this network is for, and you can't have it."
  - Russ Allbery (rra@stanford.edu)


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

Date: Sun, 11 Jul 1999 13:14:02 -0400
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: OT(ish): What is "Perl golf"?!
Message-Id: <1dus466.1u2p6lu1m0lz4hN@p103.tc2.state.ma.tiac.com>

Paul Scott <pcs26@cam.ac.uk> wrote:

> seen refs to perl golf in a few replies and I was just wondering what it is.

'strokes' eq 'characters'

There ya go!

(Or should I say
'strokes'eq'characters'
?)

-- 
 _ / '  _      /       - aka -
( /)//)//)(//)/(   Ronald J Kimball      rjk@linguist.dartmouth.edu
    /                                http://www.tiac.net/users/chipmunk/
        "It's funny 'cause it's true ... and vice versa."


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

Date: 11 Jul 1999 16:49:00 +0200
From: kaih=7KgA0HRHw-B@khms.westfalen.de (Kai Henningsen)
Subject: Re: Perl Everywhere : That's what I want
Message-Id: <7KgA0HRHw-B@khms.westfalen.de>

cassell@mail.cor.epa.gov (David Cassell)  wrote on 02.07.99 in <377CFB31.E8690767@mail.cor.epa.gov>:

> It's horrible to maintain ghastly Perl code.  Just as it's
> horrible to maintain ghastly C code, and C++ code, and...
> It's the programmer, not the language.  Take a look inside
> the Perl modules, and you'll see that Perl can be beautiful.

Well, be fair. *Some* of them are nice. Some are quite awful. Not naming  
any names while I've not got any replacement to show.

Kai
--
http://www.westfalen.de/private/khms/
"... by God I *KNOW* what this network is for, and you can't have it."
  - Russ Allbery (rra@stanford.edu)


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

Date: Sun, 11 Jul 1999 19:49:18 +0200
From: "Wouter de Jong" <wouter@nospam.almetaal.com>
Subject: Re: PERL: read dir and print out its files - Engels
Message-Id: <931715380.22588.0.pluto.c3adeace@news.demon.nl>

Rik. <rusenet@bigfoot.com> schreef in berichtnieuws
7magsi$6ij$1@enterprise.cistron.net...

<CUT>

> The script was ust basic.
> The FTP is our own FTP, people will have to upload files in it and using
> this perl script i create a filelist of that dir.
> What is CPAN, i suppose its a newsgroup which i don't have.

Hrr, programming in Perl and DON'T know CPAN..??? That's almost impossible
:-)
http://www.cpan.org

> Rik

--Wouter




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

Date: 11 Jul 1999 17:27:00 +0200
From: kaih=7KgA0Z41w-B@khms.westfalen.de (Kai Henningsen)
Subject: Re: Q:a simple update to index
Message-Id: <7KgA0Z41w-B@khms.westfalen.de>

lr@hpl.hp.com (Larry Rosler)  wrote on 09.07.99 in <MPG.11efd976289178db989c80@nntp.hpl.hp.com>:

> Ultimately, the loop seems to boil down to this (assuming a "\n"
> appended to $newline):
>
>   	   while (<INDEXIN>) {
>   			print INDEXOUT $newline unless $_ eq $newline;
>   			print INDEXOUT;
>          }
>
> Look Ma, no regex!

Is that any different from

   	   while (<INDEXIN>) {
   			print INDEXOUT $newline;
          }

? Does it really make a difference which of two equal strings you print?

Kai
-- 
http://www.westfalen.de/private/khms/
"... by God I *KNOW* what this network is for, and you can't have it."
  - Russ Allbery (rra@stanford.edu)


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

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


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