[11290] in Perl-Users-Digest
Perl-Users Digest, Issue: 4890 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Feb 13 23:07:30 1999
Date: Sat, 13 Feb 99 20:00:20 -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 Sat, 13 Feb 1999 Volume: 8 Number: 4890
Today's topics:
Re: "control-c" kills fork and script (I don't want thi <gellyfish@btinternet.com>
Re: "control-c" kills fork and script (I don't want thi (Ilya Zakharevich)
Re: [Query] Help with search and replace script. <apandey@u.washington.edu>
AWKYOU thanks all for replies <corlando@NOTpop.phnx.uswest.net>
Re: Calculate yesterdays date <gellyfish@btinternet.com>
Re: can't locate loadable object for module? <cw@dwc.ch>
Re: Comments in Perl code <mpersico@erols.com>
Re: Database integration in E-Commerce application? <stevenhenderson@prodigy.net>
Re: DBI.PM MS Access problem <gellyfish@btinternet.com>
Re: Entry widget <gellyfish@btinternet.com>
Re: Frustrating problem with Exporter <gellyfish@btinternet.com>
Re: General sort question jwmauney@yahoo.com
Re: General sort question <jdf@pobox.com>
Re: Graphs and gifs (Ilya Zakharevich)
Re: HELP stripping NEWLINE character <stevenhenderson@prodigy.net>
Re: Newbie Question <gellyfish@btinternet.com>
Re: Page of utilities for TeX in python ()
Re: Page of utilities for TeX in python (Joseph Hertzlinger)
parsing postscript for text? (David Efflandt)
Re: PERL for Personal Web Server <ringo6@worldnet.att.net>
Re: perl not always in /usr/bin/perl <gellyfish@btinternet.com>
Re: perl x- times an equal sentence <gellyfish@btinternet.com>
Re: Perl??? <gellyfish@btinternet.com>
Re: Red Haven - Manchester United <mpersico@erols.com>
Re: Shell access? <bgarrett@hamilton.net>
Re: Shell access? <gellyfish@btinternet.com>
Re: Shell access? <kswong@bigpond.com>
Re: syntax error I can't find? <ringo6@worldnet.att.net>
WIN32::GUI - Any progress? (David Hiltz)
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 14 Feb 1999 02:32:43 -0000
From: Jonathan Stowe <gellyfish@btinternet.com>
Subject: Re: "control-c" kills fork and script (I don't want this)
Message-Id: <7a5ckb$573$1@gellyfish.btinternet.com>
On Wed, 10 Feb 1999 23:03:14 GMT Martien Verbruggen wrote:
>
> Try stty -a on a unix system to see what the key mapping is. I don't
> know how to do it on a dos box.
>
As far as *I* know there is no way to do it on a DOS box. The mapping cant
be cahnged unless you want to get very dirty with the low-level stuff.
/J\
--
Jonathan Stowe <jns@btinternet.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: 14 Feb 1999 02:30:03 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: "control-c" kills fork and script (I don't want this)
Message-Id: <7a5cfb$181$1@mathserv.mps.ohio-state.edu>
[A complimentary Cc of this posting was sent to Bruce Hartley - TPS Consultant
<bruce.hartley@tivoli.com>],
who wrote in article <36C1FCA6.627DD1B0@tivoli.com>:
> I have commands coming back with pages of data I am forking a process
How?
> and piping the data to "more -c". The operators want to press ctrl-c
> when they have seen enough and the ctrl-c kills the fork and the script.
>
> I have traps in place
How?
> but the script still gets killed. Does anyone
> have any hints as to how I can get around this
Start with supplying enough info.
Ilya
------------------------------
Date: Sat, 13 Feb 1999 16:20:31 -0800
From: Anshuman Pandey <apandey@u.washington.edu>
To: RJDsys@world.std.com
Subject: Re: [Query] Help with search and replace script.
Message-Id: <Pine.OSF.4.05.9902131617430.23913-100000@saul3.u.washington.edu>
On Sat, 13 Feb 1999 RJDsys@world.std.com wrote:
> You need to learn about regular expressions, read "man perlre".
>
> In a pattern, "(.)" matches a single character. You probably want
> something like "(\d+)" to match one or more digits.
Thank you for your advice! That does the trick. I figured out the above
after I checked out "Pattern Matching" in "Perl in 21 Days". Sorry for
the premature post.
Regards,
Anshuman Pandey
------------------------------
Date: Sat, 13 Feb 1999 20:34:21 -0700
From: "AWKYOU" <corlando@NOTpop.phnx.uswest.net>
Subject: AWKYOU thanks all for replies
Message-Id: <36c643f7.0@news2.uswest.net>
I'm going to try all the approaches I received from Tad, Abigail, JW.
Thank you all very much.
Maybe some day I'll be good enough with this stuff to help others like
you've helped me.
Until then....I'll live by the immortal words of the philosopher Harry
Callahan "A man's got to know his limitations".
------------------------------
Date: 11 Feb 1999 21:42:10 -0000
From: Jonathan Stowe <gellyfish@btinternet.com>
Subject: Re: Calculate yesterdays date
Message-Id: <79viri$2gn$1@gellyfish.btinternet.com>
In comp.lang.perl.misc Larry Rosler <lr@hpl.hp.com> wrote:
>
<snip>
>
> What I would like to see is a dynamic on-line equivalent of the kind of
> code published in The Perl Cookbook, contributed to and reviewed
> collaboratively, and with a searchable index. Such collections exist
> for modules (on CPAN), and for complete programs elsewhere (often
> maligned here for their style or quality). The Perl Journal often
> publishes useful one-liners.
>
> How about an archive (in CPAN?) of 'small' functions or snippets, from
> one line to one page of code? I wouldn't be able to organize it, but I
> certainly would be able to contribute.
>
I had thought something similar - especially when I find myself trotting
out the same examples every now and then to post here - I havent find the
time unfortunately but I do fully intend the hundred or so reusable examples
to find their way onto a website or something.
I think this is basically a good idea - but I fear that if it is left
as something *that should be done* it will get bogged down in endless debate
( see the scripts archive discussion on the advocacy mailing list).
Lets just go for it and then collect it all together somewhere - I'll
get back on this.
/J\
/J\
--
Jonathan Stowe <jns@btinternet.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: Sun, 14 Feb 1999 03:22:54 +0100
From: Werns <cw@dwc.ch>
Subject: Re: can't locate loadable object for module?
Message-Id: <36C6337E.FE1CDC84@dwc.ch>
dubing@lisco.com wrote:
>
> My perl script need to:
>
> use Net::LDAPapi;
use Mozilla::LDAP::*;
is more up-to-date.
http://www.mozilla.org/directory/faq/perldap-faq.html and
http://developer.netscape.com/tech/directory/?content=programmer_guide.htm
have more info.
-w
------------------------------
Date: Sat, 13 Feb 1999 21:35:33 -0500
From: "Matthew O. Persico" <mpersico@erols.com>
Subject: Re: Comments in Perl code
Message-Id: <36C63675.8B08F2B5@erols.com>
Russ Allbery wrote:
>
> Matthew O Persico <mpersico@erols.com> writes:
>
> > I'm using cperl-mode 4.19 and I almost cannot break it. Lord knows I've
> > tried. But every time I think it's messed up the indenting or font
> > coloring it has turned out to be a typo or a construct that didn't make
> > it through perl -c.
>
> > Except for one tiny thing that drives me nuts.
>
> > Pod.
>
> > No let me rephrase that.
>
> > Possessives in pod. As in:
>
> > this function's arguments.
>
> > cperl 4.19 reads that as a string start and I get all green text until
> > the next random possessive in my pod.
>
> What version of emacs are you using? I think this is one of the things
> that supposed to be fixed by the improved character scanning support in
> 20.3 (I have the same problem, and even more annoyingly have it with
> possessives in heredocs, which make cperl-mode think everything after that
> is still in a string, but that's because I'm still using an unpatched
> 19.34 because I don't want to apply patches to it and because I utterly
> detest MULE).
>
XEmacs 21.2.10
:-)
With no Mule support AFAIK
> --
> #!/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
--
Matthew O. Persico
http://www.erols.com/mpersico
http://www.digistar.com/bzip2
------------------------------
Date: Sat, 13 Feb 1999 19:56:26 -0600
From: "Steven T. Henderson" <stevenhenderson@prodigy.net>
Subject: Re: Database integration in E-Commerce application?
Message-Id: <uPrx2.54765$641.92971@news.san.rr.com>
hmmm. sounds like you need some dynamic output, which is different than
DHTML.
basically, you have a static HTML file that contains the general format of
your page that you want to display. you never reference this HTML file
directly rather you have a perl script run it through a parsing engine that
would substitute the general settings and options and pulldowns and whatnot
with your 'real' data.
i use several different parsing engines and are available in many different
places. the original one i got off a floppy from a perl 4 book on the
bargain rack ($9.95 i believe).
this is at least how i did it and check out www.stevenhenderson.com to see
it in use in several different applications. enjoy.
Adi Gabbai wrote in message <36C5B774.657FF9CB@NetVision.net.il>...
>Hi,
>I am looking for a convenient and easy way to 'pull' database
>information from my HTML.
>The thing is, I wanna design an E-Commerce site. The main page
>for example, will include, several products. Now instead of manuall,
>playing around the page, and MANUALLY putting properties of products,
>their names, their, IMG SRC pic, I wanna, just refer them from my
>HTML page with something like:(I wish it could be that easy):
><H3><PRODCUTS SN:1002.LABEL></H3> <- That whould take the label field
> from my database for the 1002.
>
><IMG SRC=PRODUCTS SN:1002.PIC> <- That would take the picture
> of the product.
>The price is: <PRODUCTS SN:1002.PRICE <-That would show the price
>
>-----------------------------------------------------------
>Well, you get the picture.
>I just finished reading a 600pages book on Web development,
>and i want to create an e-commerce site by my self.
>(Not a program that will do it for me!)
>I am unsure, if the way to do it, is using perl cgi-scripts
>or .ASP scrips.
>
>If someone, could help me, I would very much appreciate it.(-:
------------------------------
Date: 14 Feb 1999 00:18:29 -0000
From: Jonathan Stowe <gellyfish@btinternet.com>
Subject: Re: DBI.PM MS Access problem
Message-Id: <7a54ol$4tk$1@gellyfish.btinternet.com>
On Fri, 12 Feb 1999 13:40:55 GMT Clay Reimer wrote:
> I am wondering if anyone has run accross the following problem.
> My perl script is trying to retrieve data from an MS Access database.
> If the field type is text then the script can get the data. If the
> field type is memo then, fields above a certain length are not
> retreived. Is there some way around this? Can I retreive these longer
> (3-4 line) memo fields into a variable?
>
IMO this kind of data is the work of the devil - generally I put things
like this into a separate table with a convenient sized field for each
line with a sequence number linked to the main table by some key. Memo
fields as I recall are some kind of peculiar BLOB that may well not be
handled well by DBI under all circumstances.
/J\
--
Jonathan Stowe <jns@btinternet.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: 14 Feb 1999 00:36:53 -0000
From: Jonathan Stowe <gellyfish@btinternet.com>
Subject: Re: Entry widget
Message-Id: <7a55r5$4tn$1@gellyfish.btinternet.com>
On 9 Feb 1999 04:45:10 GMT Kbulgakov wrote:
> How does the program determine what text the user entered?
> and how does the program determines when the user has finished entering text?
What text, entered how and where ?
Generally when one has :
$var = <STDIN>;
then the program 'knows' that the user has finished entering text when
the enter key is pressed.
Alternatively if as I gather from your subject line you are talking about
Tk then you should consult the documentation for this moodule or perhaps
even go to the comp.lang.perl.tk group.
/J\
--
Jonathan Stowe <jns@btinternet.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: 14 Feb 1999 01:55:17 -0000
From: Jonathan Stowe <gellyfish@btinternet.com>
Subject: Re: Frustrating problem with Exporter
Message-Id: <7a5ae5$54a$1@gellyfish.btinternet.com>
In comp.lang.perl.misc Tom Williamson <tomw@action.cnchost.com> wrote:
> Greg -
>
> Many thanks. I am still struggling with this; I have spent most of the
> morning wrestling with the documentation trying to extract additional
> information on the Exporter module. It now seems fairly straightforward, I
> just can't get it to work!
Right lets get this straight then - this is Exptest.pm :
package Exptest;
require Exporter;
@ISA = qw(Exporter);
@EXPORT = qw($Blah $Woof);
$Blah = "Blah Blah Blah Blah";
$Woof = "Woof Woof Woof Woof";
1;
__END__
And this is a program that uses it :
#!/usr/bin/perl
use Exptest;
print $Blah,"\n";
print $Woof,"\n";
__END__
And all of this works as expected.
Got that ?
/J\
--
Jonathan Stowe <jns@btinternet.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: Sat, 13 Feb 1999 23:50:26 GMT
From: jwmauney@yahoo.com
Subject: Re: General sort question
Message-Id: <7a5341$6fr$1@nnrp1.dejanews.com>
In article <36c515dc.0@news2.uswest.net>,
"AWKYOU" <corlando@NOTpop.phnx.uswest.net> wrote:
> Given the following as input from a text file:
>
> 20555 red green 1000 250
> 4678 blue yellow 500 10004
> 20555 red green 850 200
> etc etc etc etc etc
>
> How do I sum the last 2 fields by the first 3?
>
> in other words I want the end report to display
>
> 20555 red green 1850 450
>
#!/usr/bin/perl -w
use strict;
my ($f1, $f2, $f3, $f4, $f5, $temp, %base_hash);
# use field1~field2~field3 as key; [ sum_field4, sum_field5 ] as value;
while (<DATA>) {
last if eof();
chomp;
($f1, $f2, $f3, $f4, $f5) = split /\s+/; # Split on whitespace
$temp = join '~', $f1, $f2, $f3; # Make compound key
if (exists $base_hash{$temp}) { # Key in hash?
$base_hash{$temp}->[0] += $f4; # Add to field4 sum
$base_hash{$temp}->[1] += $f5; # Add to field5 sum
} else { # No
$base_hash{$temp}->[0] = $f4; # Initialize field4 sum
$base_hash{$temp}->[1] = $f5; # Initialize field5 sum
}
}
foreach $temp (keys %base_hash) { # Get compound keys
($f1, $f2, $f3) = split /~/, $temp; # Break into fields
print "$f1\t$f2\t$f3\t",
$base_hash{$temp}->[0], "\t", # Sum of field4
$base_hash{$temp}->[1], "\n"; # Sum of field5
}
__END__
20555 red green 1000 250
4678 blue yellow 500 10004
20555 red green 850 200
#----------------------- End of Program -------------------#
Output:
$ usenet32a.pl
4678 blue yellow 500 10004
20555 red green 1850 450
Not a Perl guru but HTH anyway.
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: 13 Feb 1999 19:32:21 -0500
From: Jonathan Feinberg <jdf@pobox.com>
To: jwmauney@yahoo.com
Subject: Re: General sort question
Message-Id: <m3yam16d0q.fsf@joshua.panix.com>
jwmauney@yahoo.com writes:
> while (<DATA>) {
> last if eof();
This is a bug, as it causes the last line of input to be skipped. The
loop will terminate properl when the DATA filehandle runs out. No
need to explicitly test eof().
> if (exists $base_hash{$temp}) { # Key in hash?
> $base_hash{$temp}->[0] += $f4; # Add to field4 sum
> $base_hash{$temp}->[1] += $f5; # Add to field5 sum
> } else { # No
> $base_hash{$temp}->[0] = $f4; # Initialize field4 sum
> $base_hash{$temp}->[1] = $f5; # Initialize field5 sum
> }
Not necessary, as the elements will autovivify as required when you
increment them. All you need is love and
$base_hash{$temp}->[0] += $f4; # Add to field4 sum
$base_hash{$temp}->[1] += $f5; # Add to field5 sum
> Output:
> $ usenet32a.pl
> 4678 blue yellow 500 10004
> 20555 red green 1850 450
These results are not possible with the code as posted. Perhaps you
had an extra newline in your data?
--
Jonathan Feinberg jdf@pobox.com Sunny Brooklyn, NY
http://pobox.com/~jdf
------------------------------
Date: 14 Feb 1999 00:32:29 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: Graphs and gifs
Message-Id: <7a55it$t6d$1@mathserv.mps.ohio-state.edu>
[A complimentary Cc of this posting was sent to Michael Taylor
<ringo6@worldnet.att.net>],
who wrote in article <7a51vs$69g@bgtnsc03.worldnet.att.net>:
> Try GNU plot man, it's freeware like all the other GNU stuff
If you mean gnuplot, then it is not GNU stuff, and not GNU plot.
> It's very, very flexible, especially when
> combined with a freeware program called ImageMagik that lets you convert the
> .pbm files to gif's, jpeg, whatever. Not sure if it's robust enough for
> everything you wanna do, but it'll come close.
gnuplot can output gif and png directly (provided the build machine
had the necessary libraries).
Ilya
------------------------------
Date: Sat, 13 Feb 1999 19:59:42 -0600
From: "Steven T. Henderson" <stevenhenderson@prodigy.net>
Subject: Re: HELP stripping NEWLINE character
Message-Id: <ySrx2.54767$641.93119@news.san.rr.com>
>I am using s/\n/<br>/sg;
try it without the trailing 's' (right before the 'g').
------------------------------
Date: 14 Feb 1999 02:34:39 -0000
From: Jonathan Stowe <gellyfish@btinternet.com>
Subject: Re: Newbie Question
Message-Id: <7a5cnv$576$1@gellyfish.btinternet.com>
On Wed, 10 Feb 1999 22:36:39 -0600 Bob Carl, Jr wrote:
> Working with Perl for first time:
>
> When running, I error out with illegal carriage return \015
>
> It says I should strip them out. How?
>
You transfer the file to your unix box using ASCII mode in your
FTP or use some facility to convert the file on the unix machine.
/J\
--
Jonathan Stowe <jns@btinternet.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: 14 Feb 1999 01:39:18 GMT
From: jhertzli@oemcomputer.foo.bar ()
Subject: Re: Page of utilities for TeX in python
Message-Id: <7a59g6$e5e@dfw-ixnews9.ix.netcom.com>
In article <slrn7c136j.b51.thor@localhost.localdomain>,
Manuel Gutierrez Algaba wrote:
>In http://www.ctv.es/USERS/irmina/texpython.htm
>you have a nice collection of utilities for producing TeX document.
>
>Specially for programers
>
>Thanks
>
Is there a similar collection of TeX utilities in Perl?
------------------------------
Date: 14 Feb 1999 02:09:50 GMT
From: jhertzli@ix.netcom.com(Joseph Hertzlinger)
Subject: Re: Page of utilities for TeX in python
Message-Id: <7a5b9e$iht@sjx-ixn6.ix.netcom.com>
In <7a59g6$e5e@dfw-ixnews9.ix.netcom.com> jhertzli@oemcomputer.foo.bar
() writes:
I'm still not sure how to work slrn right.
------------------------------
Date: 14 Feb 1999 01:25:39 GMT
From: efflandt@xnet.com (David Efflandt)
Subject: parsing postscript for text?
Message-Id: <slrn7cc9eo.1e9.efflandt@efflandt.xnet.com>
Linux StarOffice 5.0 seems to be missing something needed to fax. It
sends the postscript output to STDIN of sfax.bin (which does not exist).
So I am writing a substitute sfax.bin perl script to parse a fax number
out of the ps to pass on to efax set up as a normal printer.
But doc text in ps is hex (or is it ocatal). so I am looking for the
best way to convert that to text. I think there should be a way to do
this with pack or unpack, but the perldocs have nothing on hex to ascii
conversion other than chr(). The following test works, but I thought
there might be a function for this:
#!/usr/bin/perl
$file = "testfax.ps";
open(IN, "<$file");
@lines = <IN>;
close IN;
while (@lines) {
$_ = shift @lines;
if (/^\<(\w+)\>/) {
$line = $1;
$text = '';
# convert to ascii, is there a better way?
while ($line) {
($chr, $c2, $line) = split(//, $line, 3);
$chr .= $c2;
$text .= chr(hex($chr));
}
print "$text\n";
}
}
--
David Efflandt efflandt@xnet.com
http://www.xnet.com/~efflandt/
------------------------------
Date: 14 Feb 1999 02:59:20 GMT
From: "Michael Taylor" <ringo6@worldnet.att.net>
Subject: Re: PERL for Personal Web Server
Message-Id: <7a5e68$4nu@bgtnsc03.worldnet.att.net>
Wow...I really can't help you with the Microsoft Personal Web server, but
since I think it sucks I'll throw you a curve. There currently is a port of
Apache that runs on WIN32 machines. I have successfully installed it on
both NT4.0+ and WIN95/98 boxes. With Apache, you can edit the .conf files
to specify that it understands certain file extensions, like .cgi.
If you have the cgi.pm module installed, (and you do based on your version
of Perl) then you can run any web scripts by hand. Simply run the script
like you normally would,say from a DOS prompt, and hand enter each
name/value pair. Then CTRL+Z to run it from the command line.
I know this doesn't really answer your question, but since Apache is better
than Microshaft's PWS, and is still free, maybe it will help. (Then again,
maybe you can edit the configuration files in Microsoft's PWS too....)
Good luck.
Mangesh Sangapu wrote in message <36C1F7D6.28AD@hotmail.com>...
>okay.. i'm trying to figure out how to use PERL on the Microsoft
>Personal Web Server which came with my Win98 CD.
>
>i've downloaded ActiveState's Perl for Win95/NT.. and i've downloaded
>perl5_00402-bindist04-bc.zip... all i want to know is how do i actually
>use it.. setups/configurations.. etc..
>
>all the faq's i read seem to have a lot about PERL itself, but i haven't
>seen much about actually running it on win95/98
>
>i know you type in perl whatever.pl to test a script, but how would i
>run it on my Personal Web Server... and what are all the security
>hassles i may encounter...
>
>basically, does anyone know a good page for PERL-newbies that will
>explain to me in SIMPLE ENGLISH what i described above.
>
>thanks a bunch.
>mangesh
------------------------------
Date: 14 Feb 1999 01:23:13 -0000
From: Jonathan Stowe <gellyfish@btinternet.com>
Subject: Re: perl not always in /usr/bin/perl
Message-Id: <7a58i1$53d$1@gellyfish.btinternet.com>
On 13 Feb 1999 23:27:49 GMT Michael Taylor wrote:
> You could also just create a dummy file, or symbolic link called
> /usr/bin/perl that points to wherever perl really is. That's a simple Unix
> solution to the problem.
>
Except the original poster said :
> I have been been distributing a group of Perl scripts I have written to
> various Unix machines where the perl executable is not in /usr/bin/perl
> and I don't have permissiont o make a soft link to its actual location.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
So that is apparently not an option. Like was said using env could be a
solution but it might not be portable to all varieties of Unix. Some
systems also will allow you to simply put:
#!perl
and the interpreter will be found in the path but that cannot be said to
be portable at all.
A better solution which would locate the perl on the platform and edit
the program file inplace to reflect the location of this perl.
/J\
--
Jonathan Stowe <jns@btinternet.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: 14 Feb 1999 01:58:34 -0000
From: Jonathan Stowe <gellyfish@btinternet.com>
Subject: Re: perl x- times an equal sentence
Message-Id: <7a5aka$54d$1@gellyfish.btinternet.com>
On Thu, 11 Feb 1999 08:29:33 GMT simc@gmx.net wrote:
>
> maybe ... the webserver is configured wrong ... ?
>
Ah.
/J\
--
Jonathan Stowe <jns@btinternet.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: 14 Feb 1999 00:07:05 -0000
From: Jonathan Stowe <gellyfish@btinternet.com>
Subject: Re: Perl???
Message-Id: <7a5439$4tg$1@gellyfish.btinternet.com>
On Sat, 13 Feb 1999 23:16:31 GMT John wrote:
> I no nothing about perl but have been looking at many source
> examples. One thing I can't understand. Surely perl must be compiled,
> or does it just get executed like the old basic? No where has anyone
> mentioned anything about compiling the examples nor where to get a perl
> compiler. Please email an answer also. Thanks.
You need to read some more :-}
Perl *is* compiled but it is compiled at every execution (except in some
special environments), thus it is not interpreted in the manner of BASIC
where each line of the code is read in turn and executed but whilst it
may appear to be interpreted in the sense that it is the source code that
is passed to an 'interpreter' however it is an internally compiled program
that is run.
Perl for a variety of platforms can be found via:
<http://www.perl.com/>
/J\
--
Jonathan Stowe <jns@btinternet.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: Sat, 13 Feb 1999 21:39:37 -0500
From: "Matthew O. Persico" <mpersico@erols.com>
Subject: Re: Red Haven - Manchester United
Message-Id: <36C63769.23AEBB97@erols.com>
Oh man, don't start this. All we need is a few college hoops manics, Da
Bears, Da Bulls, Ranger blue-seaters (I was in the blue seats June 14,
1994, I can throw this stone) and all of a sudden we're in a sports-talk
radio war zone.
Take it somewhere else, guys.
Jonathan Stowe wrote:
>
> On Thu, 11 Feb 1999 18:17:46 +0800 Linus Koh wrote:
> > Do visit my new Manchester United site
> > http://web.singnet.com.sg/~jopaloli/mufc.htm
> >
>
> I dont think so - if you'd done some research you'd have discovered
> that we're all 'Palace supporters ...
>
> /J\
> --
> Jonathan Stowe <jns@btinternet.com>
> Some of your questions answered:
> <URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
> Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
--
Matthew O. Persico
http://www.erols.com/mpersico
http://www.digistar.com/bzip2
------------------------------
Date: Sat, 13 Feb 1999 18:32:38 -0800
From: Bill Garrett <bgarrett@hamilton.net>
To: Jonathan Feinberg <jdf@pobox.com>
Subject: Re: Shell access?
Message-Id: <36C635C4.70735F85@hamilton.net>
What good is it going to do though to have linux but not perl??
Jonathan Feinberg wrote:
> Bill Garrett <bgarrett@hamilton.net> writes:
>
> > I have just started to learn perl programming and didn't have access
> > to a unix shell. I was wondering if anyone knew where to get a unix
> > shell account for free.
>
> Sure! Install a free unix-like operating system on your own computer.
> I use Linux, others go for FreeBSD, NetBSD, what have you. You might
> want to find a local user group for your system of choice, and offer
> beer to them to help you install and configure whatever you choose.
>
> I looked at your headers, and it *seems* you're running Windows 3.1,
> so you're out of luck as far as running running Perl under your
> current OS goes. But if you're in fact using Windows 95/98/NT then
> you can run Perl without a "unix shell".
>
> http://www.activestate.com/
>
> > Would anyone consider letting me have access to there unix shell
> > account?
>
> If so, would you give me their phone numbers? I've got a bridge to
> sell.
>
> --
> Jonathan Feinberg jdf@pobox.com Sunny Brooklyn, NY
> http://pobox.com/~jdf
> need i say which bridge?
------------------------------
Date: 14 Feb 1999 01:33:40 -0000
From: Jonathan Stowe <gellyfish@btinternet.com>
Subject: Re: Shell access?
Message-Id: <7a595k$53g$1@gellyfish.btinternet.com>
On Sat, 13 Feb 1999 18:32:38 -0800 Bill Garrett wrote:
> What good is it going to do though to have linux but not perl??
>
Well for aa start most recent Linux distributions have Perl already
installed and a web server and so on and so forth. The version of Perl
may not be the latest but that is easily remedied because all but the most
microscopic distributions of Linux also include all of the tools required
to build a new Perl from the distribution files (unless of course you
choose not to install the development tools which would be a mistake).
Installing Linux is not difficult if you get a reasonable distribution
and is probably more amenable to learning about Perl than having to deal
with the restrictions imposed by the sysadmin of some system on which
you might get a shell account.
Believe me it will be easier to get Linux on to some machine than persuade
someone to give you an unrestricted shell account on their box.
/J\
--
Jonathan Stowe <jns@btinternet.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: Sun, 14 Feb 1999 13:08:38 +1100
From: Ka-shu Wong <kswong@bigpond.com>
Subject: Re: Shell access?
Message-Id: <Pine.LNX.4.03.9902141304200.345-100000@goose>
On Sat, 13 Feb 1999, Bill Garrett wrote:
> What good is it going to do though to have linux but not perl??
Perl comes standard with most Linux distributions, and is usually
installed as part of the base installation.
This means that if you have Linux installed you probably also have Perl
installed as well.
KS
------------------------------
Date: 14 Feb 1999 03:05:38 GMT
From: "Michael Taylor" <ringo6@worldnet.att.net>
Subject: Re: syntax error I can't find?
Message-Id: <7a5ei2$6gg@bgtnsc03.worldnet.att.net>
Hehe, well, lots or responses to this one man, but in short:
Use elsif in your loop, and use eq instead of == when working with strings.
That should fix your problem.
Luck.
ringo@ringos-world.com
John G wrote in message <36c346a3.14194921@news.ma.ultranet.com>...
>Hello all,
>I am having a problem with a cgi script I am writing for my website,
>that I can't figure out. I get a syntax error on line 26 near "else
>if". Here is the relevant code snippet: (I am adding line numbers
>for clarification)
>
>
>## Question 1
>23:if (($in{a1pattern1} == "splash") && ($in{a1pattern2} == "none")) {
>24: ++$total;
>25: $anwsers[0] = 0;
>26:} else if ((($in{a1pattern1} == "splash") && ($in{a1pattern2} !=
>"none")) || ($in{a1pattern2} == "splash")) {
>27: $total += .5;
>28: $anwsers[0] = .5;
>29:} else {
>30: $anwsers[0] = 1;
>31:}
>
>Any help someone could give would be much appreciated.
>TIA
>-John
------------------------------
Date: 14 Feb 1999 00:38:54 GMT
From: dhiltz@whsun2.whoi.edu (David Hiltz)
Subject: WIN32::GUI - Any progress?
Message-Id: <7a55uu$nnf1@dilbert.whoi.edu>
Anybody know when a new version of Win32::GUI will be updated?
Thanks
-David Hiltz
------------------------------
Date: 12 Dec 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Special: Digest Administrivia (Last modified: 12 Dec 98)
Message-Id: <null>
Administrivia:
Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing.
]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body. Majordomo will then send you instructions on how to confirm your
]subscription. This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V8 Issue 4890
**************************************