[12469] in Perl-Users-Digest
Perl-Users Digest, Issue: 6070 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Jun 20 20:17:53 1999
Date: Sun, 20 Jun 99 17:01:27 -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 Sun, 20 Jun 1999 Volume: 8 Number: 6070
Today's topics:
Re: Perl 2 C translator available? <gellyfish@gellyfish.com>
Re: Perl 2 C translator available? (Abigail)
Re: Perl Script Help <webmaster@chatbase.com>
Re: Perl Script Help (Abigail)
Re: Pursuing Unix: how valuable would Perl be? (72 Cha <tchrist@mox.perl.com>
Re: sprintf and money <james@britlinks.co.uk>
Re: time question (Abigail)
Re: virtualave.net <webmaster@chatbase.com>
why wont this work? <tfiedler@ptd.net>
Re: why wont this work? (Marcel Grunauer)
Re: why wont this work? (Michel Dalle)
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 20 Jun 1999 22:07:25 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Perl 2 C translator available?
Message-Id: <7kjomt$6en$1@gellyfish.btinternet.com>
On Sun, 20 Jun 1999 15:12:07 +0200 Armin S. A. Roehrl wrote:
> Dear Perl experts,
>
> suppose you got some Perl code -- too much to code it by hand into
> C, but would like to have a speed - up
In what way do you believe this will speed your program up - of course
I dont believe you read the FAQ before you posted this .
--
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: 20 Jun 1999 12:40:09 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Perl 2 C translator available?
Message-Id: <slrn7mq9rj.k1b.abigail@alexandra.delanet.com>
Armin S. A. Roehrl (Armin.Roehrl@epfl.ch) wrote on MMCXIX September
MCMXCIII in <URL:news:376CE8A7.4D30393D@epfl.ch>:
&& Dear Perl experts,
&&
&& suppose you got some Perl code -- too much to code it by hand into
&& C, but would like to have a speed - up , o.k. if it's much less than
&& hand-coded
&& C code.
What a wierd way to end sentences.
&& I did a quick scan on the web, but didn't find any pointers. Is there
If you have Perl questions, scanning the web isn't the first thing
you should. Scan the more than 1000 pages of documentation that comes
with Perl. Your question is answered in the FAQ.
&& Do you have any book/links/online articles suggestions concerning Perl
&& speed/performing
&& issues.
What a wierd way to end sentences.
Of course, the FAQ discusses these issues as well.
Abigail
--
srand 123456;$-=rand$_--=>@[[$-,$_]=@[[$_,$-]for(reverse+1..(@[=split
//=>"IGrACVGQ\x02GJCWVhP\x02PL\x02jNMP"));print+(map{$_^q^"^}@[),"\n"
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: Sun, 20 Jun 1999 15:39:43 -0700
From: TRG Software : Tim Greer <webmaster@chatbase.com>
Subject: Re: Perl Script Help
Message-Id: <376D6DAF.5392918@chatbase.com>
Corgi-lover wrote:
>
> I'm using a Perl Script on a new webpage I've created.
> I need to make minor changes (text, webpage URL) to the script.
> I used a Perl editor
A "Perl editor"?...
> but whatever small change I implement I get an error
> message from my server.
What is this "Perl editor" you're using? Are you uploading this script?
Are you uploading it in ASCII mode? Does the updated script give you
errors when you run it from the command line? Are you able to run it
from the command line? What error are you getting? What does this error
message say? What does the error logs say? Do you have access to the
error logs?
> As soon as I reinstall the original script everythign works fine again.
> What am I doing wrong???
I don't know, I can't give you any help with the limited information
you've supplied.
> Please email directly if you can help
I'll post the answer here, because you asked here. That's reasonable,
isn't it? Or do you really not want an answer? Maybe if someone does
email you help (which isn't likely by your post that they can help you
much), then you tell them via email, then they reply via email and
someone else with this same question has to ask again and waste
everyone's time - including theirs, because no one posted an answer they
can see and they only see someone asked the same question. Kind of makes
it difficult for someone to search for help before posting here if all
they see are posts with questions. It goes both ways, and it saves
everyone time if you return here, assuming you do.
> Thanks
<SNIP>
--
Regards,
Tim Greer: chatmaster@chatbase.com / software@linkworm.com
Chat Base: http://www.chatbase.com | 250,000+ hits daily Worldwide!
TRG Software: http://www.linkworm.com | CGI scripting in Perl/C, & more.
Unix/NT/Novell Administration, Security, Web Design, ASP, SQL, & more.
Freelance Programming & Consulting, Musician, Martial Arts, Sciences.
------------------------------
Date: 20 Jun 1999 12:08:58 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Perl Script Help
Message-Id: <slrn7mq815.k1b.abigail@alexandra.delanet.com>
Corgi-lover (checker@usa.com) wrote on MMCXVI September MCMXCIII in
<URL:news:7kbp5t$4pi$1@ash.prod.itd.earthlink.net>:
"" I'm using a Perl Script on a new webpage I've created.
"" I need to make minor changes (text, webpage URL) to the script.
"" I used a Perl editor but whatever small change I implement I get an error
"" message from my server.
"" As soon as I reinstall the original script everythign works fine again.
"" What am I doing wrong???
Obviously, whatever change you made was wrong.
Abigail
--
sub _'_{$_'_=~s/$a/$_/}map{$$_=$Z++}Y,a..z,A..X;*{($_::_=sprintf+q=%X==>"$A$Y".
"$b$r$T$u")=~s~0~O~g;map+_::_,U=>T=>L=>$Z;$_::_}=*_;sub _{print+/.*::(.*)/s}
*_'_=*{chr($b*$e)};*__=*{chr(1<<$e)};
_::_(r(e(k(c(a(H(__(l(r(e(P(__(r(e(h(t(o(n(a(__(t(us(J())))))))))))))))))))))))
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: 20 Jun 1999 17:40:11 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Pursuing Unix: how valuable would Perl be? (72 Character LL)
Message-Id: <376d7bdb@cs.colorado.edu>
[NOTA BENE: a courtesy cc of this public news posting was
also mailed directly to the cited author for expedience.]
In comp.lang.perl.misc, quickt@execpc.com (Tony T.) writes:
:<note: after angry letter from the Perl AutoFAQ program : " Your
:message with lines that were too long" I changed the line length to 72
:per the request).
I wasn't supposed to be an *angry* letter, just a helpful one. :-)
But given how hard you've tried, I figure the least I can do
is answer your message.
:I am interested in opinions on persuing Unix as a career to supplement
:my networking skills.
Assuming you mean computer not human networking, the answer is yes.
If that assumption is incorrect, than so too might be the answer. :-)
:I have been working with Netware 3.x / 4.x for a
:few years now, and DOS/WIN workstations for about 7 years. I have always
:had an interest in Unix, being the command line freak that I am, and I
:have setup Linux a few times at home.
:I am thinking of actively persuing Perl, as it has been recommended as a
:good beginner language to learn.
Reasonable and informed professionals can disagree about that last
point. I imagine nearly everyone here can come up with a rich
list of pros and cons both ways. Personally, I'm tentatively in
the pro group, given the right student and the right instructor or
learning method. You sound like such.
:So what is my question? I guess I am interested in real life examples of
:what could be gained by being proficient in Perl,
Your choice:
1) Wine, women, and song.
2) Life, liberty, and the pursuit of happiness.
3) Truth, justice, and the Unix way.
4) Choose one each from each of the above three.
:and the more one is
:willing to divulge the more grateful I would be
>(i.e. what's a typical
:day in the life?
I daresay that because of the virtually infinite diversity in the sorts
of jobs we all collectively hold, that this question is at best extremely
difficult to provide specific answers for. Some of us are professional
systems managers, network managers, postmasters and newsmasters, computer
security specialists, database adminstrators, or webmasters. Others are
professional programmers, perhaps involved in the development of software
tools, automated test suites, release management, or customer support.
Arguably the largest group comprises the accidental programmers, those
folks with other primary jobs in science, research, industry, commerce,
or other some other service-related sector. Doubtless there are countless
other important jobs I've forgotten. A few of us, including yours truly,
are recreational programmers and computer hobbyists.
Most folks spend the minority of their time programming in Perl.
That's because most folks spend but the smaller portion of their
time doing any programming whatsoever. :-) But others have
programming duties involving some other programming languages.
The original crossovers were mostly from C programming, but this is
by no means universal.
:Dare I ask about salaries??)
You can ask, but there's no answer. I know of $0.00 per annum junior
high school students who use Perl in school projects but only earn money
mowing lawns. I know of highly placed executives whose annual incomes
extend well in the six-figure range who program Perl. It's hard to
say more than that. But Unix programmers have always enjoyed salaries
significantly higher than those in DOS positions.
Here is some salary survey data for you to peruse:
http://www.sunworld.com/swol-10-1998/swol-10-sans.html
http://www.wholeroot.com/jobtitle.html
http://www.wholeroot.com/avgslry.html
http://www.wholeroot.com/1997JobTitleInfo/UNIX_Shell_AD.html
http://www.thecursor.com/igdnSalarySurvey.htm
I found these by going to Alta Vista at
http://www.altavista.com/cgi-bin/query?pg=q&text=yes
(that's my preferred interface)
and asking for:
+salary
survey
programming
perl
sysadmin
"systems adminstrator"
Unix
You can play with adding + and - as you'd like. For example,
adding + to perl for +perl pulls in a different ordering of
results.
:FWIW, I do have basic
:programming skills, I used a variant of BASIC for a CAD program, so I
:understand the concepts, enough to realize that most languages do
:similar things with different syntax.
Very good. Dennis Ritchie once remarked that people didn't realize that
C and Pascal were really the same language, and that there were a lot
of other languages out there.
--tom
--
Imagination is more important than knowledge
--Albert Einstein
------------------------------
Date: Sun, 20 Jun 1999 23:02:28 +0100
From: James Stewart <james@britlinks.co.uk>
Subject: Re: sprintf and money
Message-Id: <ant202228063Lh==@ch0128.charis.co.uk>
In article <Pine.GSO.4.02A.9906180903450.5420-100000@user2.teleport.com>,
Tom Phoenix <URL:mailto:rootbeer@redcat.com> wrote:
> On Fri, 18 Jun 1999, James Stewart wrote:
>
> > Subject: sprintf and money
>
> > Can anyone point me to a place where I can find out how to zero pad
> > numerical values so they always have two zeros after the decimal
> > point?
>
> In what way was the entry for 'sprintf' in the docs insufficient for your
> needs?
I understood the theory of what sprintf is used for and how to go about
applying it, but constructing the actual terms wasn't clear. To start
with, I wondered if I could use something like \d*.\d\d but realised
pretty much straight away that this wouldn't work. I looked at one
example I had, but it was for a very different operation and I couldn't
quite decipher it and then reapply that.
I was working from the manpage and the llama book. I do plan to get the
camel book soon but had hoped that till I do I would be able to get by
with the perl documentation. If I should be looking somewhere else, I'm
happy to read whatever's necessary.
James.
--
James Stewart - james@britlinks.co.uk | "Telecom ignored us and
The Britlinks - http://www.britlinks.co.uk | democracy has died."
Phantom Tollbooth - http://www.tollbooth.org | -- Fat And Frantic
Sixpence None The Richer in the UK - http://www.britlinks.co.uk/sixpence/
------------------------------
Date: 20 Jun 1999 12:42:54 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: time question
Message-Id: <slrn7mqa0q.k1b.abigail@alexandra.delanet.com>
Jimtaylor5 (jimtaylor5@aol.com) wrote on MMCXIX September MCMXCIII in
<URL:news:19990620053825.01034.00001207@ng-fb1.aol.com>:
[] I hope this is not really a dumb question, but I've been trying to figure out
[] how to get seconds from localtime (or anywhere) to calculate how long a task
[] takes. How would I get the time in seconds from Perl, in order to say this task
[] to 11 seconds or whatever it took. I know how to calculate it, jut not how to
[] get the time in seconds. Can anyone help?
Did you bother to grep on 'time' in the documentation that comes with Perl?
No? Maybe you should.
Abigail
--
perl -we 'print split /(?=(.*))/s => "Just another Perl Hacker\n";'
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: Sun, 20 Jun 1999 15:22:05 -0700
From: TRG Software : Tim Greer <webmaster@chatbase.com>
Subject: Re: virtualave.net
Message-Id: <376D698D.E9C1DEC4@chatbase.com>
Leonid Goltser wrote:
>
> Somebody suggested me to upload my scripts on virtualave.net. I did but my
> scripts do not work (although, they work perfectly on my machine). Browser
> can't open them. If somebody use virtualave.net, can you help me? Probably
> something wrong with configuration or something else. If you run your
> scripts on that server, please, give me a piece of your code what works
> there. I'll use it as an example.
Isn't it logical to actually go to virtualave.net's web site and take a
look at *their* site's help and support pages? This isn't a perl
question, you realize that much, don't you? With that said, please don't
post such off-topic questions here.
--
Regards,
Tim Greer: chatmaster@chatbase.com / software@linkworm.com
Chat Base: http://www.chatbase.com | 250,000+ hits daily Worldwide!
TRG Software: http://www.linkworm.com | CGI scripting in Perl/C, & more.
Unix/NT/Novell Administration, Security, Web Design, ASP, SQL, & more.
Freelance Programming & Consulting, Musician, Martial Arts, Sciences.
------------------------------
Date: Sun, 20 Jun 1999 22:00:32 GMT
From: "ted fiedler" <tfiedler@ptd.net>
Subject: why wont this work?
Message-Id: <4wdb3.2647$I72.345843@nnrp1.ptd.net>
why isnt this working the file is in the same dir as the program...?
#!/usr/bin/perl -w
use strict;
open(TESTFILE, "> test3_med.dat") || die"Cannot open test3_med.dat: $!\n";
while(<TESTFILE>) {
print"File opened successfully"; }
close(TESTFILE);
------------------------------
Date: Sun, 20 Jun 1999 22:45:01 GMT
From: marcel.grunauer@lovely.net (Marcel Grunauer)
Subject: Re: why wont this work?
Message-Id: <37736e83.47136648@enews.newsguy.com>
On Sun, 20 Jun 1999 22:00:32 GMT it came to pass that "ted fiedler"
<tfiedler@ptd.net> used an obscure tool Microsoft Outlook Express
4.72.3110.5 and produced 12 lines that required the following
response:
>why isnt this working the file is in the same dir as the program...?
>
>
>#!/usr/bin/perl -w
>use strict;
>open(TESTFILE, "> test3_med.dat") || die"Cannot open test3_med.dat: $!\n";
Good, all the right things: -w, use strict and checking return values
of system calls.
But... you're opening the file for writing. Omit the "> " and try
again.
>while(<TESTFILE>) {
> print"File opened successfully"; }
Do you really want to print this for every line in the file?
>close(TESTFILE);
Marcel
------------------------------
Date: Sun, 20 Jun 1999 23:28:53 GMT
From: michel.dalle@usa.net (Michel Dalle)
Subject: Re: why wont this work?
Message-Id: <7kjte0$pqr$1@xenon.inbe.net>
In article <4wdb3.2647$I72.345843@nnrp1.ptd.net>, "ted fiedler" <tfiedler@ptd.net> wrote:
>why isnt this working the file is in the same dir as the program...?
>
>
>#!/usr/bin/perl -w
>use strict;
>open(TESTFILE, "> test3_med.dat") || die"Cannot open test3_med.dat: $!\n";
Probably because you're going in the wrong direction : > instead of <
You want an input file or an output file (or both maybe) ?
Michel.
------------------------------
Date: 12 Dec 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 Dec 98)
Message-Id: <null>
Administrivia:
Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing.
]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body. Majordomo will then send you instructions on how to confirm your
]subscription. This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.
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 6070
**************************************