[9972] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3565 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Aug 27 16:02:51 1998

Date: Thu, 27 Aug 98 13:00:18 -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           Thu, 27 Aug 1998     Volume: 8 Number: 3565

Today's topics:
    Re: \\  ...what's the point? (Larry Rosler)
    Re: comp.lang.perl.windows.misc (Greg Bacon)
    Re: comp.lang.perl.windows.misc (Greg Bacon)
    Re: Exporting Methods <JKRY3025@comenius.ms.mff.cuni.cz>
    Re: Help: Cannot Load or Save in Win32::Registry <JKRY3025@comenius.ms.mff.cuni.cz>
    Re: how can I print 10 digit nos. using 0s as place hol (Harold Bamford)
    Re: How to convince others using perl instead bourne sc <jcrowe@io.com>
    Re: Max value in an array (Craig Berry)
    Re: Misinterpreted => why no true/false keywords? <zenin@bawdycaste.org>
    Re: Misinterpreted => why no true/false keywords? (Greg Bacon)
    Re: need and INI File parser in perl (Mike Stok)
    Re: newbie variable question... (Larry Rosler)
    Re: pattern matching (Greg Bacon)
    Re: Perl compiler (Nathan V. Patwardhan)
    Re: Perl compiler droby@copyright.com
        Perl needtobie wants info on DBI DBD Oracle Netscape En <Art.vanMeeteren@fmr.com>
    Re: Perl version <aqumsieh@tigre.matrox.com>
    Re: Please Help Me With A RegX. (Larry Rosler)
    Re: Unreadable Scripts? (John Stanley)
    Re: Unreadable Scripts? (Nathan V. Patwardhan)
    Re: When using CGI.pm to upload file I get extraneous d (Larry Rosler)
    Re: why no true/false keywords? (Greg Bacon)
    Re: why no true/false keywords? (Greg Bacon)
        Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)

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

Date: Thu, 27 Aug 1998 11:56:31 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: \\  ...what's the point?
Message-Id: <MPG.104f4bb912a4d1409897fe@nntp.hpl.hp.com>

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

In article <8caf4qi9m4.fsf@gadget.cscaper.com> on Thu, 27 Aug 1998 
18:05:22 GMT, Randal Schwartz <merlyn@stonehenge.com> says...
 ...
> 	print 'I can\'t hear you', "\n";
> 	print 'This line ends with a backslash \\', "\n";
> 
> Unless we could represent \ as \\, there'd be no way to write that
> last one.

I believe the original submitter meant why wasn't it defined like this:

  	print 'I can''t hear you', "\n";
  	print 'This line ends with a backslash \', "\n";

It is done this way in some other languages.

-- 
(Yet Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


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

Date: 27 Aug 1998 18:51:06 GMT
From: gbacon@itsc.uah.edu (Greg Bacon)
Subject: Re: comp.lang.perl.windows.misc
Message-Id: <6s49qq$j0f$2@info.uah.edu>

In article <6s20td$srj@mozo.cc.purdue.edu>,
	gebis@fee.ecn.purdue.edu (Michael J Gebis) writes:
: gbacon@cs.uah.edu (Greg Bacon) writes:
: }Please provide evidence for the claim that people who post from the
: }.edu TLD are rude and clueless.
: 
: The "September" part of Abigail's attribution line.

That's a reference to the flood of discurteous freshmen every September.
Most of the freshmen usually learn better or get lost by the end of
September.  Win32 users have had several years.  What's the difference?

Greg
-- 
On Usenet, no one knows you're a dumbass.. until you post.  -- gbacon


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

Date: 27 Aug 1998 18:54:46 GMT
From: gbacon@itsc.uah.edu (Greg Bacon)
Subject: Re: comp.lang.perl.windows.misc
Message-Id: <6s4a1m$j0f$3@info.uah.edu>

In article <6s1ssa$2ui$2@ligarius.ultra.net>,
	sowmaster@juicepigs.com (Bob Trieger) writes:
: Greg Bacon <gbacon@cs.uah.edu> wrote:
: -> That's what I meant by `such rude', as in not reading the FAQ and
: -> unashamedly asking for handouts and insulting the group by trying to
: -> turn it into a free helpdesk.

[long lines chopped]
: The number is probably proportionate to the number of users using each o
: OSes minus all the *nix users that would be just as rude if they could f
: out how to use/configure their newsreaders?

Hmm.. I don't know many Unix users like that.  Could you maybe offer a
few testimonials?  If you want to see misconfigured newsreaders, check
out all the multipart MIME spewage posted by your typical Win32
newsreader.  Those are very easy to count.

Greg
-- 
I considered atheism but there weren't enough holidays.


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

Date: Thu, 27 Aug 1998 20:57:03 -0700
From: Jan Krynicky <JKRY3025@comenius.ms.mff.cuni.cz>
Subject: Re: Exporting Methods
Message-Id: <35E62A8F.531D@comenius.ms.mff.cuni.cz>

Mark-Jason Dominus wrote:
> 
> In article <35E37B0C.659A@comenius.ms.mff.cuni.cz>,
> Jan Krynicky  <JKRY3025@comenius.ms.mff.cuni.cz> wrote:
> >Exporter is a nice tool for most cases, but sometimes you'll find out
> >that you have to do it "by hand".
> 
> Sometimes it's nice to do it by hand even if you don't have to.
> I talked about this at TPC, and the notes from the talk are on-line at
> 
>         http://www.plover.com/~mjd/perl/TPC/Hardware.html
> 
> The Exporter section in particular is at
> 
>         http://www.plover.com/~mjd/perl/TPC/Hardware-notes.html#Manual_Exporting
> 
> It includes The Very Very Short Guide to Exporting Without the Exporter.

The notes are very nice, thanks.

I have a few comments :-)

1. Adding a New Method to a Package 

 
 Instead of

  sub Msql::myquery {
    my $dbh = shift;
    # Just stick the method here, dummy.
  }

I would use

  package Msql;
  sub myquery {
    my $dbh = shift;
    # Just stick the method here, dummy.
  }
  package main; # or whatever it was

This way you have all package variables by hand, so the code may be
exactly
the same as if you added it into the Msql.pm file.


2. Memoizing

There is also another cool way to compute Factorial or Fibonaci.
Using Lazy.pm ( http://jenda.krynicky.cz/ ):

 use Lazy '@fact' => sub {my $n=$_[0]; return 0 if $n<0; $n == 0 ? 1 :
$fact[$n-1] };

and

 use Lazy '@fib' => sub {my $n=$_[0]; $n < 2 ? $n : $fib[$n-1] +
$fib[$n-2]};

Memoizing looks a bit more understandable though. 

Lazy.pm is also very usefull for variables that take very long to
evaluate and are seldom used.
I use it especialy for Win32::API handles in some of my modules.
Compare

 tie $Function, 'Lazy', sub {new Win32::API
('some.dll','Function',['L','P'],'I')};
 ...
 sub Foo {
  ...
  $Function->Call(234, $str);
 }

 sub Bar {
  ...
  $Function->Call(432, $str);
 }
 
with

 sub Foo {
  ...
  $Function = new Win32::API ('some.dll','Function',['L','P'],'I')}
    unless $Function;
  $Function->Call(234, $str);
 }

 sub Bar {
  ...
  $Function = new Win32::API ('some.dll','Function',['L','P'],'I')}
    unless $Function;
  $Function->Call(432, $str);
 }

How'dya like it? (See Win32::FileOp for a longer example ;-)

Hi, Jenda

BTW: MJD, is there any progress with Interpolation.pm ?


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

Date: Thu, 27 Aug 1998 21:12:32 -0700
From: Jan Krynicky <JKRY3025@comenius.ms.mff.cuni.cz>
Subject: Re: Help: Cannot Load or Save in Win32::Registry
Message-Id: <35E62E30.52DA@comenius.ms.mff.cuni.cz>

czsmith346@my-dejanews.com wrote:
> 
> All attempts to load or save a registry key fail with Win32::Registry::Load or
> Win32::Registry::Save.  Following code always returns "No such file or
> directory".
> 
>         $HKEY_LOCAL_MACHINE->Open('SOFTWARE\UPS\TEST\BA1', $hKey)  ||
>                 die("\nCannot open BA1!");
>         `erase c:\\temp\\XXBA1.*`;
> 
>         $hKey->Save('XXBA1.reg')  ||  die ("Cannot save BA1");
>         $hKey->Close;
> 
> and
> 
>         $HKEY_LOCAL_MACHINE->Create('SOFTWARE\UPS\Test', $hKey)  ||
>                 die("\nCannot create work area in registry!");
>         $hKey->Load('Test', 'XXBA1.reg')  ||  die ("Cannot load BA1 ($!)");
>         $hKey->Close;
> 
> In both instances, the Load or Save dies with the "No such file or directory"
> message.
> 
> I'm running Perl 5.003_07, Perl for @in32 build 315 (Yes, I know there's
> later, but this one is deployed and I can't get a newer one done so
> quickly..)
> 
> Please post or send help to nrd1czs at nrd dot ups dot com  ...  Thanks!

1. Your process must have SE_BACKUPPRIVILEGE and SE_RESTOREPRIVILEGE
to be able to call Load and Save successfully.
AFAIK, there is not a function for this available in the distribution. 
You will have to use Win32::Setupsup.

2. The files you Load and Save are NOT .reg files (registry scripts).
These functions read/save the .DAT files. 
With one exception, you will never be able to read a .DAT
from Win95 on WinNT and vice versa. They are incompatible.


You may want to install my patch over Win32::Registry. It provides
working Load/Save/Unload, Import/Export (the .reg files),
FindKey/FindValue
and many others.

See http://jenda.krynicky.cz or http://www.fmi.cz/private/Jenda

HTH, Jenda


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

Date: 27 Aug 1998 19:35:20 GMT
From: hbamford@marconi.ih.lucent.com (Harold Bamford)
Subject: Re: how can I print 10 digit nos. using 0s as place holders
Message-Id: <6s4cdo$520@ssbunews.ih.lucent.com>

Just to be different, here is a reasonably efficient alternative to
using printf():

	#!/usr/local/bin/perl -w
	use strict;
	$|=1;
	print "Enter a six digit value: ";
	my($user) = <>;
	chomp $user;
	my($val) = int(substr($user . '0000000000',0,10));
	foreach(1 .. 19) {
	        print "$val\n";
	        $val++;
	}

This has the advantage that combining the user's values and the program's
counter is only done once.  Thereafter, it is just an integer increment
in the value to be printed.

-- Harold
-- 
-- Harold Bamford
   mailto:hbamford@lucent.com
   (630)713-1351


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

Date: Thu, 27 Aug 1998 14:29:24 -0500
From: Jose Cuervo <jcrowe@io.com>
Subject: Re: How to convince others using perl instead bourne scripts
Message-Id: <35E5B394.41C6@io.com>

Daniel, et. al.,

   If you really want to convince people to consider Perl for
appropriate projects, I think you might want to use something more
useful than a program that randomly rearranges the order of a twenty
line file.  Help me out here, why would people want to do such a thing?

   If I were touting the advantages of Perl, I might be tempted to point
to the richness of regular expression operations and string operations,
the potential to use OO features, the wealth of already implemented,
free solutions to a lot of general problems and so forth.  OTOH, given a
sample of problems somebody might wish to solve, one could show where
Perl might be appropriate, or inappropriate.  For example, an old friend
of mine used to work at an unnamed ISA design house.  They had a program
written in Tcl that was used to analyze 24 hour test run output on
various chip designs.  The problem was, the program was huge and took
more than 24 hours to run.  My friend wrote an equivalent program in
Perl (4.036 I think) in two weeks that ran the equivalent function in
twenty minutes on the same execution platform with the same input data.  

   And in the same vein, I think that one of Perl's strengths might be
speed of prototyping, testing and implementation.  If, based on previous
experience, I could demonstrate to a manager or client that a given
solution in Perl could be delivered, tested and packaged in two weeks
where the alternatives took Ntimes as long, that would do a lot more for
Perl.  Not that I'm slamming your ability to do in one line of Perl code
what might take a lot more lines in language X.  I just don't think it's
the way to convince people who make decisions on what tools are worth
adding to a given concern's toolbox.
Daniel Grisinger wrote:
> 
> [posted to comp.lang.perl.misc and mailed to the cited author]
> 
> In article <6s2jeo$1l1$1@nnrp1.dejanews.com>
> dzuy@my-dejanews.com wrote:
> 
> >       Challenge him/her to write an sh script or C program that reads in
> >       a file, then re-arrange the lines randomly.
> ...
> >                                                            If stumped,
> >       email me and I'll send a 20 line Perl script to solve this problem.
> 
> Why use 20 lines where one will do?
> 
> $ perl -i -al012n077 -F"\n" -e 'print splice(@F,int(rand(@F)),1) while $F[0]' file
> 
> dgris
> --
> Daniel Grisinger           dgris@perrin.dimensional.com
> "No kings, no presidents, just a rough consensus and
> running code."
>                            Dave Clark
   As always, IMO, YMMV and OALA, EHOATAS.

-- 
Joe Crowe
mailto:jcrowe@io.com


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

Date: 27 Aug 1998 19:50:33 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: Max value in an array
Message-Id: <6s4daa$oe6$1@marina.cinenet.net>

Abigail (abigail@fnx.com) wrote:
: But you miss one
: important thing. Context. The op ($_) in the map is in list context,
: while the op ($_) in the foreach is in scalar context.

Good point!  OK, so there *is* one nontrivial difference.  Thanks.

---------------------------------------------------------------------
   |   Craig Berry - cberry@cinenet.net
 --*--    Home Page: http://www.cinenet.net/users/cberry/home.html
   |      "Ripple in still water, when there is no pebble tossed,
       nor wind to blow..."


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

Date: 27 Aug 1998 18:56:50 GMT
From: Zenin <zenin@bawdycaste.org>
Subject: Re: Misinterpreted => why no true/false keywords?
Message-Id: <904244138.713210@thrush.omix.com>

Saurus <nonspammers.start.after.this.period.hot_redox@hotmail.com> wrote:
: 	Actually I think checking for the equality of
: [ proposed ] true and false keywords in Perl should be
: a compiler error, as in:
:
: 	if ( $foo == true) { .... }). # wouldn't compile

        Most experienced perl programmers find that:

                if ($foo) { .... }

        is easier to read, and much safer if you only want
        to test perl truth, which is not as simple as '1'.

: However being able to say things like:
:
: 	$Updated{'foo'} = true;
:
: is more readable than saying:
:
: 	$Updated{'foo'} = 1;

        If using my example above, you could also use:

        $Updated{'foo'} = 'true';

        But if you really want a bare word true and false, you can
        always make them ala C/C++:

        use constant true   => 1;
        use constant false  => 0;

        Or, if you've got enum.pm (plug! plug!):

        use enum qw(false true);

-- 
-Zenin (zenin@archive.rhps.org)           From The Blue Camel we learn:
BSD:  A psychoactive drug, popular in the 80s, probably developed at UC
Berkeley or thereabouts.  Similar in many ways to the prescription-only
medication called "System V", but infinitely more useful. (Or, at least,
more fun.)  The full chemical name is "Berkeley Standard Distribution".


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

Date: 27 Aug 1998 19:09:54 GMT
From: gbacon@itsc.uah.edu (Greg Bacon)
Subject: Re: Misinterpreted => why no true/false keywords?
Message-Id: <6s4au2$j0f$6@info.uah.edu>

In article <01bdd1e7$4789b6a0$c1620c8a@lnxcompaq.lexis-nexis.com>,
	"Saurus" <hot_redox@hotmail.com> writes:
: 	Actually I think checking for the equality of
: [ proposed ] true and false keywords in Perl should be
: a compiler error, as in:
: 
: 	if ( $foo == true) { .... }). # wouldn't compile

Perl poets will complain if they can't ask whether $foo is true. :-)
Why should that be a compile-time error?

: However being able to say things like:
: 
: 	$Updated{'foo'} = true;
: 
: is more readable than saying:
: 
: 	$Updated{'foo'} = 1;
: 
: especially if maintaining other people's code (as I
: am doing right now).

Then do it.

    use constant TRUE  => 1;
    use constant FALSE => 0;

    $Updated{'foo'} = TRUE;

    ...;

    if ($Updated{'foo'}) {
        ...;
    }

Just make sure your values for TRUE and FALSE are true and false,
respectively. :-)

Greg
-- 
Nine out of ten men who try Camels perfer women.


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

Date: 27 Aug 1998 19:27:41 GMT
From: mike@stok.co.uk (Mike Stok)
Subject: Re: need and INI File parser in perl
Message-Id: <6s4bvd$7lu@news-central.tiac.net>

In article <35E5A89B.725C@cisco.com>,
Prasad Suravarapu  <psuravar@cisco.com> wrote:

>Actually, I did search CPAN before I posted here. The search didn't
>seem to work well on random words like ini and config. It needed
>module or author names etc. Someone's got to point me to the right
>way to search for useful stuff on CPAN.
>
>Thanks to Mike Stok <mike@stok.co.uk> for pointing me to the
>right module.

One of the better things to look through is Jon Orwant's "front page" for
CPAN

  http://www.perl.com/CPAN/CPAN.html

which contains a chunk like this.

     IniConf - Read and write Windows .INI files. 
     Local copy (only if this is a CPAN site!)
     Copy from somewhere else 

Jon seems to have included quite a few useful words in some of the
descriptions of modules, a search for

  ini file

in a web browser (case insensitive) found this quite well.

Hope this helps a few people,

Mike

-- 
mike@stok.co.uk                    |           The "`Stok' disclaimers" apply.
http://www.stok.co.uk/~mike/       |   PGP fingerprint FE 56 4D 7D 42 1A 4A 9C
http://www.tiac.net/users/stok/    |                   65 F3 3F 1D 27 22 B7 41
stok@colltech.com                  |            Collective Technologies (work)


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

Date: Thu, 27 Aug 1998 12:09:15 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: newbie variable question...
Message-Id: <MPG.104f4eb7aa1a205a9897ff@nntp.hpl.hp.com>

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

In article <35E594BB.8BBD1CC8@nortel.ca> on Thu, 27 Aug 1998 13:17:47 -
0400, Misagh Ziaei <pepstud@nortel.ca> says...
 ... 
> $test = "/home/users/me/cool";
> 
> Is there a way I can strip away all the text except the 'me' part? I
> mean, I want 'me' to be variable, but I don't want all the other
> directories with it.

Easy one.  `perldoc perlre'.

  $test =~ m!.*/([^/]+)/!
  $result = $1;

or just:

  $test =~ s!.*/([^/]+)/.*!$1!;

This might be just as efficient (by Benchmark):

  $test =~ s!.*/([^/]+)/[^/]*!$1!;

-- 
(Yet Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


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

Date: 27 Aug 1998 18:56:42 GMT
From: gbacon@itsc.uah.edu (Greg Bacon)
Subject: Re: pattern matching
Message-Id: <6s4a5a$j0f$4@info.uah.edu>

In article <35e47f49.1502344@news.nottingham.ac.uk>,
	itxjcs@unix.ccc.nottingham.ac.uk (James Stout) writes:
: I've read the perlop man page, but can't figure out how to make it
: insert <a href mailto$variable_containing_just the
: word_with_the@_in:>$variable_containing_just the word_with_the@_in</a>
: in place of the word with the @ in only, but keep the rest of the text
: in the variable.

Read the perlre manpage in its entirety.  After you've done that, go
back through, searching for backref.

Greg
-- 
As I stood before the gates I realized that I never want to be as certain
about anything as were the people who built this place. 
    -- Rabbi Sheila Peltz, on her visit to Auschwitz


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

Date: Thu, 27 Aug 1998 19:36:52 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: Perl compiler
Message-Id: <oziF1.51$V5.373521@shore>

John Stanley (stanley@skyking.OCE.ORST.EDU) wrote:

: I have a really cool new server that has a whole computer that does
: nothing but monitor the rest of the server. It wants a password before
: it will let me get to the data. 

So why can't the "operator" login to the machine by themselves and
grab the data?  Or why can't the program ask the person who's running
it for a password?  Why is hardcoding of a password necessary?

: I need tide data on a daily basis. The dialup tide guage wants a
: password.

See above.

: I have several Annex terminal servers that need to have their serial
: ports reset every so often or they get confused. 

See above.

: Now put all three examples in the user's context, where chown doesn't
: work. 

You meant chmod, I think, and the issue was whether or not someone
should be hardcoding cleartext passwords.  And you didn't address
*why* the password needed to be hardcoded for each of these examples.

--
Nate Patwardhan|root@localhost
"Fortunately, I prefer to believe that we're all really just trapped in a
P.K. Dick book laced with Lovecraft, and this awful Terror Out of Cambridge
shall by the light of day evaporate, leaving nothing but good intentions in
its stead." Tom Christiansen in <6k02ha$hq6$3@csnews.cs.colorado.edu>


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

Date: Thu, 27 Aug 1998 19:28:37 GMT
From: droby@copyright.com
Subject: Re: Perl compiler
Message-Id: <6s4c15$3ap$1@nnrp1.dejanews.com>

In article <6rv137$a81$2@client3.news.psi.net>,
  abigail@fnx.com wrote:
> Lily Y. Fu (lily@tigr.org) wrote on MDCCCXX September MCMXCIII in
> <URL: news:35E2D81F.4702@tigr.org>:
> ++ I'd like to thank everyone replied my seeking for help email!
> ++
> ++ But, I still need furthur help. Here is my situation:
> ++
> ++ We have a webserver running on a host outside the firewall
> ++
> ++
> ++ We want to give all staff A, B, C a homepage
> ++ on the host outside the firewall,
>
> Why don't you give yourself a better setup? A proxy for instance.
> Better firewall software. NFS.
>

NFS?  Sounds like a good way to make a very busy firewall.  And you definitely
want to NOT set up NFS shares the opposite direction.

There are likely lots of better setups that could be made, but I presume
Lily's not in a position to redesign her company network.

The simplest thing would be to make actual accounts for the individual users
(shared accounts are not generally good for security after all), with
access only to the homepage areas, and passwords that the users supply when
transferring files to their homepages.

--
Don Roby
<droby@copyright.com>

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

Date: Thu, 27 Aug 1998 15:29:17 -0400
From: Art vanMeeteren <Art.vanMeeteren@fmr.com>
Subject: Perl needtobie wants info on DBI DBD Oracle Netscape Enterprise NT
Message-Id: <35E5B38C.F10D792C@fmr.com>

Just got dropped into a 12,000 line Perl website support/migration
position......

Current tools:
UNIX
Perl 5.004
Perl DBI module
Perl::mSQL DBD module
mSQL ( mini SQL from www.hughs.com.au )
Netscape Enterprise Server

Desired development platform.... to learn application:
Windows NT 4.0
ActivePerl 5.004 ( or should I use the Standard ? )
Perl DBI module ( once I figure out how to build and install the thing )

Perl::Oracle DBD module ( once I figure out the DBI and then the DBD )
Oracle Enterprise 8.0
Netscape Enterprise 3.51

My problems are that I can't figure out if this is the best solution to
try and get a dev station up and running to get familiar with the code.
I am limited to NT cause... well.. thats what I have and know. I have to
use Oracle cause thats whats used here.... and the application currently
hits the database using DBI and DBD As you can see by the selection of
tools above.... I can't seem to get the DBI DBD modules to install. I am
at the point where they say.... type make.... and things should happen.
My guess now is that I don't have an ANSI C compiler installed to
recognize the make command.....

If someone could find an easier way to start learning Perl (with a DB
backend ) .... I would appreciate it.... If you are simply going to slam
me.... save your breath....

I have scoured the net for 2 days reading FAQ after FAQ.... alot of it
is UNIX biased.... I don't have that option.... not yet..... ultimatley,
it will all be running on Solaris.... but for now.... NT. So if you have
some sites that tutor to NT people... please give me the links....

Thanks
Art



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

Date: 27 Aug 1998 15:26:28 -0400
From: Ala Qumsieh <aqumsieh@tigre.matrox.com>
Subject: Re: Perl version
Message-Id: <x3ylnoans4b.fsf@tigre.matrox.com>


dc@panix.com (David W. Crawford) writes:

> 
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> #!/usr/local/bin/perl5
> $ver_info = `perl -v`;
> print "$ver_info\n";
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> 
> dc:panix:~/perl>./ver.pl 
> 
> This is perl, version 4.0
> 
> $RCSfile: perl.c,v $$Revision: 4.0.1.8 $$Date: 1993/02/05 19:39:30 $
> Patch level: 36
> 
> Copyright (c) 1989, 1990, 1991, 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 4.0 source kit.
> 

I wonder how your perl executable is called 'perl5' and generates
version information for perl 4.0 ?? maybe inside your little (useless?)
program, you should have had:

$ver_info = `perl5 -v`;

-- 
Ala Qumsieh             |  No .. not Just Another
ASIC Design Engineer    |  Perl Hacker!!!!!
Matrox Graphics Inc.    |
Montreal, Quebec        |  (Not yet!)


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

Date: Thu, 27 Aug 1998 12:18:08 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Please Help Me With A RegX.
Message-Id: <MPG.104f50ca41388623989800@nntp.hpl.hp.com>

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

In article <q1hF1.5$nb7.44971@news3.voicenet.com> on Thu, 27 Aug 1998 
17:52:22 GMT, Matt Knecht <hex@voicenet.com> says...
> chad@gurucom.net <chad@gurucom.net> wrote:
> >Ok, I have 1 big long line and in that line there are many occuances of this
> >
> ><li><a href="Employment/"><b>Employment</b></a><em>
> >
> >I want to get everything from the <li> to the <em>, how might I go about this?
> 
> Assuming what you say is true (That all lines fit that format):
> 
> $line  = '<li><a href="Employment/"><b>Employment</b></a><em>';
> $stuff = substr $line, 4, length($line) - 8;

Read more closely.  '1 big long line' ... 'many occurrences' (modulo 
spelling).

@fields = $line =~ /(<li>.*?<em>)/g;

I am assuming 'everything from the <li> to the <em>' is inclusive; 
otherwise, the parentheses can be moved to exclude them.
 
-- 
(Yet Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


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

Date: 27 Aug 1998 19:02:00 GMT
From: stanley@skyking.OCE.ORST.EDU (John Stanley)
Subject: Re: Unreadable Scripts?
Message-Id: <6s4af8$kpa$1@news.NERO.NET>

In article <tqhF1.40$V5.321212@shore>,
Nathan V. Patwardhan <nvp@shore.net> wrote:
>Hmm.  Is it the case that people now subscribe, read and post to a
>newsgroup without reading its FAQ beforehand?  Something has changed!

Just for yucks, I checked out comp.answers. There is a modules faq
posted there. The moderated group's faq is there. All that I see for
this group is "How to find the FAQ", which gives a web reference.

What has changed is that people have forgotten that USENET access does
not imply web access does not imply ftp access ...

Yes, the whole Perl FAQ was posted here on the 5th, but apparently not
to comp.answers. Maybe the next time...



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

Date: Thu, 27 Aug 1998 19:41:38 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: Unreadable Scripts?
Message-Id: <SDiF1.52$V5.373521@shore>

John Stanley (stanley@skyking.OCE.ORST.EDU) wrote:

: Just for yucks, I checked out comp.answers. There is a modules faq
: posted there. The moderated group's faq is there. All that I see for
: this group is "How to find the FAQ", which gives a web reference.

ICK!  That's not good.  I'll ask someone to post it there next time.

: What has changed is that people have forgotten that USENET access does
: not imply web access does not imply ftp access ...

Then again, there are always the news.announce newsgroups -- which
people should read before diving in.

--
Nate Patwardhan|root@localhost
"Fortunately, I prefer to believe that we're all really just trapped in a
P.K. Dick book laced with Lovecraft, and this awful Terror Out of Cambridge
shall by the light of day evaporate, leaving nothing but good intentions in
its stead." Tom Christiansen in <6k02ha$hq6$3@csnews.cs.colorado.edu>


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

Date: Thu, 27 Aug 1998 12:23:21 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: When using CGI.pm to upload file I get extraneous data
Message-Id: <MPG.104f52068bb34d3a989801@nntp.hpl.hp.com>

In article <6s46t5$bnh@bgtnsc02.worldnet.att.net> on 27 Aug 1998 18:01:09 
GMT, Robert Watkins <r-watkinsNOSPAM@worldnet.att.net> says...
 ...
> My guess is that it has to do with \r's and \n's and writing the file under an 
> NT filesystem, but I don't know what the solution is.

Your guess is correct.  `perldoc -f binmode`.  Use it for each of the 
files.

Why, oh why, did the DOS folks inflict this torture on us way back when?  
My guess:  It was easier to write a TTY driver when both the '\r' and the 
'\n' were in the data, rather than have to interpret '\n' as Unix did.  
We have been paying for this sloth ever since.

-- 
(Yet Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


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

Date: 27 Aug 1998 19:06:43 GMT
From: gbacon@itsc.uah.edu (Greg Bacon)
Subject: Re: why no true/false keywords?
Message-Id: <6s4ao3$j0f$5@info.uah.edu>

In article <6s2g13$97v$1@client3.news.psi.net>,
	abigail@fnx.com (Abigail) writes:
: But is the use of TRUE/FALSE wrong in, for instance:
: 
: sub some_check_sub {
:     ....
:     if (condition) {
:         return FALSE;
:     }
:     ...
:     if (other condition) {
:         return TRUE;
:     }
:     ...
:     return FALSE;
: }

That locks &some_check_sub into only being useful in scalar context
because

    @vals = some_check_sub;
    if (@vals) {
        ...;
    }

will break when it returns FALSE.  Simple, unadorned C<return> is very
useful for this type of thing.

Greg
-- 
Usenet is like a herd of performing elephants with diarrhea; massive,
difficult to redirect, awe-inspiring, entertaining, and a source of
mind-boggling amounts of excrement when you least expect it.
    -- Gene Spafford


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

Date: 27 Aug 1998 19:22:37 GMT
From: gbacon@itsc.uah.edu (Greg Bacon)
Subject: Re: why no true/false keywords?
Message-Id: <6s4blt$j0f$7@info.uah.edu>

In article <6s2bnp$fbf$1@monet.op.net>,
	mjd@op.net (Mark-Jason Dominus) writes:
: In article <6s1q97$mlt$11@info.uah.edu>, Greg Bacon <gbacon@cs.uah.edu> wrote:
: >but if you want FORTRAN, you know where to find it.
: 
: I don't think they have that in FORTRAN:
: 
: 	IF X .EQ. Y .AND. Z .GE. 11 THEN GOTO 110
: 
: Maybe you are thinking of Pascal?

FORTRAN has booleans, no?  Isn't the result of a comparison a boolean?

: I always have to laugh when I see someone write
: 
: 	if ($condition == TRUE) ...
: 
: because I wonder why they didn't write 
: 
: 	if (($condition == TRUE) == TRUE) ...
: 
: instead.

Just imagine it in Lisp:

    (if (true (true (true (true (true ...

Maybe that's why they invented ] as a shortcut for close all parens. :-)

: To me, this is the reductio ad absurdem for Boolean constants.

Well, I could just turn right back around and prove by induction
that the absurdity is unnecessary. :-)

Greg, who learned FORTRAN with a compiler that spat out error messages
      auf Deutsch
-- 
I'd call you an asshole, but an asshole is worth fucking once in awhile.
    -- Kathy Thurber


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

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

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