[10171] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3764 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Sep 20 11:07:10 1998

Date: Sun, 20 Sep 98 08:00:21 -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 Sep 1998     Volume: 8 Number: 3764

Today's topics:
    Re: Can GD.pm make 200 *ppi* gifs? (N.A.F. McNelly)
    Re: Can GD.pm make 200 *ppi* gifs? (Anthony Boyd)
        Danish letters F X E tcd@post10.tele.dk
    Re: Determine NT Logon Server? (Willie Wanker)
        EOF command for Mac? (for Perl) <mpn@dorsey.org>
    Re: EOF command for Mac? (for Perl) (brian d foy)
    Re: even/odd numbers <tobez@plab.ku.dk>
    Re: Finding the FAQ (was: Re: No switch statement in Pe <Russell_Schulz@locutus.ofB.ORG>
    Re: Help Configuring IIS 4.0 <bgresset@online.no>
        help! cim@online.ee
        newbie perlwin32 TK problem <I.wont@tell.you.com>
    Re: passing argument !!!! (Tad McClellan)
        Pay to setup database access file <arm@home.net>
    Re: Perl & Java - differences and uses (Abigail)
    Re: Perl & Java - differences and uses (David Formosa)
    Re: Perl & Java - differences and uses <pats@acm.org>
        Question: Piping into STDIN using ActiveState Perl on W <gordon@jugular.demon.co.uk>
    Re: Question: Piping into STDIN using ActiveState Perl  <gellyfish@gellyfish.btinternet.com>
        Sites devoted to Perl Win32 <kosenko@netwood.net>
    Re: where is Date::Parse? (Leslie Mikesell)
    Re: where is Date::Parse? <rra@stanford.edu>
    Re: where is Date::Parse? (Honza Pazdziora)
        Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)

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

Date: Sun, 20 Sep 1998 00:38:21 -0500
From: nmcnelly@bu.edu (N.A.F. McNelly)
Subject: Re: Can GD.pm make 200 *ppi* gifs?
Message-Id: <nmcnelly-2009980038220001@ppp-87-32.bu.edu>

In article <m3d88r3ab2.fsf@mail.biol.sc.edu>, Dean Pentcheff
<dean2@mail.biol.sc.edu> wrote:

> nmcnelly@bu.edu (N.A.F. McNelly) writes:

> > Ooops!  Let me reword that to 200 pixels/inch.
> 
> Umm... I don't think so. [...]
> Let me suggest that your impression of being able to create GIFs with
> different ppi specifications is an artifact of the way Photoshop lets
> you format images.  (Note that I'm winging a guess that you're using
> Photoshop, or something similar.)

And you'd be right, Photoshop is what I'm using.  I'm probably dead
wrong here.  I'm not sure why my friend's gifs on his web site
register as 100 ppi when saved (if we were both using Photoshop,
would that account for this?).

The other mystery is why every T-shirt manufacturer I've consulted,
even after I tell them that the artwork will consist of gifs made
on-the-fly, ask for greater than 72 ppi (T shirts are what this is 
all about).  And more than one told me not to simply start with my
72 ppi gif and increase it to 200 ppi as that would be no
improvement over 72 ppi (which makes sense).

Unless the majority of T shirt manufacturers are as ignorant on the
subject as I seem to be - which is entirely possible ...  ;-)

 ......................................................................
Nancy McNelly
http://halfmoon.org   Rabbit in the Moon: Mayan Glyphs and Architecture
http://halfmoon.org/borden/   Virtual Lizzie Borden House


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

Date: Sat, 19 Sep 1998 22:58:26 -0800
From: anthony@outshine.com (Anthony Boyd)
Subject: Re: Can GD.pm make 200 *ppi* gifs?
Message-Id: <anthony-1909982258280001@oak-hiper1a-182-246.dialup.slip.net>

nmcnelly@bu.edu (N.A.F. McNelly) wrote:
> Dean Pentcheff <dean2@mail.biol.sc.edu> wrote:
> > nmcnelly@bu.edu (N.A.F. McNelly) writes:
> >
> > > Ooops!  Let me reword that to 200 pixels/inch.
> > 
> > Let me suggest that your impression of being able to create GIFs with
> > different ppi specifications is an artifact of the way Photoshop lets
> > you format images.  (Note that I'm winging a guess that you're using
> > Photoshop, or something similar.)
> 
> And you'd be right, Photoshop is what I'm using.  I'm probably dead
> wrong here.  I'm not sure why my friend's gifs on his web site
> register as 100 ppi when saved (if we were both using Photoshop,
> would that account for this?).

That would be odd, as GIFs don't have a ppi or dpi setting.  When the
browsers render GIFs, they just render them dot for dot across your
screen.  So if your screen is at 72ppi, so is the GIF, and if your screen
is at 120ppi, so is the GIF.  However, you could get around this
sneakily.  See below.

> The other mystery is why every T-shirt manufacturer I've consulted,
> even after I tell them that the artwork will consist of gifs made
> on-the-fly, ask for greater than 72 ppi (T shirts are what this is 
> all about).  And more than one told me not to simply start with my
> 72 ppi gif and increase it to 200 ppi as that would be no
> improvement over 72 ppi (which makes sense).

Assuming you're using Photoshop to assign ppi settings, he's correct that
if you have a 10 inch big GIF at 100ppi and you resample to a 10 inch GIF
at 200ppi, well, then it has to add in a ton of extra pixels and you get a
fuzzy image.  However, if you have a 10 inch GIF at 100ppi, and you
convert it to 200ppi WITHOUT resampling it -- instead, you let the image
be resized (down to 5 inches in this case), well, that maintains the pixel
fidelity.  If you don't understand that, you can just show this to the
shop and they'll get it.

So here is what you and the shop should agree to do: first, figure out how
big the image will be on the shirt (let's say 8 inches wide); second,
knowing that they want a 200ppi image, figure out how many pixels that
would end up being (8 * 200 = 1600); third, have GD.pm make images just
that wide (1600) without specifying any dpi/ppi setting; fourth, send the
images to the shop and tell them you built the images oversized and if
they'll change the setting in Photoshop to be 200ppi WITHOUT resampling --
thereby causing the image to shrink down to 8 inches -- then they'll have
exactly what they need to print the shirts.

-Tony


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

Date: Sun, 20 Sep 1998 10:37:46 +0200
From: tcd@post10.tele.dk
Subject: Danish letters F X E
Message-Id: <3604BEDA.4DF2@post10.tele.dk>

I have been looking at some database scripts
And it seems that they all have the same fault.
When you do a search for a word that starts with a danish letter
F X E f x e - like in the words  "Fg" "Xlstykke" "Erhus"
the scripts cant find it.


I'm not sure but this seems to be a problem with
perls reg expression matching, not the programs..

Can anyone help me with this problem ????????????
Please email me if you have the answer to the problem.

I realy hope so.

Kind regards
Tommy
mailto:tcd@post10.tele.dk


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

Date: Sun, 20 Sep 1998 11:51:15 GMT
From: williw@wank.com (Willie Wanker)
Subject: Re: Determine NT Logon Server?
Message-Id: <3605aec6.441892316@enews.newsguy.com>

On Wed, 16 Sep 1998 21:28:11 -0700, Jan Krynicky
<JKRY3025@comenius.ms.mff.cuni.cz> wrote:

>Willie Wanker wrote:
>> 
>> The logon server is in the enviroment. Open a dos window and type set.
>> 
>> LOGONSERVER=\\xxxxxxxxxxx
>> 
>> Should be easy to grab it.
>
>Works only in WinNT. Win95 do not give such info that way.
>
>Jenda

hmmm,  put this in the logon batch file:

NET USE >C:\NETUSE.TXT

then have perl look in the file for what server the netlogon share
(Z:) was mapped to.




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

Date: Sat, 19 Sep 1998 21:05:11 -0700
From: Maureen Nelson <mpn@dorsey.org>
Subject: EOF command for Mac? (for Perl)
Message-Id: <36047EDA.561D@dorsey.org>

Sorry to bother the pantheon with this newbie question, but I cannot
find a better place to post this (comp.sys.mac.programmer seems to be
defunct or so my news server tells me).

Is there an EOF command you can enter from the KB on the Mac?

I'm teaching myself Perl on three different platforms: Unix at school,
NT at work and Mac at home, but whenever I need interactivity, I'm
limited to doing it on NT or Unix, because those are the only ones where
I know how to enter an EOF command. Please tell me I'm not the only
person in the world using MacPerl!

Thanks, folks!

(P.S. Thank you, Randy--three frustrated Perlgrrls who could not get
into the CCSF Perl class are meeting once a week and using your "L.P. on
Win32" as a textbook.)

                         MAUREEN NELSON
136 Majestic Avenue                            Bank of America      
San Francisco CA 94112                   HR Intranet Webmaster
mpn@dorsey.org                maureen.p.nelson@bankamerica.com
Home: (415)334-3394                        Work: (415)436-3081
http://www.dorsey.org/MPN           http://www.bankamerica.com


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

Date: Sun, 20 Sep 1998 10:20:54 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: EOF command for Mac? (for Perl)
Message-Id: <comdog-ya02408000R2009981020540001@news.panix.com>
Keywords: from just another new york perl hacker

In article <36047EDA.561D@dorsey.org>, mpn@dorsey.org posted:

>I'm teaching myself Perl on three different platforms: Unix at school,
>NT at work and Mac at home, but whenever I need interactivity, I'm
>limited to doing it on NT or Unix, because those are the only ones where
>I know how to enter an EOF command. Please tell me I'm not the only
>person in the world using MacPerl!

do you mean you need to determine how to tell your script that STDIN
is done? 

have you tried Control-D? it's not the same as NT, which is Control-Z
as i recall.

good luck :)

-- 
brian d foy                                  <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>
Perl Mongers needs volunteers! <URL:http://www.pm.org/to-do.html>


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

Date: 20 Sep 1998 14:46:41 +0200
From: Anton Berezin <tobez@plab.ku.dk>
Subject: Re: even/odd numbers
Message-Id: <86ww6z3qa6.fsf@lion.plab.ku.dk>

abigail@fnx.com (Abigail) writes:

> Scott Stark (sstark@informix.com) wrote on MDCCCXLV September MCMXCIII in
> <URL: news:6u1ckv$re21@webint.na.informix.com>:
> ++ Hi, does anyone know a way for perl to determine if a number is even or odd?
> 
> I always use:
> 
>   is_even {
>      my $candidate = shift;
>      return is_even -$candidate if $candidate < 0;
>      return $candidate ? is_odd  -- $candidate : !$candidate;
>   }
> 
>   is_odd  {
>      my $candidate = shift;
>      return is_odd  -$candidate if $candidate < 0;
>      return $candidate ? is_even -- $candidate :  $candidate;
>   }

Nice.  Any volunteer to make its running time exponential?

Though I prefer more straightforward approach
(which is plagiarism, of course):

   sub even {
      ('E' x ($_[0] < 0 ? -$_[0] : $_[0]))
        =~ /^(?:eE)*$/i;
   }

   sub odd {
      ('O' x ($_[0] < 0 ? -$_[0] : $_[0]))
        =~ /^o(?:Oo)*$/i;
   }

-- 
Anton Berezin <tobez@plab.ku.dk>
The Protein Laboratory, University of Copenhagen

Figure 4  shows memory usage for a script (program)  written in the Perl
scripting language. This program processes a file of string data. (We're
not sure exactly what it is doing with the strings, to be honest;  we do
not really understand this program.)
                  -- P.R. Wilson, M.S. Johnstone, M. Neely, and D. Boles


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

Date: 19 Sep 1998 14:14:14 -0400
From: Russell Schulz <Russell_Schulz@locutus.ofB.ORG>
Subject: Re: Finding the FAQ (was: Re: No switch statement in Perl??)
Message-Id: <repost.19980919.19980911.235255.6J3.rnr.w164w@locutus.ofB.ORG>

Tom Phoenix <rootbeer@teleport.com> writes:

>> It's helpful in a reply like this to also include where the FAQ can be
>> found 
>
> You're right that it might be helpful. But my thought is: Is
> there any reasonable way in which someone may look for the Perl
> FAQ and not find it?

I also ask this whenever someone posts a `is there a FAQ?' question to
any of the groups my FAQs cover; they never answer.
-- 
Russell_Schulz@locutus.ofB.ORG  Shad 86c


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

Date: Sun, 20 Sep 1998 08:24:20 +0200
From: "Bjxrn Inge Gresseth" <bgresset@online.no>
Subject: Re: Help Configuring IIS 4.0
Message-Id: <6u271a$dfn$1@readme.online.no>

>It appears that you have an error in your script or most probably in the
>configuration of the server.  It seems very likely that you have an error
>in the script-map registry entry - but this is a question for another
>group I would suggest. [Hint check the case of the %s ].
>
Vel, I did check the %s, and yes, it was %S, not %s, and now my scripts
works fine. But the extensions (.pl etc.) where installed by Active State's
Setup-program, and I thought that it had to be the right settings. So much
for trust :)

Well, anyway, thx for all help.

Bjoern.




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

Date: Sun, 20 Sep 1998 09:40:09 GMT
From: cim@online.ee
Subject: help!
Message-Id: <3604cbff.6307645@news.online.ee>

* open(IPS,"<$ips");
* @ips = <IPS>;
* close(IPS);
*
* $all_ips = join('|',@ips);

I have a file with separate data on each line:
data1
data2
etc.

I need to get the 10 last ones, not all of them (as the code above
does)

How can i do it?


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

Date: Sun, 20 Sep 1998 12:31:28 +0100
From: "Spikey Hair" <I.wont@tell.you.com>
Subject: newbie perlwin32 TK problem
Message-Id: <6u2p4o$p2f$1@plug.news.pipex.net>

Hi

I am working throught the examples in the o reilly perl for win32 resource
kit and came across a strange problem when using TK under win32.

If I run this simple hello world script the quit button only appears to work
every so often. Does anyone have any idea what is causing it to fail.

I am running perl 5.005 from Activestate as provided with the resouce kit.

here is the code that does not work properly

there is no problem with it displaying the widgets but its the damm button
that is giving me a problem. Any help most appreciated.

Thanks

Jon



--snip here--

use strict;
use Tk;
my $top = MainWindow->new;
$top->title('Hello World');
my $label = $top->Label ( -text => 'hello world');
$label->pack;
my $button = $top->Button( -text => 'Quit',
                                 -command => \&on_quit,
                                 )->pack();

MainLoop;

sub on_quit {
    exit ;
}

--end here --





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

Date: Sat, 19 Sep 1998 18:43:22 -0500
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: passing argument !!!!
Message-Id: <qif1u6.s04.ln@metronet.com>

Dave Cross (dave@mag-sol.com) wrote:
: [email copy of Usenet post sent to cited author]

: On Fri, 18 Sep 1998 10:02:50 -0700, lr@hpl.hp.com (Larry Rosler)
: wrote:

: >[Posted to comp.lang.perl.misc and a copy mailed.]

: >People really should test their assertions, instead of just posting: "I 
: >think you'll need...".

: Larry, why is it always you who catches my 'posting without thinking'
: posts?


   You are not alone.

   He's caught me twice that I can remember in the last few weeks  ;-(


: I must stop posting just as I'm leaving the office on a Friday
: evening!


   I must stop "posting without thinking"  ;-)


: Thanks for pointing it out.


   Ditto.


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


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

Date: Sun, 20 Sep 1998 14:42:27 GMT
From: Alan Melton <arm@home.net>
Subject: Pay to setup database access file
Message-Id: <360512E3.3605FF17@home.net>

I have a database flat ascii file
example:
SKU=1002|PRICE=28.25|DESC=Accounting:Conc.+Appl.-Std.Gde.1-14 5th 96 
New|CAT1=106|CAT=ACCT101|CAT2=ACCT101|CAT7=ALL|CAT3=Skousen|NAME=Accounting:Conc.+Appl.-Std.Gde.1-14
5th 96 
New|TAX=Y|SH=@total|SHG=A|CAT5=N|CAT6=N|CAT8=ACCT|CAT9=0-538-84419-1|CAT4=Accounting|

SKU=1003|PRICE=21.20|DESC=Accounting:Conc.+Appl.-Std.Gde.1-14 5th 96 
Used|CAT1=Y|CAT=ACCT101|CAT2=ACCT101|CAT7=ALL|CAT3=Skousen|NAME=Accounting:Conc.+Appl.-Std.Gde.1-14
5th 96 
Used|TAX=Y|SH=@total|SHG=A|CAT5=U|CAT6=N|CAT8=ACCT|CAT9=0-538-84419-1|CAT4=Accounting|

SKU=1004|PRICE=84.45|DESC=Accounting:Concepts & Application 1st    
New|CAT1=265|CAT=ACCT101|CAT2=ACCT101|CAT7=ALL|CAT3=Skousen|NAME=Accounting:Concepts
& Application 1st    
New|TAX=Y|SH=@total|SHG=A|CAT5=N|CAT6=Y|CAT8=ACCT|CAT9=0-538-87123-7|CAT4=Accounting|

and will pay someone to setup a program (perl)
that will access, be able to modify database and 
save database - that can be accessed from an html.

A Melton


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

Date: 20 Sep 1998 06:13:47 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Perl & Java - differences and uses
Message-Id: <6u26er$heg$1@client3.news.psi.net>

[ Since this thread hasn't mentioned Java for a long time, follow ups
  only to comp.lang.perl.misc ]

George Reese (borg@imaginary.com) wrote on MDCCCXLVI September MCMXCIII
in <URL: news:yIZM1.942$Ge.2549906@ptah.visi.com>:
++ In comp.lang.java.programmer Uri Guttman <uri@sysarch.com> wrote:
++ :>>>>> "GR" == George Reese <borg@imaginary.com> writes:
++ 
++ Functionality is NOT freedom--at least not freedom in the sense being
++ talked about in this thread.  This thread is (now) basically about the OO
++ structure enforced by python and perl vs. the lack of structure in
++ perl.  Perl and python are functionally similar languages.  Perl,
++ however, allows a variety of ways of expression.  Python, on the other
++ hand, forces an OO expression in a very strict syntax.

If you think Perl doesn't have structure, you are utterly wrong.
Perl doesn't force a particular structure upon the programmer, but
that's something else.

You can put fences around every road, and prevent them from driving into
a ditch, but that still doesn't mean they are now able to find their way
around. They still have to make a decision whether to turn right or left
at the intersection. But the guy whose car can fly is utterly pissed,
as he won't be able to drive into the grass and take off and get at his
destination quickly.

++ The premise being discussed in this branch of this thread is my
++ statement that 'freedom has no place in programming' (or something of
++ that nature, I don't have the exact quote before me).  Now, there are
++ unstated assumptions that go along with that.  Clauses like 'in a
++ large-scale, multi-developer system'.  For your own uses, anything
++ that works works.  But just because it works for you personally does
++ not mean it translates well to group development.
++ 
++ :   GR> The freedom you talk about is why software engineering is such a
++ :   GR> voodoo practice that results in gobs of absolute crap being produced.
++ 
++ : let's compare creative programmers with freedom and your hive of drones
++ : coding to fixed format and corporate specifications. i have seen the
++ : results and it is the crap you speak of. a smaller team of creatuve
++ : programmers with freedom will beat their pants off easily in both
++ : quality and quantity of code.
++ 
++ This statement would of course require some sort of real world test
++ neither you nor I are prepared to do here.  So it is just an
++ unsupported claim as it stands.
++ 
++ But look at it this way.  Let's give two people a crossword puzzle.  I
++ give one an algorithm--a trial-and-error algorithm somewhat like long
++ division--and the other uses their creative wits.  Furthermore, the
++ one given the algorithm is any average person off the street.  The one
++ with "freedom" is a genius.
++ 
++ Who do you think will solve the puzzle first?
++ 
++ My money is on the "drone" armed with the algorithm.

What has having an algorithm to do with a programming methodoloy?
Forcing a programming methodology on a programmer doesn't make him
use appropriate algorithms, just like whipping slaves doesn't create
pyramids.

Algorithms are seldom developed using a particular language. English,
math and a blackboard are the main tools for developing an algorithm.

Take a good look at great books like TAoCP. Algorithms are mainly
described in English, and not in the hot language of the decade.
Algorithms are timeless. Programming methodologies are subject to fashion.

++ Multiple search algorithms are about multiple kinds of functionality,
++ not multiple means of expression.

Subtitles please?

++ I do not talk as if methodology is THE answer.  It is an important
++ part of the answer.  There are many parts of the answer, some of which
++ are still clearly missing.  First of all, I have stated a goal of OO
++ methodologies--to make software engineering a repeatable process.

I see. There's no room for progress in the OO world? ;)

++ It is a good rhetorical device to take a belief which I will affirm
++ (that OO is important) and then dismiss that belief as religious.
++ After all, a religious belief is one without reason behind it.
++ Unfortunately, you have not in any way demonstrated that my belief in
++ OO lacks coherent reasoning.

Any "belief" in anything with dismissing everything else lack coherent
reasoning. In fact, it lacks all reasoning.

OO is just another programming methodology. It's hot now. There will
be something else in 10 years. OO isn't the only solution.



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: 20 Sep 1998 17:24:57 +1000
From: dformosa@zeta.org.au (David Formosa)
Subject: Re: Perl & Java - differences and uses
Message-Id: <6u2ak9$1it$1@godzilla.zeta.org.au>

In <yIZM1.942$Ge.2549906@ptah.visi.com> George Reese <borg@imaginary.com> writes:

>In comp.lang.java.programmer Uri Guttman <uri@sysarch.com> wrote:

[...]

>But look at it this way.  Let's give two people a crossword puzzle.  I
>give one an algorithm--a trial-and-error algorithm somewhat like long
>division--and the other uses their creative wits.  Furthermore, the
>one given the algorithm is any average person off the street.  The one
>with "freedom" is a genius.

>Who do you think will solve the puzzle first?

>My money is on the "drone" armed with the algorithm.

My money is on the genus.   An algortymum such as you describe would require
searching threw a dictonary.  Now this dictonary is about 22 books indexed by
wrod leanth.  Each book has on advage 2063 words.  Now if it takes one second
to look up each word it would take 6 hourses to solve a 12 word puzzel.

Now we know that cross word experts can solve larger puzzels in shorter times.
So I think that the genus can do far better then the drone.  (and thats not
taking in account backtracking by the drone.)





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

Date: 20 Sep 1998 07:15:01 PDT
From: Patricia Shanahan <pats@acm.org>
Subject: Re: Perl & Java - differences and uses
Message-Id: <36050D71.508DA4E9@acm.org>

David Formosa wrote:
> 
> In <yIZM1.942$Ge.2549906@ptah.visi.com> George Reese <borg@imaginary.com> writes:
> 
> >In comp.lang.java.programmer Uri Guttman <uri@sysarch.com> wrote:
> 
> [...]
> 
> >But look at it this way.  Let's give two people a crossword puzzle.  I
> >give one an algorithm--a trial-and-error algorithm somewhat like long
> >division--and the other uses their creative wits.  Furthermore, the
> >one given the algorithm is any average person off the street.  The one
> >with "freedom" is a genius.
> 
> >Who do you think will solve the puzzle first?
> 
> >My money is on the "drone" armed with the algorithm.
> 
> My money is on the genus.   An algortymum such as you describe would require
> searching threw a dictonary.  Now this dictonary is about 22 books indexed by
> wrod leanth.  Each book has on advage 2063 words.  Now if it takes one second
> to look up each word it would take 6 hourses to solve a 12 word puzzel.
> 
> Now we know that cross word experts can solve larger puzzels in shorter times.
> So I think that the genus can do far better then the drone.  (and thats not
> taking in account backtracking by the drone.)

This is a very good analogy. If one takes the realistic view that
non-interactive programs in the real world are finite state machines,
since they have to run on systems of finite size in finite time, there
is already an algorithm for writing them:

Enumerate in list A all the possible inputs.
Enumerate in list B in the same order the correct output corresponding
to each input.
Generate a piece of code that compares the run-time input to list A
items until it finds the matching one and then outputs the element at
the corresponding position in list B. If you reach the end of list A
without getting a match report an illegal input.

Algorithms are used for designing some small FSM's that arise in
hardware design. The crossword algorithm approach would work very well
for tiny crosswords. It breaks down for medium and large ones.

Patricia


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

Date: Sun, 20 Sep 1998 11:38:01 +0100
From: "Jug" <gordon@jugular.demon.co.uk>
Subject: Question: Piping into STDIN using ActiveState Perl on WIN32
Message-Id: <906287912.4083.0.nnrp-04.c2de8d15@news.demon.co.uk>

Hi,
    I know I am missing something obvious here .....

    The perl script (test.pl)

    $TheStr = <STDIN>;
    print $TheStr;


    Works fine when I simply run it and enter a string, but when I create a
response text file (mimicking an entry)

    i.e.
        A file called resp with one line:
            Hello World

    And then invoke it as:
        test.pl < resp

    I get a blank line displayed, obviously, something is at stdin, because
the script stops (rather than hanging around waiting for input) and no
errors are displayed,

   Any bright ideas ?

cheers

Gordon.






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

Date: 20 Sep 1998 11:11:59 GMT
From: Jonathan Stowe <gellyfish@gellyfish.btinternet.com>
Subject: Re: Question: Piping into STDIN using ActiveState Perl on WIN32
Message-Id: <6u2ntv$gbg$1@mendelevium.btinternet.com>

On Sun, 20 Sep 1998 11:38:01 +0100 Jug <gordon@jugular.demon.co.uk> wrote:
> Hi,
>     I know I am missing something obvious here .....

>     The perl script (test.pl)

>     $TheStr = <STDIN>;
>     print $TheStr;


>     Works fine when I simply run it and enter a string, but when I create a
> response text file (mimicking an entry)

>     i.e.
>         A file called resp with one line:
>             Hello World

>     And then invoke it as:
>         test.pl < resp

>     I get a blank line displayed, obviously, something is at stdin, because
> the script stops (rather than hanging around waiting for input) and no
> errors are displayed,

If you are on Windows 9[58] then you are the victim of the most astonishingly
bad command interpreter known to man.

It is possible to obtain a replacement such as the DJGPP or Cywin32 versions
of Gnu Bash available from www.delorie.com and www.cygnus.com respectively.

I have not encountered this problem using cmd.exe on Win NT though.

/J\
-- 
Jonathan Stowe <jns@btinternet.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>


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

Date: Sun, 20 Sep 1998 01:53:11 -0700
From: Peter Kosenko <kosenko@netwood.net>
Subject: Sites devoted to Perl Win32
Message-Id: <3604C275.ED079CEC@netwood.net>

Hello:

I have recently installed the Perl for Win32
modules and they are working just fine.  However,
I am not an expert Perl programmer (not yet), and
I am looking for Web sites that relate
specifically to Win32 so that I can find ideas
with which to practice.

The CPAN archives are just a little bit
overwhelming!!!  And there is so many "Perl"
references are turned up by the web search engines
that I am not having a lot of luck finding what I
am looking for.

So, I would appreciate any references to sites
devoted to Perl and Windows 95.

Thanks in advance.

Peter Kosenko
=============================================================

Peter Kosenko
1448-1/2 12th St.
Santa Monica, CA 90401
Phone: (310) 451-7208
Email: mailto:kosenko@netwood.net
URL: http://www.netwood.net/~kosenko
Netwood Design Center URL: http://ndc.netwood.net/

=============================================================

"Man is a rational animal.  He can think up a
reason for anything he wants to
believe."--Benjamin Franklin




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

Date: 20 Sep 1998 00:18:11 -0500
From: les@MCS.COM (Leslie Mikesell)
Subject: Re: where is Date::Parse?
Message-Id: <6u236j$kpm$1@Mercury.mcs.net>

In article <yld88sr202.fsf@windlord.stanford.edu>,
Russ Allbery  <rra@stanford.edu> wrote:
>Andrew Johnson <ajohnson@gpu.srv.ualberta.ca> writes:
>
>> let's go fishing:
>
>> [danger:ajohnson:~]$ perl -MCPAN -e shell
>
>Ew.
>
>You have your tools, I have mine.  That's not one of mine.  I highly
>dislike automated installation procedures, particularly ones that keep
>their own databases and don't integrate well into the package management
>schemes that I already have.  I suppose it rocks for people who like it;
>I'm not one of those people.

Does your tool tell you if your installed copy is outdated compared to the
version on CPAN?

  Les Mikesell
    les@mcs.com


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

Date: 19 Sep 1998 22:58:59 -0700
From: Russ Allbery <rra@stanford.edu>
Subject: Re: where is Date::Parse?
Message-Id: <ylg1dnnx3w.fsf@windlord.stanford.edu>

Leslie Mikesell <les@MCS.COM> writes:

> Does your tool tell you if your installed copy is outdated compared to
> the version on CPAN?

Doesn't quite yet, but it will shortly.  I have all the pieces, I just
have to plug a call to Net::FTP or the appropriate LWP method into it and
add a little filename parsing code.  And then it will work for any
software package, not just for Perl packages.

Don't get me wrong; CPAN.pm does a great job at solving the problem that
it was designed to solve.  That's just not the problem that I'm interested
in solving, and it has a few behaviors as an inherent part of its design
that bug me.

-- 
#!/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: Sun, 20 Sep 1998 09:04:19 GMT
From: adelton@fi.muni.cz (Honza Pazdziora)
Subject: Re: where is Date::Parse?
Message-Id: <EzKrv7.J89@news.muni.cz>

On 20 Sep 1998 02:42:15 GMT, Abigail <abigail@fnx.com> wrote:
> 
> I recently fixed my CPAN.pm:  rm -f CPAN CPAN.pm

If there was something wrong or dangerous about CPAN.pm, would you
care to comment, so that the rest of the people can work on better
fixes of the problem? 

-- 
------------------------------------------------------------------------
 Honza Pazdziora | adelton@fi.muni.cz | http://www.fi.muni.cz/~adelton/
                   I can take or leave it if I please
------------------------------------------------------------------------


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

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

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