[9362] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 2957 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Jun 24 07:07:44 1998

Date: Wed, 24 Jun 98 04:00:36 -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, 24 Jun 1998     Volume: 8 Number: 2957

Today's topics:
    Re: a bit confused about seek <quednauf@nortel.co.uk>
    Re: accessing a:\ <fil_nospam@artware.qc.ca>
        ANNOUNCE: txt2pdf v. 1.0 anface@geocities.com
        automailer for new posters <zkessin@lhr-sys.dhl.com>
        Changing GID / EGID does *not* work! <tech@BMEi.on.ca>
    Re: Command line substitution thru subdirectories <fil_nospam@artware.qc.ca>
    Re: Comparing conditional ? with if..else construct (M.J.T. Guy)
    Re: Executing Perl on File Access. <quednauf@nortel.co.uk>
    Re: Flames.... (Abigail)
    Re: Foreach not functioning!?! (Tad McClellan)
    Re: Have we got a good free Perl manual? (Abigail)
        Losing ' round commands <barclayd@nortel.ca>
    Re: MD5 and Perl4 (Abigail)
    Re: MD5 and Perl4 <rootbeer@teleport.com>
    Re: print and the . operator ?? (M.J.T. Guy)
    Re: Q: Can I run Perl program regularly? <johan.beronius@edt.ericsson.se>
        Q: How to send page to browser in real time? slshen@usa.net
    Re: Q: How to send page to browser in real time? <rootbeer@teleport.com>
        Q:How to flush output in perl? slshen@usa.net
        Q:How to send content to browser slshen@my-dejanews.com
        Regarding xsubpp b_pillai@my-dejanews.com
    Re: system() and security again (David Goh)
    Re: system() and security again (Marc Haber)
        TCP-Portscanner (running under Perl on NT4 Machine) (G-NET Responsible)
    Re: Testing perl knowledge <zkessin@lhr-sys.dhl.com>
    Re: THE C.L.P.M. PRAYER [Was Re: Flames...] <quednauf@nortel.co.uk>
    Re: Weekdays <-> Dates (Thomas Wernitz)
        What does this error mean? (Joost Kraaijeveld)
    Re: Would someone tell me what this means? (Craig Berry)
    Re: Would someone tell me what this means? (Tad McClellan)
    Re: Would someone tell me what this means? (Tad McClellan)
        Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: Wed, 24 Jun 1998 11:42:53 +0100
From: "F.Quednau" <quednauf@nortel.co.uk>
Subject: Re: a bit confused about seek
Message-Id: <3590D82D.C429A096@nortel.co.uk>

John Porter wrote:
> 
> F.Quednau wrote:

> > open FILE, "< /u/quednauf/temp/testfile.txt" or die "didn't happen: $!";
> > for ($i =0; $i <=8; $i++) {
> >   seek FILE, $i, 0 or die "Jumped off the cliff: $!";
> >   print <FILE>;
> > }
> 
> Dude, print takes a list of arguments, so <FILE> is in a list
> context: it returns every (remaining) line in the file!

Well, yeah, I realise that! But if it does explain my problem, I can't see how
(excuse my brain...). I got a mail stating the current character of
'i-dont-know' being first \n, then on the next iteration the next number, and so
on.

M.J.T. Guy:

> Or, to be slightly pedantic, every remaining line or part line.

What is meant by part line?

-- 
____________________________________________________________
Frank Quednau               
http://www.surrey.ac.uk/~me51fq
________________________________________________


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

Date: Wed, 24 Jun 1998 02:23:37 +0000
From: Philip <fil_nospam@artware.qc.ca>
Subject: Re: accessing a:\
Message-Id: <35906329.39531258@artware.qc.ca>

Jon Drukman wrote:

> i wish perl had a way to automatically raise exceptions.  one of my
> favorite things about the DBI module is you can set RaiseError to 1
> and never have to worry about checking returns.  wrap a bunch of
> statements in a block eval and you're good to go.

Isn't that what eval {} and $@ are for?

-Philip


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

Date: Wed, 24 Jun 1998 06:20:06 GMT
From: anface@geocities.com
Subject: ANNOUNCE: txt2pdf v. 1.0
Message-Id: <6mq5qm$c4s$1@nnrp1.dejanews.com>

txt2pdf is a very flexible PERL5 program.
It's a converter from text files to PDF format files.

Why do you need txt2pdf?
Most of your documents are text files (eg HTML, C source, C++ source,
PERL source, ...)
txt2pdf is a PERL5 script, so you can use it in every operating
systems supported by PERL5 (ANFACE tested it on many Unix boxes and on
'95 box with ActiveState's build of Perl for Win32)
txt2pdf is a native converter, you don't need to pass through
PostScript format
the fee for every license is only $10
ANFACE Software is going to give you a free license for every good
idea or for every good modify

Try it! http://www.geocities.com/CapeCanaveral/Hangar/4794/txt2pdf.html
Register it!
https://commerce.mindspring.com/cgi-bin/cgiwrap/www09282/reg_it_offsite.pl?50
66

ANFACE Software
mailto:anface@geocities.com
http://www.geocities.com/CapeCanaveral/Hangar/4794/


-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/   Now offering spam-free web-based newsreading


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

Date: 24 Jun 1998 09:15:44 +0100
From: Zachary Kessin <zkessin@lhr-sys.dhl.com>
Subject: automailer for new posters
Message-Id: <m3pvfzp64v.fsf@pc-hhu-52.lhr-sys.dhl.com>


Does this group have an automailer for new posters? And if so who runs
it and can we get a copy for rec.heraldry?

Thanks

--Zach Kessin


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

Date: Tue, 23 Jun 1998 11:25:44 -0400
From: Matt Murdock <tech@BMEi.on.ca>
Subject: Changing GID / EGID does *not* work!
Message-Id: <358FC8F8.2D6D7A65@BMEi.on.ca.NOSPAM>

I have tried posting on this subject before to no avail.

I have a SUID root CGI script in which the GID and UID are changed to
the REMOTE_USER's ID.  My UID bit works by setting $< and $> to the new
uid, but changing the GID / EGID does *not* work!  I have tried
everything I can think of, but just can't figure it out!  The Camel book
seems to suggest that $) and $( should work the same as $> and $<, but
the former seem to be some sort of array.  What can I do?

For example:

print $(;
$( = 500;
print $(;

does nothing relevant; the output of the latter print statement is
exactly the same as the former.  Using 'push' is similarly ineffective:

print $(;
@new_gid = (400);
push( @new_gid, $( );
print $(;

Again, both print statements produce the same output.  I have also tried
using $) in all examples above, as well as addressing the variable as
$$), $@), @$), etc.

I would like to be able to add and remove GIDs from the list.  Any ideas
are welcome!

Matt Murdock


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

Date: Wed, 24 Jun 1998 02:37:53 +0000
From: Philip <fil_nospam@artware.qc.ca>
Subject: Re: Command line substitution thru subdirectories
Message-Id: <35906681.D1D8BBB3@artware.qc.ca>

Uwe Honekamp wrote:
> 
> Abigail <abigail@fnx.com> wrote in <6lkjq2$7vj$1@client3.news.psi.net>...
> 
> > $ find . -name '*.htm' | xargs perl -i.old -p -e "s/foo/bar/g"
> 
> On win32, however, you have to install a proper working find and xargs.
> These (and more) can be found at www.cygnus.com/win32.
> 
> Disclaimer: I'm running NT, never checked find and xargs on win95

find2perl, anyone?


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

Date: 24 Jun 1998 10:27:27 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: Comparing conditional ? with if..else construct
Message-Id: <6mqkaf$6sh$1@pegasus.csx.cam.ac.uk>

Larry Rosler <lr@hpl.hp.com> wrote:
>So any expression at all, including assignments and commas, is acceptable 
>between the ? and the : .  Instead of loony, it's sort of weird to reach 
>all the way down the precedence list here.  It's the only such case in 
>the expression grammar, and I had forgotten all about it.

That's because ?: is the only two part operator (in both Perl and C).
You can't have a ? without a subsequent :, so the ?: act as a
bracketing pair.    So you can have an arbitrary expression.


Mike Guy


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

Date: Wed, 24 Jun 1998 10:15:07 +0100
From: "F.Quednau" <quednauf@nortel.co.uk>
Subject: Re: Executing Perl on File Access.
Message-Id: <3590C39B.F1505D5B@nortel.co.uk>

Deva Seetharam wrote:

> Question is,
> is it possible to invoke Perl, every time a file is accessed ?
> It would be an event(file access) driven execution.
> 
> Deva

I have seen this happening in the Camel book, so it is possible, but as I am
still at the 'plain reading' stage, I can't remember how to do it.

-- 
____________________________________________________________
Frank Quednau               
http://www.surrey.ac.uk/~me51fq
________________________________________________


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

Date: 24 Jun 1998 05:56:10 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Flames....
Message-Id: <6mq4dq$dfb$18@client3.news.psi.net>

nobody (ac1@fspc.netsys.itg.telecom.com.au) wrote on MDCCLVIII September
MCMXCIII in <URL: news:6mq0gk$aer@newsserver.trl.OZ.AU>:
++ Are these roman dates correct?  I read the following as:
++    1754 September 1993.
++ 
++ The 1754 may be a time of day (rather than the day of month I
++ expected), but the year is wrong, I beleive (should be
++ MCMXCVIII ?).


You are wrong; both date and year are correct.



Abigail
-- 
perl -e '$a = q 94a75737420616e6f74686572205065726c204861636b65720a9 and
         ${qq$\x5F$} = q 97265646f9 and s g..g;
         qq e\x63\x68\x72\x20\x30\x78$&eggee;
         {eval if $a =~ s e..eqq qprint chr 0x$& and \x71\x20\x71\x71qeexcess}'


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

Date: Wed, 24 Jun 1998 00:23:24 -0500
From: tadmc@flash.net (Tad McClellan)
Subject: Re: Foreach not functioning!?!
Message-Id: <cg2qm6.rij.ln@localhost>

Michael S. Brito, Jr. (mike@newfangled.com) wrote:

: I have shut off (commented out) 'use
                   ^^^^^^^^^^^^^
: diagnostics' and 'use strict' to reduce errors for now 
                    ^^^^^^^^^^


   That does not reduce errors. 

   It (likely) *increases* errors.

   It just reduces error *messages*.

   If something is broken I'd rather know about it than not know...
   


   When your car engine is making a funny noise you just
   turn the radio up louder, right?

   ;-)



: (I'll fix 'em
: later,  


   I think it will take *much* longer to fix them later than to fix
   them sooner.


: what can I say I'm lazy).


   Lazy folks want to avoid unnecessary work.

   I'd rather have perl tell me about my mistakes than have to
   figure out where they are myself...


--
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


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

Date: 24 Jun 1998 06:00:37 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Have we got a good free Perl manual?
Message-Id: <6mq4m5$dfb$19@client3.news.psi.net>

Chris Nandor (pudge@pobox.com) wrote on MDCCLVIII September MCMXCIII in
<URL: news:pudge-2306982259440001@dynamic448.ply.adelphia.net>:
++ In article <359066E6.9E586589@erols.com>, "Matthew O. Persico"
++ <mpersico@erols.com> wrote:
++ 
++ # Then what is the solution? Don't use Perl? No. Write a good free manual?
++ # Yes.
++ 
++ Huh?  THERE IS A GOOD FREE PERL MANUAL.  Even by the FSF definitions of
++ "free" and, I assume, of "manual".  It is probably better than every other
++ manual, free or proprietary, for any other software package of this size.
++ 
++ What may not considered free in the FSF sense is a couple of tutorials in
++ the Perl man pages and the perl FAQ.  But these do not constitute the bulk
++ of the Perl manual, if indeed they are a part of the manual at all.  I
++ call them tutorials and FAQs, not manuals.


Give it up Pudge. Hasn't it been clear to you those GNU/FSF people
can't read?



Abigail
-- 
perl -wle '(1 x $_) !~ /^(11+)\1+$/ && print while ++ $_'


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

Date: Wed, 24 Jun 1998 11:29:28 +0100
From: Deborah Barclay <barclayd@nortel.ca>
Subject: Losing ' round commands
Message-Id: <3590D508.1C9CD15F@nortel.ca>

Hi

I have installed a perl wrapper scipt round some tools. For eg sed. When
we run sed it runs the wrapper which
will execute the sed command from this line in the script:
system "$path @ARGV";

The path has been set up in the script and the argv comes from the input
after the sed
for eg
sed '/^$/d' filename     - where@argv is '/^$/d' filename

This command should delete all blank lines in the file and print the
rest.
What is happening though is that the argv deletes the ' and runs
sed /^$/d filename
which results in errors.

Does anyone know a way round this.

Thanks,
Deborah




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

Date: 24 Jun 1998 06:34:27 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: MD5 and Perl4
Message-Id: <6mq6lj$ds6$1@client3.news.psi.net>

Tom Phoenix (rootbeer@teleport.com) wrote on MDCCLVII September MCMXCIII
in <URL: news:Pine.GSO.3.96.980623085735.24075X-100000@user2.teleport.com>:
++ On 23 Jun 1998, Pel Lxberg wrote:
++ 
++ > So what I'm really looking for is MD5 implemented in pure Perl code.
++ 
++ This could be done. I doubt that it has, though, because that would be on
++ the order of 100,000% slower than the implementation in the module. That's
++ just a rough estimate; you're welcome to try to prove me wrong. But if you
++ can calculate the MD5 checksum of your MD5 code with ordinary Perl4 in
++ less than, oh, about a second, I'll have to ask how you can justify using
++ a Cray when you've obviously got way too much spare time.  :-) 


That surprises me. I thought that MD5 was designed to be easily
calculated. If Perl is 1000 slower than C, I'm deeply disappointed
in Perl.



Abigail
-- 
perl -wle '$, = " "; sub AUTOLOAD {($AUTOLOAD =~ /::(.*)/) [0];}
           print+Just (), another (), Perl (), Hacker ();'


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

Date: Wed, 24 Jun 1998 07:23:24 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: MD5 and Perl4
Message-Id: <Pine.GSO.3.96.980624001618.16155H-100000@user2.teleport.com>

On 24 Jun 1998, Abigail wrote:

> Tom Phoenix (rootbeer@teleport.com) wrote on MDCCLVII September MCMXCIII
> in <URL: news:Pine.GSO.3.96.980623085735.24075X-100000@user2.teleport.com=
>:
> ++ On 23 Jun 1998, P=E5l L=F8berg wrote:
> ++=20
> ++ > So what I'm really looking for is MD5 implemented in pure Perl code.
> ++=20
> ++ This could be done. I doubt that it has, though, because that would be=
 on
> ++ the order of 100,000% slower than the implementation in the module. Th=
at's
> ++ just a rough estimate; you're welcome to try to prove me wrong. But if=
 you
> ++ can calculate the MD5 checksum of your MD5 code with ordinary Perl4 in
> ++ less than, oh, about a second, I'll have to ask how you can justify us=
ing
> ++ a Cray when you've obviously got way too much spare time.  :-)=20
>=20
>=20
> That surprises me. I thought that MD5 was designed to be easily
> calculated. If Perl is 1000 slower than C, I'm deeply disappointed
> in Perl.

This sort of thing - intensive bit twiddling - is not Perl's strength.=20

You may as well be disappointed in a thoroughbred for being a poor
juggler. :-)

Cheers!

--=20
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: 24 Jun 1998 10:20:27 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: print and the . operator ??
Message-Id: <6mqjtb$6hs$1@pegasus.csx.cam.ac.uk>

Eschult <eschult.NOSPAM@squonk.net> wrote:
>$line includes the line termination character, which you are appending to
>$grades{student}.  The print is printing it, yielding the extra blanks in
>your output.
>
>Try adding 'chop $line;' as your first line after the 'while ($line......)
>{' line.

Use "chomp" in preference to "chop".

And please *don't* post articles seven times.    And don't quote the
entire original message when only a few lines are relevant.


Mike Guy


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

Date: Wed, 24 Jun 1998 10:09:16 +0200
From: Johan Beronius <johan.beronius@edt.ericsson.se>
Subject: Re: Q: Can I run Perl program regularly?
Message-Id: <3590B42C.5BBE6621@edt.ericsson.se>

>  How can I make a program that can run my Perl program regularly (daily)?

On Windows NT this is the 'AT' command. You have to start the 'Schedule' service first.
( it's on the controll panel, services)



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

Date: Wed, 24 Jun 1998 07:43:46 GMT
From: slshen@usa.net
Subject: Q: How to send page to browser in real time?
Message-Id: <6mqani$jdt$1@nnrp1.dejanews.com>

Hi
How to send the part of page to browser for user's viewing other than one page
is sent to browser when whole page is completed.

David

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/   Now offering spam-free web-based newsreading


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

Date: Wed, 24 Jun 1998 08:30:02 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: Q: How to send page to browser in real time?
Message-Id: <Pine.GSO.3.96.980624012900.16155I-100000@user2.teleport.com>

On Wed, 24 Jun 1998 slshen@usa.net wrote:

> How to send the part of page to browser for user's viewing other than
> one page is sent to browser when whole page is completed. 

This sounds like a CGI programming question. The docs, FAQs, and
newsgroups about CGI programming may have what you need. Good luck!

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: Wed, 24 Jun 1998 09:59:50 GMT
From: slshen@usa.net
Subject: Q:How to flush output in perl?
Message-Id: <6mqiml$sh8$1@nnrp1.dejanews.com>

Hi,
Why is the string "mdscopy Please Wait..." not displayed on browser when
mdscopy command has not been completed?

David



use FileHandle;

STDOUT->autoflush(1);
print ("<html>");
print ("<title>test</title>");
print ("<body>");
print ("mdscopy Please Wait..."," \n");
print ("mdscopy ".$path{'source_path'}." ".$path{'dest_path'}," \n");
open (MDSCOPY,"|mdscopy");
close (MDSCOPY);
print ("<br>");
print ("Please Wait..."," \n");
----do something long time -----
 ....
print ("<br>");
print("</body>");
print("</html>");


-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/   Now offering spam-free web-based newsreading


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

Date: Wed, 24 Jun 1998 09:06:47 GMT
From: slshen@my-dejanews.com
Subject: Q:How to send content to browser
Message-Id: <6mqfj7$p3c$1@nnrp1.dejanews.com>

Hi,
How to send content to browser when the whole page has not been genetated
completely in perl?

David

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/   Now offering spam-free web-based newsreading


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

Date: Wed, 24 Jun 1998 07:24:03 GMT
From: b_pillai@my-dejanews.com
Subject: Regarding xsubpp
Message-Id: <6mq9ij$h7a$1@nnrp1.dejanews.com>

Hi,

Where can I find the xsubpp - compiler to convert Perl XS code
into C code for WIN32?

Thanks,
Bilio

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/   Now offering spam-free web-based newsreading


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

Date: 24 Jun 1998 05:27:46 GMT
From: david+usenet@unico.com.au (David Goh)
Subject: Re: system() and security again
Message-Id: <6mq2oi$t2k@padre.unico.com.au>

In comp.lang.perl.misc, on 24 Jun 1998 03:56:46 GMT
Abigail <abigail@fnx.com> wrote:
>Marc Haber (Marc.Haber-usenet@gmx.de) wrote on MDCCLVII September
>MCMXCIII in <URL: news:6mo3o1$d0p$2@nz12.rz.uni-karlsruhe.de>:
>++ Russ Allbery <rra@stanford.edu> wrote:
>++ >Marc Haber <Marc.Haber-usenet@gmx.de> writes:
>++ >> The docs say that system() uses a subshell if shell metacharacters are
>++ >> contained in the command. I know ";", ">", "<", "|" and "`" as shell
>++ >> metacharacters. Are there more?
>++ >Yes.  "(", ")", "*", "[", "]", "^", and possibly others, depending on your
>++ >shell.

>++ Are there others for a standard bash? If that differs from shell to
>++ shell, parsing for metacharacters may be a major nuisance and using a
>++ different shell will break that code :-(

>You forgot newline. And ?. And $. And { and }. And &. And #. And
>in certain cases, =, : and -. Which of course differs from shell to
>shell. And let's not forget the quotes. Or the backwack.

And ! ... don't forget bang.  And \, and tab and and and... Well yeah.
Way too many. :)  If you're thinking about security of system() calls,
you're probably best off forcing it into using a list, as other people
have said.  Either that, or providing a *very* limited list of legal
characters (alphanumerics, underscores, maybe slashes and a few others).

-- 
| david@unico.com.au (David Goh, Unico Computer Systems, +61-3-9866-5688)
Man usually avoids attributing cleverness to somebody else -- unless it
is an enemy.
                -- Albert Einstein


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

Date: Wed, 24 Jun 1998 09:10:56 GMT
From: Marc.Haber-usenet@gmx.de (Marc Haber)
Subject: Re: system() and security again
Message-Id: <6mqfrt$nsr$2@nz12.rz.uni-karlsruhe.de>

Russ Allbery <rra@stanford.edu> wrote:
>So you want to *always* pass system a list unless you're executing a
>simple command with no arguments.

And I have to be sure that this command does not contain
metacharacters :-). Is it possible to pass a list with a single string
element?

Greetings
Marc

-- 
-------------------------------------- !! No courtesy copies, please !! -----
Marc Haber          |   " Questions are the         | Mailadresse im Header
Karlsruhe, Germany  |     Beginning of Wisdom "     | Fon: *49 721 966 32 15
Nordisch by Nature  | Lt. Worf, TNG "Rightful Heir" | Fax: *49 721 966 31 29


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

Date: 24 Jun 98 08:58:38 GMT
From: "Jan Van Ham (G-NET Responsible)" <Support@g-net.be>
Subject: TCP-Portscanner (running under Perl on NT4 Machine)
Message-Id: <01bd9f4e$46cd7f60$963cc5c2@g-net-admin>

Hello,

I'm having a question here : has anyone a *WORKING* Portscanner-script that
compiles onder Perl for Win32 'build 315) ??

This is my situation : 

The script must run on a machine .. when someone connects to that machine
trough a certain port (eg 80) the script should execute a file (*.BAT or
*.EXE or something)

The bottom-goal is when someone initiates a FINGER to my machine ... a
batch-file should start...



Any ideas or examples ??????



Kind greetings from Belgium



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

Date: 24 Jun 1998 09:02:57 +0100
From: Zachary Kessin <zkessin@lhr-sys.dhl.com>
Subject: Re: Testing perl knowledge
Message-Id: <m3sokvp6q6.fsf@pc-hhu-52.lhr-sys.dhl.com>


Perry Statham <pstatham@dev.tivoli.com> writes:

> My boss just informed me that as the resident perl "expert" he would
> like me to interview some job candidates for their perl knowledge. Does
> anyone out there have any tests or lists of questions they have come up
> with in the past to interview for this?
> 
> Please CC: your answers to me at pstatham@dev.tivoli.com.
> Thanks - Perry Statham

I would ask them to explain "eval" if they get both uses of it they
probably are on the ball, also ask them if they own the Camel Book, if
they dont know what it is that is a bad sign. Also ask them about what
types of projects they have done in Perl.

The other thing is that since Perl has so many features if they dont
know one dont count it agenst them, I have been doing Perl for 4 years
now and would have to lookup "pack" and "unpack" if I acutaly had to use it.


--Zach Kessin


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

Date: Wed, 24 Jun 1998 11:41:17 +0100
From: "F.Quednau" <quednauf@nortel.co.uk>
Subject: Re: THE C.L.P.M. PRAYER [Was Re: Flames...]
Message-Id: <3590D7CD.BB59DC38@nortel.co.uk>

birgitt@my-dejanews.com wrote:

> THE C.L.P.M PRAYER
> 
> Before I post
>       Do more than look, search
>       Do more than read, absorb
>       Do more than think, ponder
>       Do more than hear, listen
>       Do more than listen, understand
>       Do more than talk, say something
>       Do more than ask, answer
> 
> Before you post
>       Take time to work,
>       Take time to think,
>       Take time to be friendly,
>       Take time to share,
>       Take time to laugh,
> 
> When we post
>       We do all the good we can,
>       By all the means we can,
>       In all the ways we can,
>       In all the posts we can,
>       At all the times we can,
>       To all the people we can,
>       As long as ever we can.
> 
> When we have posted and done our best
>       We should wait the result in peace.
> 
> Birgitt Funk
> 
Very poetic ! Nice ! Very idealistic, but hey, better than grumpy ol' realists!
But that is the thing about prayers. They reflect the ideal state and we will 
forever struggle 
  to reach that point
  where ideal becomes real
  when we are joined
together, I gather
that this is quite possible
And I truly believe
that that state is accessible.

-- 
____________________________________________________________
Frank Quednau               
http://www.surrey.ac.uk/~me51fq
________________________________________________


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

Date: Tue, 23 Jun 98 20:36:49 GMT
From: NOSPAM.thomas_wernitz@tait.co.nz (Thomas Wernitz)
Subject: Re: Weekdays <-> Dates
Message-Id: <6mp7b7$55m$1@wolfman.xtra.co.nz>

In article <7xaf749y03.fsf@beavis.vcpc.univie.ac.at>, Tony Curtis <Tony.Curtis+usenet@vcpc.univie.ac.at> wrote:
>Hauk> Hi there. I'm about to make a program which needs to
>Hauk> know which day of the week it is. I have a good idea
>Hauk> about how to do it, but it feels like an unescesary
>Hauk> amount of work. If anyone know somewhere I can find a

I don not have a code snippet but I can give you the idea! ;)
Weekdays never jump, they are always regular, week after week after ...
So just take any Monday 00:00am and get the corresponding 'time()' value, that 
is in seconds. Substract this from now. Divide by 86400, you got the days. 
Modulo by 7, voila you got the weekday, 0=monday, 6=Sunday.

HTH,
Thomas

"most people would die sooner than think -- in fact, they do so."
                                                         -- Bertrand Russell


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

Date: Wed, 24 Jun 1998 10:32:52 GMT
From: JKraaijeveld@askesis.nl (Joost Kraaijeveld)
Subject: What does this error mean?
Message-Id: <3590d4a5.449015@news.telebyte.nl>

I have a simple script that return this error if run on a UNIX
commandline:

Can't find string terminator "EOF" anywhere before EOF at file.pl line
12.

The per version used is:

This is perl, version 5.003 with EMBED
        built under linux at Oct 18 1996 10:17:50
        + suidperl security patch



On Windows NT all is fine 

The script is:

#!/usr/local/bin/perl
#
print "Content-type: text/html\n\n" ;

# Print the HTML response page to STDOUT
print <<EOF ;
<html>
<head><title>CGI Results</title></head>
<body>
<h1>File will be returned.</h1>
</body>
</html>
EOF

exit ;


TIA

Joost


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

Date: 24 Jun 1998 05:54:28 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: Would someone tell me what this means?
Message-Id: <6mq4ak$du4$1@marina.cinenet.net>

Martien Verbruggen (mgjv@comdyn.com.au) wrote:
: In article <01bd9eef$d228bf20$1cb0c9d0@chiefs>,
: 	"Chris Edwards" <chiefs@fulton-net.com> writes:
: > I would like to know what these few short lines mean.
: 
: pretty bad stuff.

Amen to that.

: > if ($FORM{'name'}) {
: If $FORM{'name'} evaluates to a true value

And note that the quotes on 'name' are superfluous.

: >       $name = "$FORM{'name'}";
: $name will contain the value of $FORM{'name'}

Both " and ' quotes are superfluous.

: >       $name =~ s/"//g;
: >       $name =~ s/<//g;
: >       $name =~ s/>//g;
: >       $name =~ s/\&//g;
: 
: replace any occurrence in $name of ", <, >, and & with nothing.

 ...which is a lot easier to write as

  $name =~ tr/"<>&//d;

---------------------------------------------------------------------
   |   Craig Berry - cberry@cinenet.net
 --*--    Home Page: http://www.cinenet.net/users/cberry/home.html
   |      Member of The HTML Writers Guild: http://www.hwg.org/   
       "Every man and every woman is a star."


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

Date: Wed, 24 Jun 1998 01:00:05 -0500
From: tadmc@flash.net (Tad McClellan)
Subject: Re: Would someone tell me what this means?
Message-Id: <5l4qm6.3mj.ln@localhost>

Chris Edwards (chiefs@fulton-net.com) wrote:
: I would like to know what these few short lines mean.

: if ($FORM{'name'}) {
:       $name = "$FORM{'name'}";
                ^      ^    ^ ^                
                ^      ^    ^ ^  _none_ of those quotes are needed...
[point 1]

   And why copy it from one scalar variable to another scalar variable?

   You can do to $FORM{name} anything that you can do to $name.

[point 2]

:       $name =~ s/"//g;
:       $name =~ s/<//g;
:       $name =~ s/>//g;
:       $name =~ s/\&//g;
                   ^
                   ^ no escaping needed
[point 3]

:    }
:    else {
:       &error(no_name);
               ^^^^^^^

   Does it really have that bareword there, or was that just a
   typo in your post?



   This code means that the programmer that wrote them is not
   very good at Perl programming yet (see the [point]s ).

   Or, maybe it *was* a good programmer, but he/she only does
   simple processing on very powerful computers, and is 
   therefore unconcerned with maintenance and running time.



   It is fairly easy to see what the code *is* doing.

   What's not so clear is what the code is *intended* to do.



   error() will be called if:

      1) $FORM{'name'} is undefined.
         (I guess this would mean that your <form> designer messed up)

   or

      2) $FORM{'name'} eq '';  # the value is the empty string
         (this is probably the condition that the poor programmer
          had in mind)

   or

      3) $FORM{'name'} eq '0'
         (it is an error if someone's name is zero???)

[point 4]

   ----------

   s/// is a *whole bunch* slower than tr///

[point 5]

   ----------

   I think this code is better (for some values of "better"):


   error('silly form designer') unless defined $FORM{name};

   error('no name entered') if $FORM{name} eq '';

   $FORM{name} =~ tr/"<>&//d; # delete angle brackets, 
                              # double quotes, and ampersands

   ----------


   I sure hope that was free code that you found laying around somewhere.

   If you paid for it, you got taken...


--
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


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

Date: Wed, 24 Jun 1998 00:28:04 -0500
From: tadmc@flash.net (Tad McClellan)
Subject: Re: Would someone tell me what this means?
Message-Id: <4p2qm6.rij.ln@localhost>

Joe Kline (Joe.Kline@sdrc.com) wrote:

: Sender sent a reply as well.


   Sender sent a reply to whom?

   (and how did you know that he did it?  ;-)


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

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