[10718] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4317 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Nov 29 11:07:19 1998

Date: Sun, 29 Nov 98 08:00:25 -0800
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, 29 Nov 1998     Volume: 8 Number: 4317

Today's topics:
    Re: anything more robust than GIFgraph? <zenin@bawdycaste.org>
    Re: Awk to Perl (Matthew Bafford)
    Re: Awk to Perl (Tad McClellan)
    Re: Crypt command (Kal Kolberg)
    Re: Handling the last line of a file differently (123) <r_larsen@image.dk>
    Re: Handling the last line of a file differently (123) (Tad McClellan)
        how to delete from i. to j. line in a file (Cesar Romani)
    Re: how to delete from i. to j. line in a file (Abigail)
    Re: how to delete from i. to j. line in a file (Tad McClellan)
    Re: how to delete from i. to j. line in a file <garethr@cre.canon.co.uk>
        How to: know in cgi who's logged when using .htaccess <admin@citemedia.com>
        How to: know in cgi who's logged when using htaccess <admin@citemedia.com>
        How to: Know who login using .htaccess in cgi <admin@citemedia.com>
        How to: Know who login using .htaccess in cgi <admin@citemedia.com>
    Re: How to: Know who login using .htaccess in cgi (Jan)
    Re: How to: Know who login using .htaccess in cgi (Honza Pazdziora)
    Re: localtime () - perl's  bug ? <garethr@cre.canon.co.uk>
    Re: localtime () - perl's  bug ? (Larry Rosler)
    Re: Newbie question: Executing scripts under Win95 <Arved_37@chebucto.ns.ca>
    Re: Newbie: Search Engine birgitt@my-dejanews.com
    Re: Obfuscation of perl scripts <garethr@cre.canon.co.uk>
        Perl and Win32 (don`t laugh) <dan.e@apdo.com>
    Re: Please help me solve three CGI problem: Make Dir, C (Kal Kolberg)
    Re: Recursion jstrike@execpc.com
    Re: Running Perl scripts as NT services <carvdawg@patriot.net>
        top list <stmintz@yahoo.com>
    Re: Trouble using format (newbie) <merlyn@stonehenge.com>
        Where can I learn more about SQL with PERL? <oliverm@bway.net>
    Re: Where can I learn more about SQL with PERL? (Abigail)
        Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)

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

Date: 29 Nov 1998 13:03:49 GMT
From: Zenin <zenin@bawdycaste.org>
Subject: Re: anything more robust than GIFgraph?
Message-Id: <912344244.635752@thrush.omix.com>

[posted & mailed]

Michael S Vernal <vernal@fas.harvard.edu> wrote:
: Hi...  I'm need some kind of package that'll spew out nice looking
: graphs.  It's not for my own personal use--my company wants prettyness,
: not functionality.  Anyway, if there is anything more robust out there,
: other than GIFgraph, could you e-mail me?
:
: Alternatively, do you know of any other program I might be able to use
: to spew out simple but pretty bar graphs?  I want something resembling
: an Excel graph, but preferrably not a Microsoft solution.  Anyway,
: thanks...

	Checkout Matt Kruse's "Graph" module at:

		http://mkruse.netexpress.net/perl/

	It only does solid bar graphs, but they are *much* prettier then
	the ones GIFgraph produces.

-- 
-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: Sun, 29 Nov 1998 08:56:23 -0500
From: dragons@scescape.net (Matthew Bafford)
Subject: Re: Awk to Perl
Message-Id: <MPG.10cb1c946461c605989748@news.scescape.net>

In article <73qn81$qt3$1@cletus.bright.net>, ndatta@bright.net says...
=> I am currently reviewing learning Perl for Win32.  I was wondering if
=> someone could please give me an idea how the awk script shown below would be
=> implemented in Perl.
=> 
=> $awk '{system("DOS COMMAND "$1 $2);print $1" Done"}' FILE.TXT
=> 
=> I have been eyeing the O'Reilly book on Learning Perl at the local store and
=> would like an idea as to what kind of learning curve Perl entails.  I am
=> looking for some scripting language in common between Win32 and Unix.  I
=> currently have a little knowledge of ksh,awk,C.

Well, using a2p (included with Perl), you get (something similar to):

eval '$'.$1.'$2;' while $ARGV[0] =~ /^([A-Za-z_0-9]+=)(.*)/ && shift;
                        # process any FOO=bar switches

$, = ' ';               # set output field separator
$\ = "\n";              # set output record separator

while (<>) {
    ($Fld1,$Fld2) = split(' ', $_, 9999);
    system('DOS COMMAND ' . $Fld1 . $Fld2);
    print $Fld1 . ' Done';
}


But, that looks a little too messy... :)

You could go for the one-liner aproach:

perl -lnawe 'system("DOS COMMAND $F[0] $F[1]"); print "$F[0] Done"' FILE

Or, since you are using DOS:

perl -lnawe "system('DOS COMMAND' .$F[0].$F[1]); print $F[0] . ' Done'"

And if you prefer it in a file, you could use:

#!/usr/bin/perl -lwna
system("DOS COMMAND $F[0] $F[1]");
print "$F[0] Done";
__END__

And finally, you can eliminate the command line switches (-lna), and roll 
your own:

#!/usr/bin/perl -w
use strict;

my $DOS_COMMAND = "echo";

while(<>) {
    chomp;

    my ( $arg1, $arg2 ) = split " ";

    system("$DOS_COMMAND $arg1 $arg2");
    
    print "$arg1 Done\n";
}
__END__

=> Many thanks 

Hope This Helps!

=>             - Neil

--Matthew


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

Date: Sun, 29 Nov 1998 09:27:36 -0600
From: tadmc@flash.net (Tad McClellan)
Subject: Re: Awk to Perl
Message-Id: <85pr37.ono.ln@flash.net>

Neil Datta (ndatta@bright.net) wrote:
: I am currently reviewing learning Perl for Win32.  I was wondering if
: someone could please give me an idea how the awk script shown below would be
  ^^^^^^^

   There is some*thing* that can do that  ;-)


: implemented in Perl.

: $awk '{system("DOS COMMAND "$1 $2);print $1" Done"}' FILE.TXT


   Perl comes with a program named 'a2p' that translates awk scripts
   to Perl (though not in idiomatic Perl).


   Running it on your line above produces:

------------------------
eval 'exec /usr/bin/perl -S $0 ${1+"$@"}'
    if $running_under_some_shell;
                        # this emulates #! processing on NIH machines.
                        # (remove #! line above if indigestible)

eval '$'.$1.'$2;' while $ARGV[0] =~ /^([A-Za-z_0-9]+=)(.*)/ && shift;
                        # process any FOO=bar switches

$, = ' ';               # set output field separator
$\ = "\n";              # set output record separator

while (<>) {
    ($Fld1,$Fld2) = split(' ', $_, 9999);
    system('DOS COMMAND ' . $Fld1 . $Fld2);
    print $Fld1 . ' Done';
}
------------------------


The "meat" is the while() loop at the end.

Hope that helps!


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


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

Date: Sun, 29 Nov 1998 11:29:41 GMT
From: kkolberg@att.com (Kal Kolberg)
Subject: Re: Crypt command
Message-Id: <36612d3f.1332158421@news.netnews.att.com>

Bryan in response to your request let me try a little simpler
explaination than Tom supplied.

The crypt command in perl is typical of a hash command, a hash
basically takes some value, in this case your "password" and creates
another "faster" way of looking something up.

think of it this way, you have a letter 'a'  a hash is created for 'a'
which equals 1.   You have another letter 'b' it's hash is equal to 2
all is good so far, however say you have 2 letters 'aa'  their value
is 1 and 1, but with the hash you add those numbers together and get 2

When you "logon" to the system you can type 'aa' or 'b' the system
then run crypt against what you type in and compares it to your hash
value.   This is of course a very simplified version, once you start
working with hashes you usually start adding prime numbers to the
hash, the larger the better.  So for any value created by crypt, you
can actually have several different values that all create the same
crypt value.   

Now, what Tom is talking about Crypt(1) and Crypt(3) is if you are on
a UNIX system you should be able to look up the documentation of the
crypt command.  Try typing 'man crypt'.  If you are on a Windows
machine it won't help though.

Sincerely,
Kal Kolberg


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

Date: Sun, 29 Nov 1998 15:11:53 +0100
From: R. A. Larsen <r_larsen@image.dk>
Subject: Re: Handling the last line of a file differently (123)
Message-Id: <VA.0000008d.00778ab7@octo>

snowe@rain.org (Nick Halloway) wrote:
> 
> How can I tell if it's the last line of a file, when reading 
> lines from it?  Thanks.

I don't think you can, but you can make a buffer.

  my $line_last = <IN>;
  chomp $line_last;
  my $line_out = $line_last . " = ej sidste\n";
  while (my $line_in = <IN>) {
      chomp $line_in;
      print OUT $line_out;
      $line_out = $line_in . " = ej sidste\n";
      $line_last = $line_in;
  }
  # $line_last contains the last line
  print OUT $line_last , " = sidste\n";

This assumes that you want the last line even if it is empty. If 
you want the last line containing something you have to make an 
array containing the last lines you read.

Also look at perlfaq5:

  How do I change one line in a file/delete a line in a 
file/insert a line in the middle of a file/append to the 
beginning of a file?

I think the last lines can help you too.

I hope this helps

Reni
-- 
Using Virtual Access
http://www.vamail.com



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

Date: Sun, 29 Nov 1998 09:37:17 -0600
From: tadmc@flash.net (Tad McClellan)
Subject: Re: Handling the last line of a file differently (123)
Message-Id: <dnpr37.bpo.ln@flash.net>

Nick Halloway (snowe@rain.org) wrote:

: How can I tell if it's the last line of a file, when reading 
                             ^^^^^^^^^
: lines from it?


   You do a word search for 'last line' in the documentation
   that came with your Perl.



   If finds only six hits to look at.

   One of them, in the 'perlfunc' man page, is:

      "# insert dashes just before last line of last file"

   Looking that up to see its larger context finds an example
   of how to tell if it's the last line of a file:

--------------------
    # insert dashes just before last line of last file
    while (<>) {
        if (eof()) {            # check for end of current file
            print "--------------\n";
            close(ARGV);        # close or break; is needed if we
                                # are reading from the terminal
        }
        print;
    }
--------------------


   Work smart. 

   Use the docs and get the answer in about 20 seconds!

   ... or post to Usenet and wait a *whole lot* longer...



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


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

Date: 29 Nov 1998 10:33:32 GMT
From: romani_c@mailcity.com (Cesar Romani)
Subject: how to delete from i. to j. line in a file
Message-Id: <slrn7628ns.13ng.romani_c@rzaix05.rrz.uni-hamburg.de>


I haven't found anything about it in the FAQs.
You can do it with sed, but with perl, how?
I'd like to delete, for example, from the 3. line to the 10. line in a file
or from the 3. line to a line, which contains /pattern/.
many thanks in advance.

-- 
Cesar Romani
Hamburg, Germany


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

Date: 29 Nov 1998 12:44:03 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: how to delete from i. to j. line in a file
Message-Id: <73rfij$l9h$1@client3.news.psi.net>

Cesar Romani (romani_c@mailcity.com) wrote on MCMXVI September MCMXCIII
in <URL:news:slrn7628ns.13ng.romani_c@rzaix05.rrz.uni-hamburg.de>:
++ 
++ I haven't found anything about it in the FAQs.
++ You can do it with sed, but with perl, how?
++ I'd like to delete, for example, from the 3. line to the 10. line in a file
++ or from the 3. line to a line, which contains /pattern/.
++ many thanks in advance.


perl -i -wne '3 .. 10 or print' file



Abigail


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

Date: Sun, 29 Nov 1998 09:47:16 -0600
From: tadmc@flash.net (Tad McClellan)
Subject: Re: how to delete from i. to j. line in a file
Message-Id: <4aqr37.1so.ln@flash.net>

Cesar Romani (romani_c@mailcity.com) wrote:

: I haven't found anything about it in the FAQs.
: You can do it with sed, but with perl, how?
: I'd like to delete, for example, from the 3. line to the 10. line in a file


   while (<>) {
      print unless $. >= 3 && $. <= 10;  # skip lines 3 through 10
   }


: or from the 3. line to a line, which contains /pattern/.


   while (<>) {
      print unless $. == 3 .. /ten/;  # skip from line 3 until /ten/ is matched
   }


: many thanks in advance.


   You're welcome.


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


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

Date: Sun, 29 Nov 1998 15:26:31 GMT
From: Gareth Rees <garethr@cre.canon.co.uk>
Subject: Re: how to delete from i. to j. line in a file
Message-Id: <si1zmmr048.fsf@cre.canon.co.uk>

Cesar Romani <romani_c@mailcity.com> wrote:
> You can do it with sed, but with perl, how?
> I'd like to delete, for example, from the 3. line to the 10. line in a file
> or from the 3. line to a line, which contains /pattern/.
> many thanks in advance.

To edit the file FOO in place, deleting lines from the 3rd line to the
10th:

   perl -ni.bak -e 'print unless 3 .. 10' FOO

To edit the file FOO in place, deleting lines from the 3rd line to the
first line containing the pattern /pattern/:

   perl -ni.bak -e 'print unless 3 .. /pattern/' FOO

See "perldoc perlrun" for an explanation of the -n and -i command-line
options.

See "perldoc perlop" for an explanation of the .. operator.

-- 
Gareth Rees


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

Date: Sun, 29 Nov 1998 03:14:11 -0500
From: "Citimidia Internet" <admin@citemedia.com>
Subject: How to: know in cgi who's logged when using .htaccess
Message-Id: <36610252.5CD94268@citemedia.com>

Hi!

I permited some users to log into a specific directory using .htaccess.
When they are logged, how can I determine who log in to reuse the
username and
the password in my cgi script?

Maybe not so complicated!

Thank for any help

CIAO EVERYONE!

Sylvain



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

Date: Sun, 29 Nov 1998 03:23:27 -0500
From: "Citimidia Internet" <admin@citemedia.com>
Subject: How to: know in cgi who's logged when using htaccess
Message-Id: <3661047F.8C35AE31@citemedia.com>

Hi!

I permited some users to log into a specific directory using .htaccess.
When they are logged, how can I determine who log in to reuse the
username and
the password in my cgi script?

Maybe not so complicated!

Thank for any help

CIAO EVERYONE!

Sylvain



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

Date: Sun, 29 Nov 1998 03:06:26 -0500
From: "Citimidia Internet" <admin@citemedia.com>
Subject: How to: Know who login using .htaccess in cgi
Message-Id: <36610082.81AF2D0@citemedia.com>

Hi!

I permited some users to log into a specific directory using .htaccess.
When they are logged, how can I determine who log in to reuse the
username and
the password in my cgi script?

Maybe not so complicated!

Thank for any help

CIAO EVERYONE!

Sylvain






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

Date: Sun, 29 Nov 1998 03:08:40 -0500
From: "Citimidia Internet" <admin@citemedia.com>
Subject: How to: Know who login using .htaccess in cgi
Message-Id: <36610108.BE08F279@citemedia.com>

Hi!

I permited some users to log into a specific directory using .htaccess.
When they are logged, how can I determine who log in to reuse the
username and
the password in my cgi script?

Maybe not so complicated!

Thank for any help

CIAO EVERYONE!

Sylvain






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

Date: Sun, 29 Nov 1998 13:02:29 GMT
From: news@discovery.demon (Jan)
Subject: Re: How to: Know who login using .htaccess in cgi
Message-Id: <366141e4.3245789@news.demon.nl>

On Sun, 29 Nov 1998 03:08:40 -0500, "Citimidia Internet"
<admin@citemedia.com> wrote:

>Hi!
>
>I permited some users to log into a specific directory using .htaccess.
>When they are logged, how can I determine who log in to reuse the
>username and
>the password in my cgi script?
>

$ENV{'REMOTE_USER'} holds the username, I think the password can't be
determined. Anyone?



>Maybe not so complicated!
>
>Thank for any help
>
>CIAO EVERYONE!
>
>Sylvain
>
>
>
>

Jan
news@discovery.demon.nl

NOTE: Please add '.nl' to my e-mail address when replying!




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

Date: Sun, 29 Nov 1998 13:35:20 GMT
From: adelton@fi.muni.cz (Honza Pazdziora)
Subject: Re: How to: Know who login using .htaccess in cgi
Message-Id: <F36r2w.10J@news.muni.cz>

On Sun, 29 Nov 1998 03:06:26 -0500, Citimidia Internet <admin@citemedia.com> wrote:
> I permited some users to log into a specific directory using .htaccess.
> When they are logged, how can I determine who log in to reuse the
> username and
> the password in my cgi script?

	use CGI;
	my $q = new CGI;
	my $user = $q->remote_user();

-- 
------------------------------------------------------------------------
 Honza Pazdziora | adelton@fi.muni.cz | http://www.fi.muni.cz/~adelton/
		Boycott the Czech Telecom -- www.bojkot.cz
------------------------------------------------------------------------


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

Date: Sun, 29 Nov 1998 14:16:34 GMT
From: Gareth Rees <garethr@cre.canon.co.uk>
To: lr@hpl.hp.com (Larry Rosler)
Subject: Re: localtime () - perl's  bug ?
Message-Id: <si67byr3ct.fsf@cre.canon.co.uk>

Larry Rosler <lr@hpl.hp.com> wrote:
> sprintf('%.2d.%.2d.%.2d', $year % 100, $mon + 1, $mday), 

This look like a bug to me.  It prints "98.11.29", but the current year
is 1998, not 98.

-- 
Gareth Rees


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

Date: Sun, 29 Nov 1998 07:42:15 -0800
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: localtime () - perl's  bug ?
Message-Id: <MPG.10cb0b2d8df0ffdb989932@nntp.hpl.hp.com>

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

In article <si67byr3ct.fsf@cre.canon.co.uk> on Sun, 29 Nov 1998 14:16:34 
GMT, Gareth Rees <garethr@cre.canon.co.uk> says...
> Larry Rosler <lr@hpl.hp.com> wrote:
> > sprintf('%.2d.%.2d.%.2d', $year % 100, $mon + 1, $mday), 
> 
> This look like a bug to me.  It prints "98.11.29", but the current year
> is 1998, not 98.

In the Jewish calendar, the current year is named 5769, commonly 
referred to as 769, but neither of those *is* the current year, merely a 
representation of its name.  Similarly, 1998 is not the current year, 
nor is 98 -- they are merely representations of its name.

In the Gregorian calendar, the current year *is* a period of slightly 
more than 365.25 rotations of the Earth relative to the Sun, beginning 
when the Earth most recently reached a particular arbitrarily point in 
its orbit around the Sun, which we designate as 1 January 00:00:00 UTC 
or whatever (my current year started eight hours after yours did).

You may profit from a careful rereading of Lewis Carroll's little 
discourse on epistemology and semantics in 'Through The Looking-Glass':

  'The name of the song is called "Haddocks' Eyes".' 

  `Oh, that's the name of the song, is it?' Alice said, trying to feel 
interested. 

  `No, you don't understand,' the Knight said, looking a little vexed. 
`That's what the name is called. The name really is "The Aged Aged Man" 
 .' 

  `Then I ought to have said "That's what the song is called"?' Alice 
corrected herself. 

  `No, you oughtn't: that's quite another thing! The song is called 
"Ways and Means": but that's only what it's called, you know!' 

  `Well, what is the song, then?' said Alice, who was by this time 
completely bewildered. 

  `I was coming to that,' the Knight said. `The song really is "A-
sitting On a Gate": and the tune's my own invention.' 

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


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

Date: Sun, 29 Nov 1998 10:55:02 -0400
From: Arved Sandstrom <Arved_37@chebucto.ns.ca>
Subject: Re: Newbie question: Executing scripts under Win95
Message-Id: <Pine.GSO.3.95.iB1.0.981129104921.7805C-100000@halifax.chebucto.ns.ca>

I've used UltraEdit myself, and third the recommendation.

Incidentally, although MacPerl offers its own editing capability, most
programmers will use an external editor. Alpha, which is $30, has very
extensive support for Perl on the Mac. One can run text selections or
files. It uses AppleEvents to communicate with MacPerl. Overall, Alpha
compares very favourably with BBEdit.


On Sat, 28 Nov 1998 dturley@pobox.com wrote:

> I'll second this. if you are stuck on a windoze machine, this is the editor to
> use. The author offers excellent support and the product is great. I "live" in
> this editor
> 
> ??? I would say the upside is that it ONLY costs $30.00. Have you looked at
> the prices of other programmer's editors?.  BTW, BBEdit, a Mac OS
> programmer's editor that is just as great costs around $150!!!



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

Date: Sun, 29 Nov 1998 12:08:28 GMT
From: birgitt@my-dejanews.com
Subject: Re: Newbie: Search Engine
Message-Id: <73rdfr$4i$1@nnrp1.dejanews.com>

In article <oshq37.c3m.ln@flash.net>,
  tadmc@flash.net (Tad McClellan) wrote:
> Matthias Wiehl (hp-katalog@t-online.de) wrote:
>
> : I desperately need help with a search script written in perl.  I want to
> : use a script called "Search_Engine Script", available for download from
> : http://www.extropia.com/, to make it possible for visitors to my site to
> : search some of the files of my web site.
>
> : How do I get this script installed?


First of all you should be thankful for the kind and useful/rare
answer from Tad McClellan. Before I read his answer,
I was inclined to answer you this way:

1. Quit your ISP who seems to be T-online.de.
   Get one who offers you a shell account with cgi and some space.

2. Install on your home win95 PC a second OS, like Linux Suse Distribution
   or RedHat (you can keep your Win95 on the same PC.).
   Install a Webserver, like Apache. If you don't know how to do it,
   try looking for your next Linux User Group in your area. Buy a book
   about Webserver, Perl, Linux (look for O'Reilly books on all of these
   subjects) and learn how to program. :-)

3. Try to play yourself being an ISP and get your cgi script going
   to work on your own machine at home. Then install it on your
   real ISP's server.

4. Don't pay for an account on your ISP's server and your online time
   before you are ready to manage 1 to 3 of the abouve by yourself.

As this is a lot of work, understand that this newsgroup can't possibly
teach and answer you all the questions you will certainly have in going
through this process, it is here just for the Perl questions you might
have in the future, when writing your first programs by yourself.

Good luck.

Birgitt

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Sun, 29 Nov 1998 13:45:06 GMT
From: Gareth Rees <garethr@cre.canon.co.uk>
Subject: Re: Obfuscation of perl scripts
Message-Id: <si7lwer4t9.fsf@cre.canon.co.uk>

"Vlad Volkov" <vvolkov@benton.com> wrote:
> I work for a software consulting company whose clients are paying for
> delivered product - a set of routines that provides solution for
> certain business issue.  If the specification changes, we expect the
> client to come back with more work, not find somebody in-house to hack
> our source code.

If you are good at what you do, the client will come back to you,
because it is cheaper and more effective to get the original developers
to maintain the system that to hack on it in-house (and more likely to
result in robust, maintainable, bug-free code).

After all, even if you give away the source code, you probably don't
give away the CVS repository, issue-tracking system, software
development methodology, integrated development/testing environment,
test suites, design documents, training programme, clever programmers
and so on that have resulted in good code.

If you are not good at what you do, get your customers to sign an
agreement that they won't hack on your code.

If you're in the USA, you can just wait for the Digital Millennium bill
(or whatever it's called) to pass, since that includes measures making
it illegal to reverse-engineer someone else's program.

-- 
Gareth Rees


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

Date: Thu, 19 Nov 1998 02:11:50 +0100
From: "Dan Evans" <dan.e@apdo.com>
Subject: Perl and Win32 (don`t laugh)
Message-Id: <72vtsf$nvu$1@talia.mad.ibernet.es>

Ok, I am really new to perl, and this is the only perl NG my ISP carries.

My problem is this, I cant get perl scripts to run under win32 (95).

I have Apache 1.3.3, working, and Perl 5.00402 port for Win32, also working.

I can execute perl CGI files after running perl2bat.bat to change them to
 .bat files. But when I run  .cgi files through Apache, all I get is a HTML
document showing the cgi source.

It may be just that I have set the path after the #! wrong, but I have tried
all variations I can think of. The HTML files I am running are in directory:

d:\internet\apache\htdocs\djevans.com\

the cgi bin is loacted at:

d:.\internet\apache\htdocs\cgi-bin

and perl.exe is located at:

d:\internet\perl\bin\perl.exe

I know that perl files won't run under win32 and need to be turned into .bat
files, but presumably if perl is being run through a server this won't make
any difference, and according to the information I have been able to find, I
don't need to set permissions because of the way that win32 works.

I know that Linux would be better for this, but I am still waiting for the
disks to come.

Any Ideas?

TIA

Dan
--
Spammers take note.
US law allows SPAM, Spanish law does not.
Any unsoliceted mail will be subject to a
download and archive fee of 100,000 pesetas.
Just try it and see if I dont follow it up.




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

Date: Sun, 29 Nov 1998 11:11:42 GMT
From: kkolberg@att.com (Kal Kolberg)
Subject: Re: Please help me solve three CGI problem: Make Dir, Create file and frameset
Message-Id: <36612aa3.1331490171@news.netnews.att.com>

On Sun, 29 Nov 1998 15:41:41 +0800, William <msl1997@yahoo.com> wrote:

>
>Error statement:Premature end of script headers.
Snip
>>Error code: Many error are in here.

Snip
>Please help me!!

Snip
>Best Regards
>William

First, there is another newsgroup devoted to cgi and perl

Second, you are sending no information to stdout therefore the
webserver never receives information

Third, you made several major html coding errors and my suggest is
that you go back and learn how to use html.

Basically, you need to do a little work before you start asking simple
problems like this.  

Kal Kolberg
Alpharetta, Ga

PS.  <Flame on> sniping flame <Flame Off>



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

Date: Sun, 29 Nov 1998 14:14:41 GMT
From: jstrike@execpc.com
Subject: Re: Recursion
Message-Id: <73rkda$mdg@newsops.execpc.com>

Thanks, I appreciate the info.



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

Date: Sun, 29 Nov 1998 06:27:40 +0000
From: Marquis de Carvdawg <carvdawg@patriot.net>
Subject: Re: Running Perl scripts as NT services
Message-Id: <3660E95C.E2A46F42@patriot.net>

Thanks.  I got the answer from searching DejaNews...I have toget the
'srvany.exe' program from the resource kit...

Carv

> >Could someone point me to a FAQ that tells me how
> >to run my scripts as NT services?
>
> There is a little program named ServiceIt which is said to be able to
> make every program a NT service. It should be available from
> www.basta.com (it was about 4 weeks ago). You don't need anything else
> to use it.
>
> Daniel
>
> -----------------------
> Daniel Galbavy
> galbavy@stuttgart.nospam.de
> -----------------------
> nospam -> netsurf





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

Date: Sun, 29 Nov 1998 10:02:21 -0600
From: "Sean Mintz" <stmintz@yahoo.com>
Subject: top list
Message-Id: <73rqst$qhe$1@Masala.CC.UH.EDU>

hi

I am trying to make a top list (like top-ten top-twenty etc)
I have tried many ways to do it, but i am not successfuly.

Here's what the stuff to be in order looks like:

Barbarossa 1264
Galoob 1156

I need it to make a file that puts the numbers in order from
greatest to least. Like 10 9 8 7 6 5 4 3 2 1.

If you have any code or help you can offer me, please help ! :)

Thank you.

Sean Mintz <stmintz@yahoo.com>




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

Date: Sun, 29 Nov 1998 13:16:34 GMT
From: Randal Schwartz <merlyn@stonehenge.com>
Subject: Re: Trouble using format (newbie)
Message-Id: <8cd866ljvd.fsf@gadget.cscaper.com>

>>>>> "Paul" == Paul Deshaies <pauljr@nt.com> writes:

Paul> This is what I'm trying to do:
Paul> 	open (ORDER, ">>orders.info") || die"Could not open orders.info file";
Paul> 	write;
Paul> 	close ORDER;

Paul> format ORDER_TOP =
Paul> _____________________________________________________________________________
Paul> .
Paul> format ORDER = 
Paul> @<<<<<<<<<<<    @|||||||||||||||||||||||    @>>>>    @>>>>>>>>   
Paul> @>>>>>>>>>>
Paul> $uid,           $orderedDocument,           $quantite,$date,      $time
Paul> .

Paul> and this is the error I get:

Paul> Format not terminated in file upDateOrder.pl at line 359, next char ^?
Paul> Execution of upDateOrder.pl aborted due to compilation errors.

I'm betting that either or both of the lines that are supposed to have
a single dot, no additional whitespace, and then a newline are not
precisely that.

If you're on a system that doesn't have LF for a line terminator,
make sure you're saving the files (or uploading them) in a way that
doesn't mangle them by adding CR or something.

Also, as someone else pointed out, that "write" should be "write ORDER".

print "Just another Perl format hacker,"

-- 
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@teleport.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me


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

Date: Sat, 28 Nov 1998 14:40:27 -0500
From: Oliver Moffat <oliverm@bway.net>
Subject: Where can I learn more about SQL with PERL?
Message-Id: <366051AB.D6D5B06C@bway.net>

I've been using PERL to access a flat text file database via CGI.

I'm new to PERL and programming in general, but because Perl rules, I've
been able to do a lot of usefull things. However I'm not satisfied with
the performance of searches of our database from the internet. It runs
too slow. So I'm looking to learn more.

I've heard about MSQL, MySQL, PostGreSQL and the others, but, frankly, I
don't get it.

Where can I learn more about SQL? I've been kicking around the CPAN site
and haven't been able to find a link to a tutorial that makes any sense
to me. I need REAL beginner information. (Larry, Tom, and Randall have
all been over my head too)

I mean, what IS SQL? I have to install it, right? But I'm not the
SuperUser at our ISP so how will I do that? Do I have to use whatever is
already installed on the system? Or is it something I can run within my
own site?

Any suggstions would be apreciated.

Where's a good on-line beginners tutorial? (in HTML, please)

Any good books I can get at the Library or <groan>buy</groan>?



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

Date: 29 Nov 1998 12:53:20 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Where can I learn more about SQL with PERL?
Message-Id: <73rg40$l9h$2@client3.news.psi.net>

Oliver Moffat (oliverm@bway.net) wrote on MCMXV September MCMXCIII in
<URL:news:366051AB.D6D5B06C@bway.net>:
++ I've been using PERL to access a flat text file database via CGI.
++ 
++ I'm new to PERL and programming in general, but because Perl rules, I've
++ been able to do a lot of usefull things. However I'm not satisfied with
++ the performance of searches of our database from the internet. It runs
++ too slow. So I'm looking to learn more.
++ 
++ I've heard about MSQL, MySQL, PostGreSQL and the others, but, frankly, I
++ don't get it.
++ 
++ Where can I learn more about SQL? I've been kicking around the CPAN site
++ and haven't been able to find a link to a tutorial that makes any sense
++ to me. I need REAL beginner information. (Larry, Tom, and Randall have
++ all been over my head too)
++
++ I mean, what IS SQL? I have to install it, right? But I'm not the
++ SuperUser at our ISP so how will I do that? Do I have to use whatever is
++ already installed on the system? Or is it something I can run within my
++ own site?

SQL is a *language*. Set Query Language to be exact. It doesn't have
anything to do with Perl. (Perl is procedurial, SQL is set-relational).
You want to look in sql/database newsgroups for tutorials.

What CPAN gives you are interfaces between Perl and various database
managers. It gives you a way to specify a query and get the results in
your program. But for Perl, SQL queries are just strings. You have to
write your own SQL.

One doesn't install SQL, just like one doesn't put English on a bookshelf.
You might want to install a database server, a program that stores data
and knows how deal with queries.

As for installing, sometimes you need to be superusers, sometimes you don't.
But if the machine isn't yours, it doesn't hurt to talk to the ones in charge.

++ Any suggstions would be apreciated.
++ 
++ Where's a good on-line beginners tutorial? (in HTML, please)
++ 
++ Any good books I can get at the Library or <groan>buy</groan>?


One can get a set of Sybase manuals for around $1000. :)




Abigail


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

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

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