[8744] in Perl-Users-Digest
Perl-Users Digest, Issue: 2361 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Apr 19 00:07:57 1998
Date: Sat, 18 Apr 98 21:00:25 -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 Sat, 18 Apr 1998 Volume: 8 Number: 2361
Today's topics:
Re: a (Jonathan Stowe)
Re: ATTN: Netscape Enterprise for NetWare Admins: Is th (Jonathan Stowe)
Re: cgi using perl (Abigail)
Re: count number of lines in a text file (Abigail)
Re: EASY QUESTION: Replacing a line in a textfile (Jonathan Stowe)
Re: EASY QUESTION: Replacing a line in a textfile (Abigail)
Re: Fastest "smallest power of 2 >= N" in Perl? (Andre L.)
Re: fork and forget (Michael Wang)
Re: how do I install modules on win32? <"xuming "@ email.unc.edu>
Re: how do I install modules on win32? (Stuart McDow)
Re: how do I install modules on win32? (Jonathan Stowe)
Re: keys in hashs (MICHAEL PATRICK SLONE)
Lexers / tokenizers in Perl (Mark-Jason Dominus)
Losing track of STDOUT after open(FOO, "| program") -- (Abby Franquemont)
Re: Losing track of STDOUT after open(FOO, "| program") (Jason Gloudon)
Mozilla 5.0 (WAS Re: Project question and gripe about ( <sneaker@earthling.net>
Re: Multiline RegExp problem (Jonathan Stowe)
Re: nholbroo@icarus.weber.edu (Jonathan Stowe)
printf problem <tsu@jung.jp>
Re: printf problem <puttkammer@access.ch>
Project question and gripe about (Re: Snobby news group <joat@series2000.com>
Re: Project question and gripe about (Re: Snobby news g <sneaker@earthling.net>
Re: Project question and gripe about (Re: Snobby news g (Jason Gloudon)
Re: Question? (Jonathan Stowe)
Re: Question? (Abigail)
Re: Snobby news group (Stuart McDow)
Re: Snobby news group (Mark Rogaski)
Re: Snobby news group <ljz@asfast.com>
Re: uninitialized <STDIN> chunk 1. ???? (Tad McClellan)
Re: Wanna laugh? (My First cgi.pm Script) (Tad McClellan)
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 17 Apr 1998 04:05:25 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: a
Message-Id: <3536ca15.37208611@news.btinternet.com>
On 18 Apr 1998 18:27:20 GMT, mike@ultimate.bene.baynet.de (root)
wrote:
>sldcsl
>>djc
You might find the guide to good subject lines in Usenet postings
useful:
http://www.perl.com/CPAN/authors/Dean_Roehrich/subjects.post
You promised you wouldnt do fruit this week.
/J\
Jonathan Stowe
See the MetaFaq at http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm
------------------------------
Date: Fri, 17 Apr 1998 04:45:55 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: ATTN: Netscape Enterprise for NetWare Admins: Is there a port of Perl5 for Netware?
Message-Id: <3536d6a3.40374708@news.btinternet.com>
On Sat, 18 Apr 1998 20:28:49 GMT, BullDog@USMC.Net (BullDog) wrote:
>Is there a port of Perl5 for Netware? If so, would you be kind enough
>to tell me where I can get a copy of the NLM for the Novell Enterprise
>server for NetWare?
>
It appears that the Perl that comes with Novell Webserver 3 is some
version 5 (of ambiguous revision level). The more widely available
version is 4.036. However I'm not sure about this Novonyx thingy - I
only saw it first yesterday (Hey no search engine)
>Alternatively, how can I find out what version the existing Perl NLM
>is?
>
You probably need to write a quick CGI'ish thing that simply printed
out $]
>I have my Perl stuff working beautifully on Enterprise for
>NT/Perl5.003 and REALLY need to move it onto our Novell webserver.
>
Uh, oh. I feel a recommendation to reformat the disk of a server and
install Linux on it coming on.
You might have some issues involving modules cropping up ...
>HELP!
>
HEY! Its Saturday dont shout please.
>Please respond to mjs-NOSPAM-@cadvision.com (remove -NOSPAM- ), or
>this group.
Egads
/J\
Jonathan Stowe
See the MetaFaq at http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm
------------------------------
Date: 19 Apr 1998 02:59:38 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: cgi using perl
Message-Id: <6hbpaq$6ur$1@client3.news.psi.net>
N i c l a s O l o f s s o n (gurun@acc.umu.se) wrote on MDCXCI September
MCMXCIII in <URL: news:353840F1.C052380C@acc.umu.se>:
++ Abigail wrote:
++ > There's no Perl specific aspect in your question.
++ [snip]
++ > Ask in the CGI group. Or better, read the FAQ.
++
++ Perl FAQ really got to be something. Every answer beginning with "no
++ Perl specific" seem to refer to the FAQ. I'll bet it's a very fine FAQ,
++ since it seem to answer all Q possible, Perl specific or not. Maybe
++ that's why you never tell people where it is?
There are other groups that have FAQs too. Including the cgi group.
That was the FAQ I was refering too.
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=>()'
------------------------------
Date: 19 Apr 1998 03:11:54 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: count number of lines in a text file
Message-Id: <6hbq1q$6ur$3@client3.news.psi.net>
John Taylor-Johnston (eslcafe@callisto.si.usherb.ca) wrote on MDCXCI
September MCMXCIII in <URL: news:3304C798.7E7A@callisto.si.usherb.ca>:
++ I need a simplified piece of script that will do this:
++
++ open a data file
++ read the number of lines of text
++ if number of lines of text exceed 50
++ delete a line
perl -i -nwe 'print unless $. == 51';
++ Please respond by e-mail
Private consulting is $150/h.
Abigail
--
perl -MLWP::UserAgent -MHTML::TreeBuilder -MHTML::FormatText -wle'print +(HTML::FormatText -> new -> format (HTML::TreeBuilder -> new -> parse (LWP::UserAgent -> new -> request (HTTP::Request -> new ("GET", "http://work.ucsd.edu:5141/cgi-bin/http_webster?isindex=perl")) -> content)) =~ /(.*\))[-\s]+Additional/s) [0]'
------------------------------
Date: Fri, 17 Apr 1998 04:05:21 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: EASY QUESTION: Replacing a line in a textfile
Message-Id: <3536c417.35948412@news.btinternet.com>
On Sat, 18 Apr 1998 15:51:47 -0400, "Miguel Barrientos"
<boliviaweb@prodigy.net> wrote:
>I realize this is a very basic question, but I'm just starting.
>How do I replace a line in a text file?
>
You might find the section in perlfaq5 entitled
" How do I change one line in a file/delete a line in a file/insert a
line in the middle of a file/append to the beginning of a file?"
enlightening.
If you have the "standard" binary distribution for Win32 (assuming you
post from the same machine you use perl on) and can run perl from the
command line then you can use:
perldoc perlfaq5
to access this most excellent piece of documentation.
/J\
Jonathan Stowe
See the MetaFaq at http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm
------------------------------
Date: 19 Apr 1998 03:13:49 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: EASY QUESTION: Replacing a line in a textfile
Message-Id: <6hbq5d$6ur$4@client3.news.psi.net>
Miguel Barrientos (boliviaweb@prodigy.net) wrote on MDCXCI September
MCMXCIII in <URL: news:6hb0b4$2sq0$1@newssvr04-int.news.prodigy.com>:
++ I realize this is a very basic question, but I'm just starting.
Then it is a good start to read the manuals and the FAQ.
Alternatively, you can buy a good book. See www.perl.com
for some book reviews.
++ How do I replace a line in a text file?
That is a vague question, with many different answers, depending
what exactly you want. The manual will help you find the right
approach.
Abigail
--
perl -wleprint -eqq-@{[ -eqw+ -eJust -eanother -ePerl -eHacker -e+]}-
------------------------------
Date: Sat, 18 Apr 1998 23:21:55 -0500
From: alecler@cam.org (Andre L.)
Subject: Re: Fastest "smallest power of 2 >= N" in Perl?
Message-Id: <alecler-1804982321550001@dialup-597.hip.cam.org>
In article <01b41e85$d09ed5c0$8418aace@igork>, "Igor Krivokon"
<igor.k@usa.net> wrote:
> Well, what about this:
>
> f(N) = 1 << log(N-0.5)/log(2.0) + 1
print 'Wow';
A.L.
------------------------------
Date: 18 Apr 1998 22:47:35 GMT
From: mwang@alhena.ibk.ml.com (Michael Wang)
Subject: Re: fork and forget
Message-Id: <6hbai7$n44$1@news.ml.com>
>=> I'm trying to make a perl script fire-off another perl script, but not
>=> wait for it to terminate. I've tried using:
>=> system("script_name &");
>=> exec("script_name");
>=> open(SCRIPT, "| script_name"); close(SCRIPT);
>=>
>=> but no matter what, the parent waits for the child to fininsh. How do I
>=> launch the other script and forget about it?
I have written such a utility called "submit". It proved quite useful
and reliable for me. It is available from
ftp://ftp.mindspring.com/users/mwang/submit
------------------------------
Date: Sat, 18 Apr 1998 17:53:28 -0400
From: Xuming <"xuming "@ email.unc.edu>
Subject: Re: how do I install modules on win32?
Message-Id: <6hb7lm$rl2$1@fddinewz.oit.unc.edu>
thanks, Bob. so, I just copy the *.pm files to the directory they belong to
(e.g. perl\lib\net)?
just wonder why the faq and readme don't mention this approach. I feel this way
-- downloading the modules, unzipping them with Winzip or whatever, and copying
module files to their directories -- is much easier than using cpan.pm which the
faq claims is easiest (probably true for UNIX systems).
Xuming Wang
Bob Trieger wrote:
>
> Xuming wrote:
> >
> > I am new to perl, but I checked the FAQ and the readme file with a module
> > bundle, and I also searched Dejanews. the most helpful info I got is:
>
> It really depends on which module you are looking for and what version
> of perl you are running. The standard win32 version 5.004_02 ported by
> Gurusamy Sarathy comes with many of the modules already installed.
>
> Otherwise it is usually as simple as copying the modules components to
> the right directories.
>
> HTH
> --
> Bob Trieger | Titanic: big boat, bigger
> sowmaster@juicepigs.com | iceberg, big deal
------------------------------
Date: 19 Apr 1998 00:20:56 GMT
From: smcdow@arlut.utexas.edu (Stuart McDow)
Subject: Re: how do I install modules on win32?
Message-Id: <6hbg18$rf2$1@ns1.arlut.utexas.edu>
Bob Trieger <sowmaster@juicepigs.com> writes:
>
> Otherwise it is usually as simple as copying the modules components
> to the right directories.
Maybe. If the module contains any XS components, this approach won't
work.
Better to unpack the module distribution, then, from inside the
resulting directory run:
perl Makefile.PL
make test
make install
Better still, is to run:
perl -MCPAN -eshell
to download, build, and install your module interactively.
Hope this is helpful.
--
Stuart McDow Applied Research Laboratories
smcdow@arlut.utexas.edu The University of Texas at Austin
"It is obvious that about 750,000 people ago, Austin was a wonderful City."
------------------------------
Date: Sun, 19 Apr 1998 01:52:19 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: how do I install modules on win32?
Message-Id: <35394317.44409498@news.btinternet.com>
On Sat, 18 Apr 1998 12:52:33 -0400, Xuming <"xuming "@ email.unc.edu>
wrote:
>I am new to perl, but I checked the FAQ and the readme file with a module
>bundle, and I also searched Dejanews. the most helpful info I got is:
>
<snip>
>
>there is a CPAN.pm file under my perl/lib dir, but how do I use it to install a
>module bundle? I don't have gzip or tar on my win95 for sure. so if I run
>'perl cpan.pm' it would just fail (error messages at the end of this post). I
>don't have a C compiler either. so make won't run. (I'm going to install VC5,
>will that help?)
>
What you really want to do is :
perl -MCPAN -e shell
Or try:
perldoc CPAN
to find more information.
Examining the CPAN.pm file with an editor would reveal the
documentation, however, whether perldoc works or not. For myself I
actually find it quite wierd that people dont look at program source
more often - especially in Perl where there is so much of it. (Hey,
I've learned programming languages, after a fashion admittedly, by
reading source code.) Perhaps this lack of curiosity lies at the root
of some of the symptoms we are seeing in c.l.p.m.
You can find both tar and gzip out there for Windows (djgpp & cygwin32
ports are available and possibly more). Alternatively WinZip which is
a widely available piece of shareware will deal with these and various
other formats.
If you have the "standard" distribution for win32 then you will also
have "dmake". Once you have unpacked a module you can run through the
standard build procedure i.e.
perl Makefile.PL
dmake
dmake test
dmake install
You may find it far easier if you have a unix-like shell and
associated utilities. (I guess I lay myself open to charges of being
a unix zealot but - ) I have been finding myself advocating the
cygwin32 port of the GNU utilities and shell quite a lot recently -
but again you can look at:
http://www.cygnus.com
(On NT the Resource Kit gives you enough shell stuff to be going on
with - just enough..)
/J\
Jonathan Stowe
See the MetaFaq at http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm
------------------------------
Date: 18 Apr 1998 22:41:48 GMT
From: mpslon01@msuacad.morehead-st.edu (MICHAEL PATRICK SLONE)
Subject: Re: keys in hashs
Message-Id: <6hba7c$5bj@infoserv.morehead-st.edu>
stvhoof@netvision.net.il wrote:
> In article <352DB35D.7243@outofservice.com>,
> jn1@outofservice.com wrote:
> >
> > $myhash{'key'} = 12;
> > $myhash{key} = 12;
> >
> > first one is the better way to do it- the second one is a
> > bareword, and if perl6 ever came along and claimed the literal
> > token key as a symbol, your script would fail.
>
> Sorry, I beg to differ...they are exactly the same. In fact, I would say the
> second one is preferred, because it's cleaner (less punctuation to clutter up
> the screen!)
> Here's my proof:
> 1 #!perl
> 2 @ARGV=qw/hi there/;
> 3
> 4 $foo{shift}='test';
> 5 print keys %foo, "\n";
Here's a counterexample:
-----begin transcript-----
/students/ms/mpslon01$ perl -v
This is perl, version 5.000
Copyright 1987-1994, Larry Wall
Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5.0 source kit.
/students/ms/mpslon01$ cat proof
#!/usr/local/bin/perl -w
@ARGV = qw/hi there/;
$foo{shift} = 'test';
print keys %foo, "\n";
/students/ms/mpslon01$ proof
hi
------end transcript-----
I haven't tried this on any other versions of perl (or operating systems: this
was on HP-UX 9.0), but I would suspect similar behavior would occur.
Transcripts of counterexamples to this counterexample, along with information
on OS and perl version would be appreciated.
--
Michael Slone
------------------------------
Date: 18 Apr 1998 19:41:42 -0400
From: mjd@op.net (Mark-Jason Dominus)
Subject: Lexers / tokenizers in Perl
Message-Id: <6hbdnm$6nt$1@monet.op.net>
Keywords: intimidate Lawson Mephistopheles scrawny
It used to be that if someone asked me I there was any kind of
programming that Perl was not good for, I would say that it was not
very good for writing lexers. That was because the way I was used to
writing lexers was to process the input a character at a time with a
state machine, and in Perl, that approach is rather slow.
This, of course, does not show that Perl is bad for writing lexers.
It just shows that this is the wrong approach to use when writing a
lexer in Perl. I discovered over time that Perl is an *incredibly
good* language for writing lexers, if you use the right techniques.
My Perl Line of the Day page usually discusses some interesting or
charming trviality. Today, however, it demonstrates an extremely
powerful technique for writing good lexers in Perl. It shows a
complete lexer for a calculator program. The lexer is one line long.
Details and discussion at
<URL:http://www.plover.com/~mjd/perl/LOD/>
I would have posted here, but I was too lazy to translate the article
from HTML.
------------------------------
Date: 18 Apr 1998 16:58:43 -0700
From: abby@ucan.foad.org (Abby Franquemont)
Subject: Losing track of STDOUT after open(FOO, "| program") -- normal?
Message-Id: <6hbenj$mi3$1@ucan.foad.org>
This seems to me like it should be apparent but I'm not finding an
answer I'm sure I'm grokking to the fullest... doubtless it is all
explained in gory detail and I've missed where (I've checked the
perl FAQ, done a dejanews search, and looked in the man page for
perlipc).
I'm finding it to be the case that, while STDOUT is the default
at the beginning of a script, following something like:
open(FOO, "| /bin/program -flags $input") || die "No go pal $!\n";
that if I do not explicitly open STDOUT again, any print statements
for example (like to report completion of the script) do not go to
STDOUT... instead they appear to go nowhere. (Yes, I have closed FOO)
I did find the following paragraph in the perlipc man page:
Both the main process and the child process share the same
STDIN, STDOUT and STDERR filehandles. If both processes
try to access them at once, strange things can happen.
You may want to close or reopen the filehandles for the
child. You can get around this by opening your pipe with
open(), but on some systems this means that the child
process cannot outlive the parent.
It seems this would be the cause of the behaviour I'm finding -- is
my understanding correct? Is the behaviour I'm describing totally
normal, or am I (most likely) missing something? I'm not looking to
reopen the filehandle for the child process /bin/program, I'm looking
to print to STDOUT for the benefit of Joe Luser running the script from
the shell.
If the paragraph above from the perlipc man page is the reason for
the behaviour I'm seeing, where should I look for style pointers to
find a good way around this? Is opening STDOUT explicitly in order to
print a script is done message really what I ought to do? It seems...
crufty to me. This doesn't seem to be exactly the kind of style
issue addressed by man perlstyle either, as far as I can see.
My goofball script works -- I just feel sure that what I've done to
get it to go is kludgy and unattractive (namely explicitly opening
STDOUT to write a message to Joe User's screen saying "You're done.").
Pointers to existing documentation which I may have missed will be
welcomed with relish.
--
Abby Franquemont Nothing cures insomnia like the realization
J. Random BOFH that it's time to get up. --Fortune program
------------------------------
Date: Sun, 19 Apr 1998 03:46:30 GMT
From: jgloudon@manitoba.bbn.com (Jason Gloudon)
Subject: Re: Losing track of STDOUT after open(FOO, "| program") -- normal?
Message-Id: <slrn6jisnd.gsr.jgloudon@manitoba.bbn.com>
Abby Franquemont <abby@ucan.foad.org> wrote:
.
.
>I'm finding it to be the case that, while STDOUT is the default
>at the beginning of a script, following something like:
>
>open(FOO, "| /bin/program -flags $input") || die "No go pal $!\n";
>
>that if I do not explicitly open STDOUT again, any print statements
>for example (like to report completion of the script) do not go to
>STDOUT... instead they appear to go nowhere. (Yes, I have closed FOO)
Are you execing any processes ? Are you certain that this isn't really
buffering of STDOUT ? ( try setting $| ).
>I did find the following paragraph in the perlipc man page:
>
> Both the main process and the child process share the same
> STDIN, STDOUT and STDERR filehandles. If both processes
> try to access them at once, strange things can happen.
Strange things would happen with STDOUT if one of the processes alters the
terminal state, turning off echo for example, or repositioning the cursors eg.
Plain text output should not cause a problem.
--
Jason Gloudon
------------------------------
Date: Sun, 19 Apr 1998 03:28:27 GMT
From: Bill 'Sneex' Jones <sneaker@earthling.net>
Subject: Mozilla 5.0 (WAS Re: Project question and gripe about (Re: Snobby news group))
Message-Id: <35396DC1.C83CC577@earthling.net>
Jason Gloudon wrote:
> >I cannot get it to compile. I have the Unix version.
> >All 85MB of it :-)
>
> You don't have motif do you ? You need it to compile 'mozilla'.
> The source released on the first day compiles out the tar ball without
> modification on Solaris with CDE as it includes motif includes and libs.
>
> --
> Jason Gloudon
No, I'm RedHat 5.0 (Hurricane)
But I now have a place to start :-)
__________________________
Bill Jones...............|
Sneaker's Nest...........|
Chasecreek Systemhouse...|
------------------------------
Date: Fri, 17 Apr 1998 04:05:27 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: Multiline RegExp problem
Message-Id: <3536cdc9.38109326@news.btinternet.com>
On Sat, 18 Apr 1998 13:13:13 +0300, Tomi Tuominen
<Tomi.Tuominen@iki.fi> wrote:
>Hi there!
>
>My goal is to make a script which reads files specified
>in the command line and then remove first (and _only_ first)
>comments.
>Comments can be written in C or C++ style. (ie. // or /* ... */)
>
<snip>
You might just check out the recurring threads on comp.lang.c on the
subject of commenting if you intend to be dealing with *real* C code.
They seem to get almost if not more zealously eclectic (?!!) about
commenting style than people around here do.
(Actually have just had a quick lurk at comp.lang.c and I wonder why
Usenet hasnt been besieged by a bunch of comparative anthropologists
studying "programmers" )
I dont like being called Eddy Baby
/J\
Jonathan Stowe
See the MetaFaq at http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm
------------------------------
Date: Fri, 17 Apr 1998 04:45:57 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: nholbroo@icarus.weber.edu
Message-Id: <3536dce6.41977145@news.btinternet.com>
On Thu, 16 Apr 1998 00:37:16 -0600, "madness"
<nic<!spam!>@mail.cyber-west.com> wrote:
>Here's my documentation.
>
>
<snip>
What was that all about ?
A) dont post binaries
B) dont post MS-Word documents I for one havent got enough disk space
for the viewer ;-}
/J\
Jonathan Stowe
See the MetaFaq at http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm
------------------------------
Date: Sun, 19 Apr 1998 00:54:01 +0200
From: who knows <tsu@jung.jp>
Subject: printf problem
Message-Id: <35392F08.FFF22521@jung.jp>
hi,
since im working with per 5.004... (before 5.003) I get some
converting errors cause of my printf syntax:
Original Version (It worked):
for ($col=1; $col<$#{$table[$row]}; $col++) {
printf "%-$colwidth.$colwidth s \;", $table[$row][$col];
}
printf "%-$colwidth.$colwidth s", $table[$row][$#{$table[$row]}];
New Version (changed - It works)
for ($col=1; $col<$#{$table[$row]}; $col++) {
printf "%-10.10s \;", $table[$row][$col];
}
printf "%-10.10s", $table[$row][$#{$table[$row]}];
print "\n";
but in the new version, I want to change the column-width 10 with an
variable f.ex. $colwidth.
i tried "everything" but can't get it workin. what am i doing wrong?
thanks for your help
--
-----------------------------------------------------
Andreas Puttkammer (puttkammer@access.ch)
------------------------------
Date: Sun, 19 Apr 1998 00:59:11 +0200
From: Andreas Puttkammer <puttkammer@access.ch>
Subject: Re: printf problem
Message-Id: <3539303F.6527075@access.ch>
Sorry, I didn't configure my browser correctly. - Won't happen again.
by
who knows wrote:
> hi,
>
> since im working with per 5.004... (before 5.003) I get some
--
-----------------------------------------------------
Andreas Puttkammer (puttkammer@access.ch)
------------------------------
Date: Sat, 18 Apr 1998 21:29:22 -0400
From: Tim Kramer <joat@series2000.com>
Subject: Project question and gripe about (Re: Snobby news group)
Message-Id: <35395371.6AD10639@series2000.com>
Question: Has anyone tried playing with the netscape
source code (to include any perl interface/mod)?
Gripe follows:
I R A Aggie wrote:
> If they're not willing to put in some effort to figure out their
> problems, then why should anyone else be expected to put in
> any more effort than what the questioner has already expended?
This would be fine if those people not willing to put the effort
into answering a newbie's question would refrain from putting
the effort into roasting said newbie over "flames". It would
make for a much more respectable newsgroup and would
probably bring the SNR higher.
Analogy: We have a "road rage" problem here in VaBch.
Seems that if people respect the speed limit during rush
hour, they get cut off/tailgated/blinded/honked at/and worse.
This includes the cars with those big yellow signs on top
which read "student drivers".
Suggested rule of thumb: If the question is below your
ability, ignore it and let someone else respond to it. (That
is, unless someone is paying you to respond to ALL of
the posts in c.l.p.m.)
------------------------------
Date: Sun, 19 Apr 1998 02:56:31 GMT
From: Bill 'Sneex' Jones <sneaker@earthling.net>
Subject: Re: Project question and gripe about (Re: Snobby news group)
Message-Id: <35396646.C1EAAB0@earthling.net>
Tim Kramer wrote:
> Question: Has anyone tried playing with the netscape
> source code (to include any perl interface/mod)?
>
> Gripe follows:
>
Not interested in the Gripe, I'll skip it; but,
I have been banging on Netscape 5.0 Source
and I would say that a lot of it is missing.
I cannot get it to compile. I have the Unix version.
All 85MB of it :-)
--
__________________________
Bill Jones...............|
Sneaker's Nest...........|
Chasecreek Systemhouse...|
------------------------------
Date: Sun, 19 Apr 1998 03:18:21 GMT
From: jgloudon@manitoba.bbn.com (Jason Gloudon)
Subject: Re: Project question and gripe about (Re: Snobby news group)
Message-Id: <slrn6jir2l.gsr.jgloudon@manitoba.bbn.com>
Bill 'Sneex' Jones <sneaker@earthling.net> wrote:
> Not interested in the Gripe, I'll skip it; but,
>I have been banging on Netscape 5.0 Source
>and I would say that a lot of it is missing.
>
>I cannot get it to compile. I have the Unix version.
>All 85MB of it :-)
You don't have motif do you ? You need it to compile 'mozilla'.
The source released on the first day compiles out the tar ball without
modification on Solaris with CDE as it includes motif includes and libs.
--
Jason Gloudon
------------------------------
Date: Fri, 17 Apr 1998 04:05:23 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: Question?
Message-Id: <3536c82f.36722635@news.btinternet.com>
On 18 Apr 1998 14:06:41 GMT, mrjeff@blithe.ircbar.com (Jeff Workman)
wrote:
>Don't you ever have anything constructive to say? Or are you here merely to
>belittle those who aren't as 3733+ as you?
>
My Hovercraft is full of eels
>
>Abigail (abigail@fnx.com) wrote:
>: Sam P. Kaipa (skaipa@leland.stanford.edu) wrote on MDCLXXXVIII September
>: MCMXCIII in <URL: news:35342F1F.6F1093AF@leland.stanford.edu>:
>: ++ How do I do a GetLine in perl?
>
>: You use diamonds.
>
Ah yes its past the post office two hundred yards down and then left
at the lights.
/J\
Jonathan Stowe
See the MetaFaq at http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm
------------------------------
Date: 19 Apr 1998 03:05:05 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Question?
Message-Id: <6hbpl1$6ur$2@client3.news.psi.net>
Jeff Workman (mrjeff@blithe.ircbar.com) wrote on MDCXCI September
MCMXCIII in <URL: news:6hac1h$k2v$1@supernews.com>:
++ Abigail (abigail@fnx.com) wrote:
++ : Sam P. Kaipa (skaipa@leland.stanford.edu) wrote on MDCLXXXVIII September
++ : MCMXCIII in <URL: news:35342F1F.6F1093AF@leland.stanford.edu>:
++ : ++ How do I do a GetLine in perl?
++
++ : You use diamonds.
++
++ : RTFM.
++
++ Don't you ever have anything constructive to say? Or are you here merely to
++ belittle those who aren't as 3733+ as you?
I'm sure Sam got helped a lot with that answer. If you think Sam
should use something else than the diamond operator and not use
the manual, please post your suggestion.
Abigail
--
perl -wle '$, = " "; sub AUTOLOAD {($AUTOLOAD =~ /::(.*)/) [0];}
print+Just (), another (), Perl (), Hacker ();'
------------------------------
Date: 19 Apr 1998 00:06:37 GMT
From: smcdow@arlut.utexas.edu (Stuart McDow)
Subject: Re: Snobby news group
Message-Id: <6hbf6d$poj$1@ns1.arlut.utexas.edu>
gbacon@cs.uah.edu (Greg Bacon) writes:
>
> comp.lang.perl.newbie-only
I think a comp.lang.perl.help newsgroup would be a good thing. I
remember, several years ago, reading a lot of gnu.emacs.help, and it
was very, um, helpful.
So, we could have:
comp.lang.perl.help - for people needing and giving help,
comp.lang.perl.moderated - the "wizards" group, if you will, and
comp.lang.perl.misc - for perl issues and philosophy.
Just a thought.
--
Stuart McDow Applied Research Laboratories
smcdow@arlut.utexas.edu The University of Texas at Austin
"It is obvious that about 750,000 people ago, Austin was a wonderful City."
------------------------------
Date: 19 Apr 1998 00:40:46 GMT
From: wendigo@deathstar.jabberwock.org (Mark Rogaski)
Subject: Re: Snobby news group
Message-Id: <slrn6jii0i.rq0.wendigo@deathstar.jabberwock.org>
On 19 Apr 1998 00:06:37 GMT, Stuart McDow <smcdow@arlut.utexas.edu> wrote:
:
: I think a comp.lang.perl.help newsgroup would be a good thing. I
: remember, several years ago, reading a lot of gnu.emacs.help, and it
: was very, um, helpful.
:
: So, we could have:
:
: comp.lang.perl.help - for people needing and giving help,
: comp.lang.perl.moderated - the "wizards" group, if you will, and
: comp.lang.perl.misc - for perl issues and philosophy.
:
I like the idea of comp.lang.perl.help, as for .moderated ... I'd
hold off on that until traffic patterns determined if it were necessary.
Mark
--
[] Mark Rogaski "That which does not kill me
[] wendigoNO@SPAMpobox.com only makes me stranger."
[] finger wendigoNO@SPAMdeathstar.jabberwock.org for PGP key
[] remove NO & SPAM to reply or finger
[] anti spambot: postmaster@localhost abuse@localhost uce@ftc.gov
------------------------------
Date: 18 Apr 1998 21:33:02 -0400
From: Lloyd Zusman <ljz@asfast.com>
Subject: Re: Snobby news group
Message-Id: <ltemyutx2p.fsf@asfast.com>
smcdow@arlut.utexas.edu (Stuart McDow) writes:
> gbacon@cs.uah.edu (Greg Bacon) writes:
> >
> > comp.lang.perl.newbie-only
>
> I think a comp.lang.perl.help newsgroup would be a good thing. I
> remember, several years ago, reading a lot of gnu.emacs.help, and it
> was very, um, helpful.
>
> So, we could have:
>
> comp.lang.perl.help - for people needing and giving help,
> comp.lang.perl.moderated - the "wizards" group, if you will, and
> comp.lang.perl.misc - for perl issues and philosophy.
>
> Just a thought.
My preference is simply to add c.l.p.moderated. Those who don't like
the influx of people with less than ideal attitudes towards Perl,
programming, learning, life, or whatever could hang out in this
moderated group, where the others' posts would be rejected.
Others could come to c.l.p.misc, which could encompass the ".help"
function as well as what it's currently being used for.
--
Lloyd Zusman
ljz@asfast.com
------------------------------
Date: Sat, 18 Apr 1998 07:43:04 -0500
From: tadmc@flash.net (Tad McClellan)
Subject: Re: uninitialized <STDIN> chunk 1. ????
Message-Id: <o47ah6.ct7.ln@localhost>
Toby Heywood (toby@he-net.demon.co.uk) wrote:
: This is a multi-part message in MIME format.
One of those 'M's stands for Mail.
This is not mail.
This is Usenet.
Please post only plain text like everyone else does.
: If you have read any of my other messages to the comp.lang.perl.misc
: group you will already know that I'm ne to perl, and have only just
: started to learn the language. I'm using the book Learning Perl by
: Randal L. Schwartz, to teach my self to program in perl.
: anyway I'll get to the point. I have typed out one of the scripts, and
: compiled it with the -w flag on, and I get a message which says:-
: Use of uninitialized value at eercise2.6.pl line 6, <STDIN> chunk 1.
All messages issued by Perl are explained in the 'perldiag'
man page that is included with the perl distribution.
Checking there will often help when perl says something that
makes you say "huh?".
( "chunk 1" means while reading line 1 of STDIN, unless you've
messed with the $/ special variable (INPUT_RECORD_SEPARATOR in 'perlvar').
)
: No I have read through the script about a dozen times now and I can't
: find the problem.
I see from your other post that the thirteenth looksee did the trick ;-)
: The one thing that has really stumped me is that the
: error message is complaining about line 6 when
: $guess = <STDIN>; is on line 5.
: Can anyone shed some light on this?
Compilers report the line number where they _recognized_ that there
was a problem. Sometimes they don't notice that anything is wrong
until several (or many) lines beyond where the mistake really is.
If you were following directions to London, you might not realize
you made a mistake until you were in Wales. All you can say is:
"recognized that I made a mistake when in Wales"
Can't tell where the mistake was made, other than somewhere before
you got to Wales ;-)
This happens with all programming languages, it is not specific to perl.
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Sat, 18 Apr 1998 07:10:51 -0500
From: tadmc@flash.net (Tad McClellan)
Subject: Re: Wanna laugh? (My First cgi.pm Script)
Message-Id: <b85ah6.nq7.ln@localhost>
John Porter (jdporter@min.net) wrote:
: Craig Berry wrote:
: >
: > TANSTAAFL. FNORD. :)
: What do these stand for?
WYBMABIITY?
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 8 Mar 97)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V8 Issue 2361
**************************************