[9890] in Perl-Users-Digest
Perl-Users Digest, Issue: 3483 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Aug 19 13:07:39 1998
Date: Wed, 19 Aug 98 10:00:23 -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 Wed, 19 Aug 1998 Volume: 8 Number: 3483
Today's topics:
ActivePerl and POSIX <tom@imagic.be>
Re: After installing new Activestate version .. @INC er (Tye McQueen)
Re: Bourne shell to Perl translator <nguyend7@msu.edu>
Re: can you un encrypt htpasswd? (-)
Re: Change NT IP Address Using Perl (-)
Re: comp.lang.perl.announce redux (John Moreno)
Re: Converting to Uppercase to some Lower Case. (Tye McQueen)
diamond operator problem in new Activestate for Win32 <scrouch@execpc.com>
Re: Greedy arrays in list assignments <jdf@pobox.com>
Re: here's an implementation of diff in perl (Michael J Gebis)
Re: hmmm... (Abigail)
Re: How to clear a filehandle? (Abigail)
Re: Javascript becoming quite similar to perl <yong@shell.com>
Re: Mailing List Sign up (-)
Moving in a array? (Ravi Malghan)
Re: Moving in a array? <nguyend7@msu.edu>
newbie question <tbenge@nospam.ndsuk.com>
Re: newbie question rse@dasc.nl
Re: Performance of OO-Perl ? (Abigail)
problem subscribing to majordomo@mail.hip.com <Debra.Ruch@gov.edmonton.ab.ca>
Re: problem subscribing to majordomo@mail.hip.com (Tom Rokicki)
Re: problem subscribing to majordomo@mail.hip.com (Grinch)
Re: problems with system() command (Dermot McKay)
Re: Question: How do I test Perl? (Mike Wescott)
Re: Recommend a good editor <cmcurtin@interhack.net>
Re: reference to anonymous scalar? <jdporter@min.net>
Tab/Formatting in Perl <hussain@lle.rochester.edu>
Re: Tab/Formatting in Perl <J.D.Gilbey@qmw.ac.uk>
Re: Why dont people read the FAQs <rra@stanford.edu>
Re: wtf is the obsession with "foo" and "bar" (Steve Harvey)
Re: wtf is the obsession with "foo" and "bar" <yong@shell.com>
Yahoo! Technical - London office keithmarlow8098@my-dejanews.com
Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 19 Aug 1998 17:59:45 +0200
From: "Tom Adriaenssen" <tom@imagic.be>
Subject: ActivePerl and POSIX
Message-Id: <6respj$7q7$1@xenon.inbe.net>
Hey folks,
I have a problem with ActivePerl 502 (on Win98) and POSIX.
I try to create a socket (which success) and then set it non-blocking.
The fcntl call fails, because "Your vendor has not defined POSIX macro
F_SETFL"...
I declared
use POSIX;
and
use POSIX qw(:fcntl_h);
even tried
use Fcntl;
but alas, nothing works.
What am i doing wrong?
Below is the (offending) code...
Tom.
Code:
----------------------------------------------------------------------------
--
use IO::Socket;
use IO::Select;
use POSIX qw(:fcntl_h);
#use Fcntl;
[snip]
$oMaster = new IO::Socket::INET( LocalHost => 'tadriaenssen.imagic.be',
LocalPort => 5000,
Proto => 'tcp',
Listen => 5,
Reuse => 1 );
$oMaster or die "master creation failed";
fcntl( $oMaster, F_SETFL, O_NONBLOCK );
$oSelector = new IO::Select( $oMaster );
$oSelector or die "selector creation failed";
print " done.";
[snip]
Running this gives:
----------------------------------------------------------------------------
--
D:\!!Work\CS>perl s2.pl
Booting server... Your vendor has not defined POSIX macro F_SETFL, used at
s2.pl line 153
------------------------------
Date: 19 Aug 1998 10:28:28 -0500
From: tye@fumnix.metronet.com (Tye McQueen)
Subject: Re: After installing new Activestate version .. @INC errors
Message-Id: <6requs$af8@fumnix.metronet.com>
Kent Tenney <ktenney@execpc.com> writes:
) I installed the TK module using ppm.bat and it is in
) C:\perl\site\5.005\lib\MSWin32-x86-object\auto\Tk\
)
) I now have installed v5.00502
)
) when I try to use TK
) I get the error
) 'can't locate tk.pm in @INC (@INC contains
) C:\perl\site\5.00502\lib\MSWin32-x86-object ....)
) ^^
)
) I'm unable to find where @INC is defined
) any help with this would be appreciated
You have to read the C code [which I haven't done for this case].
It is computed dynamically. This is a fairly new feature (as is
PPM) and there appear to be some bugs left in it. The dynamic
@INC worked better before the version number and build properties
("MSWin32-x86-object") were added to the paths.
For now I'd only install Perl into directories using full-length
version numbers. So I'd uninstall and reinstall ActivePerl and
be sure to report this to ActiveState [they, not the regular perl
porters, provide PPM].
The full version number in the path is good for web publishers
who want their old webs to continue to use 5.004_01 while they
test out new webs on 5.004_02. For the rest of us, they are
a pain.
In any case, trying to allow "site" to be either "5.xxx/site"
or "site/5.xxx" may have been a mistake. I'd rather have
the version number only one place [and doing that would have
prevented your problem].
--
Tye McQueen Nothing is obvious unless you are overlooking something
http://www.metronet.com/~tye/ (scripts, links, nothing fancy)
------------------------------
Date: 19 Aug 1998 15:35:12 GMT
From: Dan Nguyen <nguyend7@msu.edu>
Subject: Re: Bourne shell to Perl translator
Message-Id: <6rerbg$mn2$1@msunews.cl.msu.edu>
Adel Elcheikh <ehselch@ehf.ericsson.se> wrote:
Perl is a complete superset of awk and sed that's why conversion
scripts exists.
: Novice Perl question :
: Is there any soft that converts Bourne shell scripts to Perl scripts?
However shell script conversions should probably be done by hand?
--
Dan Nguyen | There is only one happiness in
nguyend7@msu.edu | life, to love and be loved.
http://www.cse.msu.edu/~nguyend7 | -George Sand
------------------------------
Date: Wed, 19 Aug 1998 16:38:56 GMT
From: root.noharvest.\@not_even\here.com (-)
Subject: Re: can you un encrypt htpasswd?
Message-Id: <35dafef0.6668483@news2.cais.com>
John Minnihan <jbminn@greensfeldertech.com> Said this:
>construct a mail aliases file from yp passwd as well. Does this avoid the
>"I forgot my password" issue? No, but it makes user management very
>simple.
If you are trying to find a way to be able to TELL users their old
passwords, you are looking at the situation way too narrowly - anytime
a user asks me "what's my password? I forgot it" I just go and type
passwd username and make a new one - then I give them the new
password. If they forgot it, how would they even know that's not it?
I mean when they say "No, that's not it" you say "I thought you said
you forgot it?? If you know your password, don't tell me you forgot
it" Should make them laugh a little, usually.
------------------------------
Date: Wed, 19 Aug 1998 16:33:26 GMT
From: root.noharvest.\@not_even\here.com (-)
Subject: Re: Change NT IP Address Using Perl
Message-Id: <35dafde2.6398728@news2.cais.com>
"wkchiu" <wkchiu@yahoo.com> Said this:
>Reboot is required in NT4.0 but not NT3.51
You sure? - I know it's required in 3.51, but I have no idea about
4.0. I abandoned NT after a few weeks of watching 3.51 do all kinds
of funny blue screens and other enjoyable stunts. BUT, from my best
recollections, you have to reboot in 3.51 if you change IP addresses.
In fact, if you installed the IP stack out of order, you had to blast
the entire server and start over to get it to work. Nice "feechur".
>
>- <root.noharvest.\@not_even\here.com> &8<g$J(l%DCD
><35d48707.268535298@news2.cais.com>...
>> "wkchiu" <wkchiu@yahoo.com> Said this:
>>
>> >Is it possible to change the IP Address and Gateway using Perl ? What
>Perl
>> >command can I use ?
>> >
>>
>> Don't you still have to reboot an NT machine to change the IP address
>> anyway?
>>
>> Get a linux box, and you can do it "on the fly" any way you like,
>> perl, shell script, whatever. ;)
>>
>>
>>
------------------------------
Date: Wed, 19 Aug 1998 11:47:55 -0400
From: phenix@interpath.com (John Moreno)
Subject: Re: comp.lang.perl.announce redux
Message-Id: <1de0avl.87pgxx4idvimN@roxboro0-031.dyn.interpath.net>
Daniel Adams <dan@fearsome.net> wrote:
> Actually, Paddy was entirely correct in what he said. The language known as
> English is documented in dictionaries such as the Oxford English Dictionary.
> American English, whilst stemming from the same origins as British English,
> is sufficiently different to be classified as a different language. That is
> why many products ship with electronic dictionaries in which American
> English and British ENglish are two options.
This is of course ridiculous - please, a hundred words that are British
English and not American English (no slang or food please).
--
John Moreno
------------------------------
Date: 19 Aug 1998 10:05:04 -0500
From: tye@fumnix.metronet.com (Tye McQueen)
Subject: Re: Converting to Uppercase to some Lower Case.
Message-Id: <6repj0$1hh@fumnix.metronet.com>
) In article <903388079.157935@gate.part.net>,
) "Eric Pan" <pan@part.net> writes:
) : I need to convert title of all my books from upper case to normal title
) : sentences.
)
gbacon@cs.uah.edu (Greg Bacon) writes:
) my %exception;
) @exception{ qw( a an the of to ) } = ();
See http://sti.larc.nasa.gov/html/Chapt4/Chapt4_Headline.html
for more info.
--
Tye McQueen Nothing is obvious unless you are overlooking something
http://www.metronet.com/~tye/ (scripts, links, nothing fancy)
------------------------------
Date: Wed, 19 Aug 1998 11:10:47 -0500
From: "Scott Crouch" <scrouch@execpc.com>
Subject: diamond operator problem in new Activestate for Win32
Message-Id: <6retf2$t9c@newsops.execpc.com>
I had a perl script that works OK in ActiveState Perl for Win32 Build 316
(5.003_7) but now doesn't under the new 5.005 version. I didn't see anything
in the documentation or FAQs that covered this. Did I miss something? I am
running under Win95 and invoking the script as "perl -w test.pl *.txt" where
*.txt is a directory full of text files. The script works OK if I give it
one specific file name, but no longer works using the * wildcard character.
This distillation of the code can recreate the problem. Under 5.005 I get
the message "Can't open *.txt: No such file or directory" but it still works
fine
under 5.003_7.
while (<>) {
print $_;
}
Anybody know what's wrong?
Thanks!
Scott Crouch
------------------------------
Date: 19 Aug 1998 08:27:42 -0500
From: Jonathan Feinberg <jdf@pobox.com>
Subject: Re: Greedy arrays in list assignments
Message-Id: <btphm78x.fsf@mailhost.panix.com>
kpreid@ibm.net (Kevin Reid) writes:
> Ken Pizzini <ken@halcyon.com> wrote:
> > Dave Lorand <davel@spc.uchicago.edu> wrote:
> > > ($temp, @arr, $temp) = split //, 'abcde';
> >
> > That won't do what you meant it to: the @arr assignment is greedy...
>
> Is there any reason why Perl (c|sh)ouldn't be changed so it isn't
> greedy?
You mean such that it reads your mind? What about
($foo, @array, @another, $bar) = split //, 'conondrum';
You could use a slice to get the effect you want.
($foo, @arr[0..2], $bar) = split //, 'steak';
--
Jonathan Feinberg jdf@pobox.com Sunny Brooklyn, NY
http://pobox.com/~jdf/
------------------------------
Date: 19 Aug 1998 16:14:36 GMT
From: gebis@fee.ecn.purdue.edu (Michael J Gebis)
Subject: Re: here's an implementation of diff in perl
Message-Id: <6retlc$rpn@mozo.cc.purdue.edu>
abigail@fnx.com (Abigail) writes:
}Michael J Gebis (gebis@fee.ecn.purdue.edu) wrote on MDCCCXIV September
}MCMXCIII in <URL: news:6rdkjr$kb8@mozo.cc.purdue.edu>:
}++ ljz@asfast.com (Lloyd Zusman) writes:
}++ }In the case I mention in the paragraph you quoted, the probability is
}++ }high that the determination of matching/non-matching would occur after
}++ }the first character of the line is tested, irrespective of the
}++ }line-length value N. This is sublinear w/r/t N, so I suppose this
}++ }would be still be considered O(N) by the definition you supplied ...
}++ }right?
}++ If getting fast line v. line comparisions is your goal, it might be
}++ worth doing the O(length_of_file) hashing for each line, which then
}++ lets you do comparisons in O(1). (Of course, now we need to talk
}++ about memory efficiency...:)
}That's not a speed up in an asymptotic sense, for two reasons:
} - Creating the hash value takes Theta (length-of-line) for each
} line - as obviously each character is involved in creating the
} hash value.
} - The fact that 2 different hash values imply the lines are different
} does not mean that 2 equal hash values imply the lines are the same.
} If the hash values are the same, you still need to make an character
} to character comparison for at least N - c characters, where c is
} fixed and depending on your hash function.
Do something like SHA1. 160 bits of hash, meaning you need 2^80 line
before even having to worry about getting a birthday coincidence. The
effects of cosmic radiation on your DRAM altering your answer are more
significant.
--
Mike Gebis gebis@ecn.purdue.edu mgebis@eternal.net
------------------------------
Date: 19 Aug 1998 15:02:43 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: hmmm...
Message-Id: <6repej$2g4$2@client3.news.psi.net>
K.Posern (posern@informatik.uni-marburg.de) wrote on MDCCCXIV September
MCMXCIII in <URL: news:35DABAE4.FB8EC6B7@informatik.uni-marburg.de>:
++
++ O.k. you could say " return " does not really USE the Value it
++ returns... but it was a bit confusing for me to recognize that my fault
++ was the $Res (instead of $#Res) because Perl first shouted out, when I
++ used the array in a print...
++
++ So is this worth a change in the perl-code so that perl shouts out right
++ in line 4 ?!
NO! Returning 'undef' is a perfectly valid use of 'undef'. Perl warns you
if you are trying to things with 'undef' that don't make sense. Like adding
undef to something, or printing it.
For capturing things like:
sub foo {
@Res = (4);
return $Res;
}
that's why God^WLarry gaves us 'use strict;'.
Abigail
--
perl5.004 -wMMath::BigInt -e'$^V=new Math::BigInt+qq;$^F$^W783$[$%9889$^F47$|88768$^W596577669$%$^W5$^F3364$[$^W$^F$|838747$[8889739$%$|$^F673$%$^W98$^F76777$=56;;$^U=substr($]=>$|=>5)*(q.25..($^W=@^V))=>do{print+chr$^V%$^U;$^V/=$^U}while$^V!=$^W'
------------------------------
Date: 19 Aug 1998 15:04:25 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: How to clear a filehandle?
Message-Id: <6rephp$2g4$3@client3.news.psi.net>
Hugo Benne (h.benne@library.uu.nl) wrote on MDCCCXIV September MCMXCIII
in <URL: news:6re5je$dld$1@news2.xs4all.nl>:
++ Yes I'm a newbie, so this question might be very stupid ;-)
++
++ Can anybody explain how to open a file, make a backup of it and clear the
++ original file before closing it?
Why not just rename the file?
Abigail
--
perl5.004 -wMMath::BigInt -e'$^V=new Math::BigInt+qq;$^F$^W783$[$%9889$^F47$|88768$^W596577669$%$^W5$^F3364$[$^W$^F$|838747$[8889739$%$|$^F673$%$^W98$^F76777$=56;;$^U=substr($]=>$|=>5)*(q.25..($^W=@^V))=>do{print+chr$^V%$^U;$^V/=$^U}while$^V!=$^W'
------------------------------
Date: Wed, 19 Aug 1998 11:08:55 -0500
From: Yong Huang <yong@shell.com>
Subject: Re: Javascript becoming quite similar to perl
Message-Id: <35DAF897.AEADF40F@shell.com>
So what?
Chris Sidi wrote:
> Anyone notice how similar to perl javascript is becoming?
> Specifically methods like:
>
> Strings
> * match(regexp)
> * replace(regexp, newSubStr)
> * split(separator, limit)
> (separator can now be regex)
>
> Arrays
> * pop
> * shift
> * push(elt1, ..., eltN)
> * unshift(elt1,..., eltN)
> * reverse
> * sort(compareFunction)
> * join(separator)
>
> Stuff besides methods:
> * taint(dataElementName)
> * untaint(dataElementName)
> * for (i in fooObj) {}
>
> See http://developer.netscape.com/docs/manuals/communicator/jsref/index.htm
>
> -Sidi
------------------------------
Date: Wed, 19 Aug 1998 16:40:58 GMT
From: root.noharvest.\@not_even\here.com (-)
Subject: Re: Mailing List Sign up
Message-Id: <35db0005.6945700@news2.cais.com>
dgower@ilmioweb.it Said this:
>Hi all-
>
>I am looking for a mailing list sign up script that I can run on NT for
>ListServ. I have seen many out there, but they all require sendmail or some
>other mail server on your system and we are using the ISP for mail.
>
>It seems like it would be simple to just take the email address, the name, and
>include the Subscribe and the other information in the body of the message.
>Then connect to SMTP server and send it to the list server address, but I have
>not found it yet.
>
>Any help is appreciated. Thanks.
Don't use NT and you wouldn't have this problem. "Easy to use server"
my ass!
------------------------------
Date: 19 Aug 1998 16:02:15 GMT
From: rmalghan@site.gmu.edu (Ravi Malghan)
Subject: Moving in a array?
Message-Id: <6resu7$hvd@portal.gmu.edu>
Hello:
I am a perl beginner and need some help.
I have the following lines:
$file = trapd.log;
open (f_handle, $file);
@trapd_file = <f_handle>;
close(f_handle);
$pattern = 10;
while( certain condition)
{
I would like to move through each fo the lines in the array @trapd_file
whicle this condition is true. How do I increment array. @trapd_file[i++]
or $trapd_file[i++] is not working.
}
Thanks in advance for the help.
--
********************
Ravi Malghan
Tel: (O) (703) 207 7924
(H) (703) 385 0847
e-mail: rmalghan@bacon.gmu.edu
WWW : http://bacon.gmu.edu/~rmalghan
*********************
------------------------------
Date: 19 Aug 1998 16:44:03 GMT
From: Dan Nguyen <nguyend7@msu.edu>
Subject: Re: Moving in a array?
Message-Id: <6revcj$2ua$1@msunews.cl.msu.edu>
Ravi Malghan <rmalghan@site.gmu.edu> wrote:
: while( certain condition)
: {
: I would like to move through each fo the lines in the array @trapd_file
: whicle this condition is true. How do I increment array. @trapd_file[i++]
^^^^^^^^^^^^^^^^
: or $trapd_file[i++] is not working.
^^^
: }
Well @trapd_file[i++] and $trapd_file[i++] don't work because it
should be $i++ not i++. You should also avoid @trapd_file[$i++]
because it's a slice of an array. It's not what you want to do.
--
Dan Nguyen | There is only one happiness in
nguyend7@msu.edu | life, to love and be loved.
http://www.cse.msu.edu/~nguyend7 | -George Sand
------------------------------
Date: Wed, 19 Aug 1998 16:37:14 -0000
From: "Terry" <tbenge@nospam.ndsuk.com>
Subject: newbie question
Message-Id: <6rerj5$7k5$1@sirius.stone.ndsuk.com>
I've seen this line being used to compare the REMOTE_ADDR with an ip
address. What does it do in this case
if $_ is ^100\.100\.100\.100
$_ =~ tr/./\./;
What would $_ now contain.
Thanks
Terry
remove .nospam to email me
------------------------------
Date: Wed, 19 Aug 1998 15:24:07 GMT
From: rse@dasc.nl
Subject: Re: newbie question
Message-Id: <6reqmn$kun$1@nnrp1.dejanews.com>
In article <6r9o1v$m5$1@nnrp1.dejanews.com>,
SDunkin@oxfordinc.com wrote:
> Greetings, I'm trying to break a comma separated file into columns. Because I
> am just starting to learn perl, I am encountering some difficulty. Can
> someone point me in the right direction on how to do this?
>
> My input file will look like this:
> 123,name,name2,1
> 456,name3,name27,2
>
> and I need the output to look like this:
> 123 name name2 1
> 456 name3 name27 2
That's one of the reasons Perl was created in first place: to format
text in a quick way.
anyway, you can do it in one simple line :
printf("%-6s%-10s%-10s%-2s",split /,/) while (<>);
This will read each line from STDIN and print the formatted line to STDOUT
replace 6,10,10,2 with the correct length of collumn 1,2,3 and 4, or ad other
columns behind it with %-COLUMNLENGTHs ....
That's it...
Greetings,
Remco
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: 19 Aug 1998 15:13:49 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Performance of OO-Perl ?
Message-Id: <6req3d$2g4$4@client3.news.psi.net>
Wolfgang Sander-Beuermann (wsb@rrzn-nis.uni-hannover.de) wrote on
MDCCCXIV September MCMXCIII in <URL: news:6regvd$m8b$1@newsserver.rrzn.uni-hannover.de>:
++
++ Now we think of doing some parts (or all) in OO-Perl, BUT we do not know
++ how this would impact on the performance. There must be some overhead
++ within Perl for the management of all that OO stuff. Are there any
++ experiences how much that might cost in runtime speed?
The only way to know for sure is running benchmarks. You cannot say
OO is slower/faster, that entirely depends on the program.
There must be a benefit for using OO; why would you otherwise contemplate
using it?
++ sub einefunktion{
++ # $counter++; #1
++ $x{'counter'}++; #2
++ }
++
++
++ If Line #1 is in effect, we have a ration of 27 : 12
++ If Line #2 is in effect, we have a ration of 27 : 17
Yes, but they are different. With "$counter ++", you just have one
counter, and that's it. With $x {'counter'} ++, or with
$self -> {counter} ++, you're not limited to one counter.
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())))))))))))))))))))))))
------------------------------
Date: Wed, 19 Aug 1998 08:56:33 -0600
From: "Debra Ruch" <Debra.Ruch@gov.edmonton.ab.ca>
Subject: problem subscribing to majordomo@mail.hip.com
Message-Id: <35da83fb.0@champ>
Various FAQ's list majordomo@mail.hip.com to subscribe to ntperl,
ntperl_announce, Perl_for_Win32_announce, and Perl_for_Win32. However, when
I post a message to this address with subscribe in the body, I'm getting an
undeliverable error stating that the host is unknown. Has anyone else
subscribed to these lists and if so, what is the correct e-mail address?
dcr
------------------------------
Date: 19 Aug 1998 08:24:33 -0700
From: rokicki@cello.hpl.hp.com (Tom Rokicki)
Subject: Re: problem subscribing to majordomo@mail.hip.com
Message-Id: <6reqnh$kvg@cello.hpl.hp.com>
> No matter what an algorithm does to detect a worse case for quicksort,
> there is always a sequence which will take O(n**2), unless of course the
> checking algorithm is taking O(n!) which would be kindof stupid...
A careful median-selecting algorithm can make quicksort take O(n log n)
worst case. [See Cormen/Leiserson/Rivest Introduction to Algorithms
1990 edition pp. 189--192]. In practice, this typically makes it run
slower so I've never seen it used in real quicksorts.
Personally I generally used randomized median-of-three which seems to
work pretty well.
-tom
------------------------------
Date: Wed, 19 Aug 1998 16:22:19 GMT
From: spam@whoville.com (Grinch)
Subject: Re: problem subscribing to majordomo@mail.hip.com
Message-Id: <35dffb32.137313268@news.shore.net>
On Wed, 19 Aug 1998 08:56:33 -0600, "Debra Ruch"
<Debra.Ruch@gov.edmonton.ab.ca> wrote:
>Various FAQ's list majordomo@mail.hip.com to subscribe to ntperl,
>ntperl_announce, Perl_for_Win32_announce, and Perl_for_Win32. However, when
>I post a message to this address with subscribe in the body, I'm getting an
>undeliverable error stating that the host is unknown. Has anyone else
>subscribed to these lists and if so, what is the correct e-mail address?
Hip Communications is now called ActiveState. Their web site is at
(URL: http://www.activestate.com). Among other things, you can get
info about their mailing lists.
HTH!
-grinch
------------------------------
Date: Wed, 19 Aug 1998 14:59:39 GMT
From: MCKAYD@aplbt1.agw.bt.co.uk (Dermot McKay)
Subject: Re: problems with system() command
Message-Id: <6repjp$ng6$1@pheidippides.axion.bt.co.uk>
In article <35DA9C1C.15FAEF98@montefiore.ulg.ac.be>, Philippe MACK <mack@montefiore.ulg.ac.be> wrote:
>Hi everybody,
>
>I have some problems with the system keyword; i would like to execute
>this shell command :
>u/up/mack/bin/plaire/pgm/lfac pb < u/up/mack/bin/plaire/temp/lfac18.drv
>
>If i execute directly on the command line it works without any problem,
>but if i include it in a PERL script in the following way :
>
>system ("u/up/mack/bin/plaire/pgm/lfac pb <
>u/up/mack/bin/plaire/temp/lfac18.drv"),that doesn't work and i got these
>messages :
>
You could try
system ("u/up/mack/bin/plaire/pgm/lfac", "pb",
"<", "u/up/mack/bin/plaire/temp/lfac18.drv");
Dermot
------------------------------
Date: 19 Aug 1998 11:17:28 -0400
From: wescott@cygnus.ColumbiaSC.NCR.COM (Mike Wescott)
Subject: Re: Question: How do I test Perl?
Message-Id: <x4lnolknlj.fsf@cygnus.ColumbiaSC.NCR.COM>
In article <6rbush$rfm$7@info.uah.edu> gbacon@cs.uah.edu (Greg Bacon) writes:
> In article <6rak6k$88m$1@nnrp1.dejanews.com>, richsark@pcav.com writes:
> : Hello, I just installed Perl on my Solaris 2.51 box. I would like to know
> : what the command is to test it. I saw something like "hello World" but I
> : cannot remember how to type it out. Please send me a copy of your responce
> : to rich@pcav.com
> After you've built perl, you should run `make test'. This will run
> your perl against the regression suite. It should pass all tests
> (except the ones it skips). perlbug it if it doesn't.
I believe the original author was looking for a method to test his
installation of perl, not the build. `make test' carefully avoids
using any part of any perl currently installed on the machine. It's
a bit tedious, but hardly difficult, to modify the tests to run as
a test of the installation.
--
-Mike Wescott
mike.wescott@ColumbiaSC.NCR.COM
------------------------------
Date: 19 Aug 1998 12:35:53 -0400
From: Matt Curtin <cmcurtin@interhack.net>
To: scott@softbase.com
Subject: Re: Recommend a good editor
Message-Id: <86ogthgc9i.fsf@scooter.cis.ohio-state.edu>
scott@softbase.com writes:
> The main one is printing support, which Emacs and
> probably none of the other UNIX ports have in Windows.
Wow... is this to say that File->Pretty_print (i.e.,
`ps-print-buffer-with-faces') in XEmacs 21 under Win32 won't give good
"pretty print" output?
I don't have a Win32 machine on which to try it, but I'd very much
like to know, as I've been recommending that Windoze folks looking for
a good editor keep their eye on XEmacs 21.
--
Matt Curtin cmcurtin@interhack.net http://www.interhack.net/people/cmcurtin/
------------------------------
Date: Wed, 19 Aug 1998 11:23:33 -0400
From: John Porter <jdporter@min.net>
Subject: Re: reference to anonymous scalar?
Message-Id: <35DAEDF5.76CF@min.net>
M.J.T. Guy wrote:
>
> $scalarref = \[ 'my_value' ]->[0];
"PAY NO ATTENTION TO THE MAN BEHIND THE CURTAIN!"
--
John Porter
------------------------------
Date: Wed, 19 Aug 1998 11:03:23 -0400
From: Syed Jawwad Hussain <hussain@lle.rochester.edu>
Subject: Tab/Formatting in Perl
Message-Id: <35DAE93A.54918A07@lle.rochester.edu>
--------------B95F16B5DC7A8525C975E360
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Hello.
I was wondering whether there is a way in perl other than the "format"
syntax to print at certain column values.
eg.
This is a test
I want to print "This" at column 0
"is" at column 9,
"a" at column 11,
"test" at column 23 etc etc.
Thanks.
---Syed
--------------B95F16B5DC7A8525C975E360
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
<HTML>
<FONT SIZE=+2>Hello.</FONT><FONT SIZE=+2></FONT>
<P><FONT SIZE=+2>I was wondering whether there is a way in perl other than
the "format" syntax to print at certain column values.</FONT><FONT SIZE=+2></FONT>
<P><FONT SIZE=+2>eg.</FONT><FONT SIZE=+2></FONT>
<P><FONT SIZE=+2>This is a
test</FONT><FONT SIZE=+2></FONT>
<P><FONT SIZE=+2>I want to print "This" at column 0</FONT>
<BR><FONT SIZE=+2>"is" at column 9,</FONT>
<BR><FONT SIZE=+2>"a" at column 11,</FONT>
<BR><FONT SIZE=+2>"test" at column 23 etc etc.</FONT><FONT SIZE=+2></FONT>
<P><FONT SIZE=+2>Thanks.</FONT><FONT SIZE=+2></FONT>
<P><FONT SIZE=+2>---Syed</FONT></HTML>
--------------B95F16B5DC7A8525C975E360--
------------------------------
Date: Wed, 19 Aug 1998 16:28:05 +0100
From: Julian Gilbey <J.D.Gilbey@qmw.ac.uk>
Subject: Re: Tab/Formatting in Perl
Message-Id: <35DAEF05.66F081CC@qmw.ac.uk>
Syed Jawwad Hussain wrote:
>
> Hello.
>
> I was wondering whether there is a way in perl other than the "format"
> syntax to print at certain column values.
>
> eg.
>
> This is a test
>
> I want to print "This" at column 0
> "is" at column 9,
> "a" at column 11,
> "test" at column 23 etc etc.
>
> Thanks.
>
> ---Syed
You could try printf (or sprintf), or even, if you're very brave, use
the
pack command.
Julian
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Julian Gilbey Email: J.D.Gilbey@qmw.ac.uk
Dept of Mathematical Sciences,
Queen Mary & Westfield College,
Mile End Road, London E1 4NS, ENGLAND
------------------------------
Date: 19 Aug 1998 08:56:19 -0700
From: Russ Allbery <rra@stanford.edu>
Subject: Re: Why dont people read the FAQs
Message-Id: <m34sv92cf0.fsf@windlord.Stanford.EDU>
Owen Cook <rcook@pcug.org.au> writes:
> unless((length($CCNumber) == 16) && ($CCNumber=~ /\d{16}/))
If you *are* worried about trailing newlines and hence don't want to use
the /^\d{16}$/ solution, you could write that as:
unless (length ($CCNumber) == 16 && $CCNumber !~ /\D/)
A minor point, but I see a lot of regexes that aren't really minimal; it
usually turns out that there's a simpler way of writing the regex than one
would think on first try.
--
#!/usr/bin/perl -- Russ Allbery, Just Another Perl Hacker
$^=q;@!>~|{>krw>yn{u<$$<[~||<Juukn{=,<S~|}<Jwx}qn{<Yn{u<Qjltn{ > 0gFzD gD,
00Fz, 0,,( 0hF 0g)F/=, 0> "L$/GEIFewe{,$/ 0C$~> "@=,m,|,(e 0.), 01,pnn,y{
rw} >;,$0=q,$,,($_=$^)=~y,$/ C-~><@=\n\r,-~$:-u/ #y,d,s,(\$.),$1,gee,print
------------------------------
Date: Wed, 19 Aug 1998 15:23:08 GMT
From: ej345@NOSPAM.cleveland.freenet.edu (Steve Harvey)
Subject: Re: wtf is the obsession with "foo" and "bar"
Message-Id: <35deeaa0.7511974@nnrp.digex.net>
On Wed, 05 Aug 1998 11:56:22 +0000, Adam Ipnarski
<adam@fastfare.co.uk> wrote:
>Kim Saunders wrote:
>>
>> Hiya,
>>
>> Why are "foo" and "bar" ALWAYS used as example names in anything unix
>> related, and partularly perl? What is the origin? What do they mean? (foo i
>> can handle). Why aren't people more imaginative when they do stuff, and use
>> their own things? It's rather irritating sometimes.
>>
>> KimS
>
> As for why UNIX programmers use foo and bar, I suppose its because we
>don't want to waste our imagination on unimportant things like temporary
>var names :-)
Not at all; foo/bar/baz etc. are very useful conventions which let
your reader or listener know you are talking about a specifically
nonspecific variable. Otherwise people would wonder "Is he just using
that name as a placeholder, or is he being cute by actually naming an
important variable $some_random_variable?" For the same reason, it's
probably bad form to actually use $foo and $bar in a program, because
then people will wonder "Is that a real variable or a placeholder?"
>PS. This newsgroup should not be used for pointless questions like this
>one. If you *really* find it necessary to obtain answers to things like
>this, use the Web. God knows there's wnough useless stuff out there!
>
Not a pointless question at all- it's a widely used convention, and
there are reasons for using it. And while you *could* find the answer
on the web, it might not be easy if you didn't know about the Jargon
File and soforth... Doing a blanket search on common 3-letter words
is not always a picnic... :-/
BTW I think the regional variants listed in the Jargon File are
interesting; how many of these have people experienced firsthand? I
first encountered foo-bar-baz-quux while in junior high school (early
80's) from one of my friends who was really into reading things like
Scientific American and Dr. Dobbs' (we were a precocious bunch). I
also have encountered a guy from England who uses 'wibble' with
alarming frequency, both in his computer discussions + in day-to-day
conversation...
-Steve
------------------------------
Date: Wed, 19 Aug 1998 11:07:57 -0500
From: Yong Huang <yong@shell.com>
Subject: Re: wtf is the obsession with "foo" and "bar"
Message-Id: <35DAF85D.113E328A@shell.com>
I remember reading an answer to this question probably at comp.lang.c. It's said
"foo" and "bar" originate from the military. As for the details, I didn't care to
remember.
Yong
------------------------------
Date: Wed, 19 Aug 1998 15:04:26 GMT
From: keithmarlow8098@my-dejanews.com
Subject: Yahoo! Technical - London office
Message-Id: <6rephq$j9q$1@nnrp1.dejanews.com>
Want to work for Yahoo!.. it could be you...
Job Spec:
Responsible, as part of a team, for maintaining and enhancing central systems
and utilities used for the processing of European feeds, in particular the
European finance product.
Ability to read and quickly learn the existing code base as well as excellent
problem solving abilities required.
Full software cycle experience is beneficial.
The successful candidate will have a knowledge of C++/C, Unix, Perl, and the
Internet (including HTML, CGI and web servers).
Must be responsible and reliable, and have the ability to develop tools and
systems that could be used throughout Yahoo.
Good english communication skills are required, fluency in another European
language is advantageous.
You must have at least a degree or equivalent qualification, and at least 2
years experience of software engineering in a commercial environment.
Please send your plain text CV to keith @ uk.yahoo-inc.com or fax it to
0171 664 0401.
No agency enquires will be entertained.
Keith Marlow
Technical Yahoo! Europe
-----== 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 3483
**************************************