[6327] in Perl-Users-Digest
Perl-Users Digest, Issue: 949 Volume: 7
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Feb 14 14:17:43 1997
Date: Fri, 14 Feb 97 11:00:26 -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 Fri, 14 Feb 1997 Volume: 7 Number: 949
Today's topics:
'--' on command line (Bill Hliwa)
Re: ANNOUNCE: GIFgraph 0.9 (Larry W. Virden)
assigning variables (DDJack59)
Re: assigning variables <jbb6@acpub.duke.edu>
Re: Case insensitive comparison <rootbeer@teleport.com>
Re: Case insensitive comparison (Jot Powers)
Re: Counting values within a file (Ken Williams)
Re: Escaping \u in a string <tchrist@mox.perl.com>
Re: How to open an HTTP connection with PERL ? <rootbeer@teleport.com>
HOW TO SPLIT A SIMPLE STRING (Adam M. Donahue)
Is there a way to get stat() via ftp? <ragoff@sandia.gov>
libwww installation problems under SCO V <jeffs@pop3.silverplatter.com>
Re: MLDBM issues (Ken Williams)
Multi OS GUI module? <rob@flnet.nl>
Re: Multi OS GUI module? (Nathan V. Patwardhan)
Re: OK I know that I am a newbie But I need HELP!! (Albert W. Dorrington)
Re: opening a file in a Recursive Call (Perl Question) (Petr Prikryl)
Re: Perl Compiler for a large project (Steven L. Kunz)
Perl question, re: POSIX setpgrp <chrisv@on.bell.ca>
Re: Perl script debug help <rootbeer@teleport.com>
Re: Porting Perl from UNIX to NT (Isabelle A. Melnick)
Re: Porting Perl from UNIX to NT (Jagadeesh Venugopal)
Digest Administrivia (Last modified: 8 Jan 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 14 Feb 97 08:49:20
From: bill@medtechnet.com (Bill Hliwa)
Subject: '--' on command line
Message-Id: <402_9702141015@medtechnet.com>
I have a number of cgi scripts. Most begin with:
#!/usr/bin/perl
There are some, however, that will not run unless '--' is appended to this
line, as:
#!/usr/bin/perl --
I can't seem to find a reference to this. What does the '--' command line
argument do?
==============================================================================
Bill Hliwa Med TechNet Online Services | Clinical Laboratory Education
bill@medtechnet.com Box 84 | Modem (33.6K): 1-716-688-1552
For info, E-Mail to: E. Amherst, NY | Voice: 1-800-836-0720
info@medtechnet.com 14051 | FAX: 1-716-688-0724
telnet: bbs.medtechnet.com / www: www.medtechnet.com / ftp: ftp.medtechnet.com
==============================================================================
------------------------------
Date: 14 Feb 1997 12:08:36 -0500
From: lwv26@cas.org (Larry W. Virden)
Subject: Re: ANNOUNCE: GIFgraph 0.9
Message-Id: <5e266k$6fe@csa21s4m.cas.org>
According to Martien Verbruggen <mgjv@comdyn.com.au>:
:Hi all,
:
:As promised before, I'm releasing the alpha version of GIFgraph. It's a
:package to create GIF bitmaps displaying a graph. Currently supported:
What's the status of the requirement from Unisys to pay licese fees
for software which creates GIFs? There was a lot of hoopla about this
on Compuserve a few yrs ago, and since that time I have seen notes from
the author of xv, the author of the GD perl package, etc. referring to
problems with such software.
--
Larry W. Virden INET: lvirden@cas.org
<URL:http://www.teraform.com/%7Elvirden/> <*> O- "We are all Kosh."
Unless explicitly stated to the contrary, nothing in this posting should
be construed as representing my employer's opinions.
------------------------------
Date: 14 Feb 1997 16:56:34 GMT
From: ddjack59@aol.com (DDJack59)
Subject: assigning variables
Message-Id: <19970214165601.LAA20131@ladder01.news.aol.com>
How can I assign a new variable based on existing string in a scaler
variable?
For example, I'm getting a field name by shifting an array. I want to
assign (in this case) an associative array name based on this string,
something like this:
$Name = shift(@Data);
my %"$Name";
but this fails.
I'm using perl 5.002.
Thanks to anyone who can help!
Doug
DDJack59@aol.com
------------------------------
Date: Fri, 14 Feb 1997 12:20:17 -0500
From: John Bley <jbb6@acpub.duke.edu>
Subject: Re: assigning variables
Message-Id: <Pine.SOL.3.91.970214121345.10643A-100000@trent6.acpub.duke.edu>
On 14 Feb 1997, DDJack59 wrote:
> How can I assign a new variable based on existing string in a scaler
> variable?
> For example, I'm getting a field name by shifting an array. I want to
> assign (in this case) an associative array name based on this string,
> something like this:
> $Name = shift(@Data);
> my %"$Name";
> but this fails.
> I'm using perl 5.002.
This works for me under 5.003
$name = "potato";
%$name = (); # makes assoc. array: %potato
$$name{"foo"} = "bar"; # assigns to $potato{"foo"}
print $$name{"foo"}; # prints "bar"
Hope this helps,
--
John Bley - jbb6@acpub.duke.edu
Duke '99 - English / Computer Science
"They have been at a great feast of languages, and stolen the scraps."
- Love's Labour's Lost V.i
------------------------------
Date: Fri, 14 Feb 1997 08:02:07 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Rupesh Kapoor <rupesh@whowhere.com>
Subject: Re: Case insensitive comparison
Message-Id: <Pine.GSO.3.95q.970214075905.11248R-100000@julie.teleport.com>
On Fri, 14 Feb 1997, Rupesh Kapoor wrote:
> Its probably an easy question. What is the operator/function to compare
> two strings in a case insensitive way (or is it an option to cmp
> operator?). Don't want to lowercas-ify both strings for efficiency
> reasons.
You can't do a case-insensitive compare without something, somewhere,
somehow changing case. (Although some methods hide that from the
programmer.) But you don't have to retain the converted string, if that's
what you mean to do.
print "It's a match!\n" if lc($foo) eq 'match';
Hope this helps!
-- Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.lightlink.com/fors/
------------------------------
Date: 14 Feb 1997 16:17:17 GMT
From: jot.feb97@tmp.medtronic.com (Jot Powers)
Subject: Re: Case insensitive comparison
Message-Id: <5e236d$iqc@gazette.medtronic.com>
In article <33042D87.248F@whowhere.com>, Rupesh Kapoor <rupesh@whowhere.com> writes:
>Its probably an easy question. What is the operator/function to compare
>two strings in a case insensitive way (or is it an option to cmp
>operator?). Don't want to lowercas-ify both strings for efficiency
>reasons.
This is probably a sub-optimal solution, but hey, you didn't say what you
had tried, so who knows if it's good enough.
node127% perl -de 1
Stack dump during die enabled outside of evals.
Loading DB routines from perl5db.pl patch level 0.94
Emacs support available.
Enter h or `h h' for help.
main::(-e:1): 1
DB<1> $string1 ="aaaAAA";$string2 = "AAAaaa"
DB<2> if ($string1 =~ /$string2/i) { print "Case insensitive\n";}
Case insensitive
DB<3>
--
Jot Powers jot.feb97@tmp.medtronic.com
Unix System Administrator, Medtronic Micro-Rel
"Subtlety is the art of saying what you think and getting out of the way
before it is understood."
------------------------------
Date: Fri, 14 Feb 1997 13:03:56 -0500
From: ken@forum.swarthmore.edu (Ken Williams)
Subject: Re: Counting values within a file
Message-Id: <ken-1402971303560001@news.swarthmore.edu>
In article <3302DB18.426B@eznet.com>, Darryl Caldwell <darrylc@eznet.com> wrote:
> I would like to learn how to count multiple occurences of
> text within a
> file.
>
> If a file contains:
>
>
> camel
> iguana
> penguin
> cat
> penguin
> cheetah
> camel
>
> I would like to append text underneath this that says:
>
> Total
> =============
> camel 2
> iguana 1
> penguin 2
> cat 1
> cheetah 1
Hi-
This isn't a Perl solution, but this has always been one of my favorite
tricks in Unix:
cat filename | sort | uniq -c
That will do what you need, I think, and faster than the Perl equivalent.
-Ken Williams
ken@forum.swarthmore.edu
------------------------------
Date: 14 Feb 1997 15:53:49 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Escaping \u in a string
Message-Id: <5e21qd$ac$4@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc,
Marc.Philips@ping.be writes:
:I'm trying to open a file on this path "test\uit" but the the \u
:gets interpreted and then it opens testIt
Don't put backslashes in a string. The path is "test/uit" not "test\uid"
(although 'test\uit' will work). Even your braim-damaged Microcrud
system will do the right thing with proper path separators. Backslashes
are simply "wrong" from the standpoint of programming. They escape things.
See such new-fangled systems programming languages as C for non-perl examples.
--tom
--
Tom Christiansen tchrist@jhereg.perl.com
/* we have tried to make this normal case as abnormal as possible */
--Larry Wall in cmd.c from the perl source code
------------------------------
Date: Fri, 14 Feb 1997 09:48:29 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: "Terry D. Brashley" <brashley@worldnet.att.net>
Subject: Re: How to open an HTTP connection with PERL ?
Message-Id: <Pine.GSO.3.95q.970214093417.11248a-100000@julie.teleport.com>
On Fri, 14 Feb 1997, Terry D. Brashley wrote:
> On 13 Feb 1997 20:17:13 GMT, nvp@shore.net (Nathan V. Patwardhan)
> wrote:
>
> >Mihai Crasneanu (mihaic@usa.net) wrote:
>
> >I presume that working a project requires research, in which case I'll help
> >you research your topic: Check out http://www.dejanews.com and query for:
>
> Nathan - arrogance is ignorant, and I presume (?) you're not. Be nice
> - folks come here for help. If you can't help civily - don't!
IMHO, Nathan was being both helpful and civil, and there was nothing which
appeared arrogant in his message. But if you have specific suggestions on
how he could have better written his reply, please let him know by private
e-mail. I'm sure that he, like I, welcomes suggestions which will help him
to communicate better.
In short messages, it is almost as easy to accidentally leave the
appearance of rudeness as it is to see a rudeness which was never
intended.
-- Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.lightlink.com/fors/
------------------------------
Date: 14 Feb 1997 16:50:19 GMT
From: donahue@acf2.nyu.edu (Adam M. Donahue)
Subject: HOW TO SPLIT A SIMPLE STRING
Message-Id: <5e254b$to6$1@news.nyu.edu>
Hi!
OK, how does one accomplish this? I have a a six character string,
say 012345, that I want to split into three variables, $one, $two, $three
that would then have 01, 23, 45. The original string has no
delimiters, though.
What's the best way to do this? It seems like an easy task, but I can't
figure it out.
($one, $two, $three) = split (/ ????? /, $original);
What's the expression?
Adam
--
Adam Donahue 400 Broome Street
Distributed Computing & Suite 410-B
Information Services New York, NY 10013
New York University Cyber-Guru Consulting
mailto:adam.donahue@nyu.edu mailto:headguru@cyber-guru.com
------------------------------
Date: Fri, 14 Feb 1997 10:20:00 -0700
From: "Robert A. Goff" <ragoff@sandia.gov>
Subject: Is there a way to get stat() via ftp?
Message-Id: <33049EC0.167E@sandia.gov>
Is there any way to get the equivalent of the stat() information via
ftp? The LIST command will return most of it, but in a form that needs
decoding/recoding to be useful. Is there anything better? Is there a
better place to ask?
--
=================================================
Robert Goff email: ragoff@sandia.gov
Sandia National Labs Phone: (505)284-3639
------------------------------
Date: Fri, 14 Feb 1997 16:47:47 GMT
From: Jeff Seifer <jeffs@pop3.silverplatter.com>
Subject: libwww installation problems under SCO V
Message-Id: <33049733.AC017BB@pop3.silverplatter.com>
I posted a message a few weeks back regarding installation problems
of libwww under Linux. I got great feedback from people and got it
installed and working.
I am now trying to put the perl script I created on a SCO V box and am
having trouble installing libwww on that machine.
I installed gcc (v 2.7-95q4), perl (version 5.003 with EMBED, built
under sco_sv at Feb 11 1997 15:59:46,+ suidperl security patch) and then
tried to install libwww.
libwww install:
===============
Socket 1.3 (installed fine)
IO 1.14 - errors during install. It looks like it can't find
libraries it needs, but I am not sure which ones or
where it's looking! The following is the error I got:
gcc -c -w0 -U M_XENIX -DNO_PROTOTYPE -D_NO_PROTO -O
-DVERSION=\"1.14\" -DXS_VERSION=\"1.14\"
-I/opt/lib/perl5/i386-sco_sv/5.003/CORE IO.c
gcc: unrecognized option `-w0'
Running Mkbootstrap for IO ()
chmod 644 IO.bs
LD_RUN_PATH="" ld -o blib/arch/auto/IO/IO.none IO.o
undefined first referenced
symbol in file
__stat32 IO.o
__fstat32 IO.o
__lstat32 IO.o
__statlstat32 IO.o
Perl_croak IO.o
Perl_stack_sp IO.o
Perl_markstack_ptr IO.o
Perl_stack_base IO.o
Perl_sv_2io IO.o
fgetpos IO.o
Perl_newSVpv IO.o
Perl_sv_2mortal IO.o
Perl_sv_undef IO.o
errno IO.o
fsetpos IO.o
Perl_sv_newmortal IO.o
Perl_sv_setpvn IO.o
Perl_sv_setiv IO.o
Perl_na IO.o
Perl_sv_2pv IO.o
tmpfile IO.o
Perl_newGVgen IO.o
Perl_do_open IO.o
Perl_gv_stashpv IO.o
Perl_newRV IO.o
Perl_sv_bless IO.o
Perl_sv_setsv IO.o
Perl_newSViv IO.o
Perl_sv_2iv IO.o
ungetc IO.o
fflush IO.o
Perl_sv_grow IO.o
setbuf IO.o
setvbuf IO.o
sprintf IO.o
perl_get_sv IO.o
Perl_Sv IO.o
Perl_newXS IO.o
Perl_sv_yes IO.o
ld fatal: Symbol referencing errors. No output written to
blib/arch/auto/IO/IO.none
make: *** [blib/arch/auto/IO/IO.none] Error
13
If anyone can point me in the right direction I would really
appreciate it. I tried copying the .pm files from my Linux box
to the SCO box, but I don't have the proper binaries for SCO,
so the script didn't run properly...
Thanks!
--
jeff - http://jeffs.silverplatter.com
------------------------------
Date: Fri, 14 Feb 1997 12:49:54 -0500
From: ken@forum.swarthmore.edu (Ken Williams)
Subject: Re: MLDBM issues
Message-Id: <ken-1402971249540001@news.swarthmore.edu>
In article <3303CE5E.95E65B9@science.gmu.edu>, Imran Shah
<imran@science.gmu.edu> wrote:
> Ken Williams wrote:
>
> > use Fcntl;
> > use lib "/home/ken/temp/MLDBM-1.22";
> > use MLDBM(DB_File);
> >
> > tie (%db, MLDBM, 'testmldbm2', O_CREAT|O_RDWR, 0640) or die $!;
> > $db{'002340'} = {'001' => "blah blah blah ",
> > '006' => "I am six!",
> > 'hiya'=> "Howdy!"};
> > untie (%db);
> >
> > tie (%db, MLDBM, 'testmldbm2', O_RDONLY, 0640) or die $!;
>
> Your code removed, try this:-
>
> while(($k,$v) = each (%$db)){
> print "$k\n";
> while (($k1,$v1) = each (%$v)){
> print "$k1 $v1\n";
> }
> }
Okay, good, this worked great(once I changed the each(%$db) to each(%db)
). Thanks.
But the fact that this works and my original loop didn't work means that
this isn't a full implementation of a multidimensional Perl hash. So I'm
still interested in the answers to my other questions.
>
> Read MLDBM.pm and the man page.
I have. I've found it to be rather brief.
-Ken Williams
ken@forum.swarthmore.edu
------------------------------
Date: Fri, 14 Feb 1997 18:02:01 +0100
From: Rob J Meijer <rob@flnet.nl>
Subject: Multi OS GUI module?
Message-Id: <33049A89.6488@flnet.nl>
I would like to know if there exists a Multi OS (unix and 95/nt)
GUI module for perl. I would like to make some graphical interfaces to
some perl programs, and it would be great ifthe program with graphical
interface would still work on both unix an Win95/NT.
T.I.A.
Rob J Meijer
=====================================================
O what fun we have writing our way arround
the bugs that Microsoft made.
=====================================================
------------------------------
Date: 14 Feb 1997 17:25:18 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: Multi OS GUI module?
Message-Id: <5e275u$mtr@fridge-nf0.shore.net>
Rob J Meijer (rob@flnet.nl) wrote:
: I would like to know if there exists a Multi OS (unix and 95/nt)
: GUI module for perl. I would like to make some graphical interfaces to
To my knowledge, no. Nick Ing-Simmons (sp?) is responsible for a Tk
extension to Perl 5, called Perl/Tk, or pTk (not to be confused with
tkperl). Rumor has/had it that people would be developing an NT/95
version of pTk if provided with a NT/95 development kit. I have no
idea if this is true.
If you are looking for a cross-platform, scripted GUI builder, you
might look into Tcl/Tk, which has a nice NT/95 port.
--
Nathan V. Patwardhan
nvp@shore.net
------------------------------
Date: 14 Feb 1997 09:42:16 -0500
From: awdorrin@ictest.delcoelect.com (Albert W. Dorrington)
To: "Aaron-Technical Support" <aaron@longsword.com>
Subject: Re: OK I know that I am a newbie But I need HELP!!
Message-Id: <5e1tk9$kio@ws051eng.ictest.delcoelect.com>
In article <01bc1a1c$45409c80$031fe4cf@coupe.greatbasin.net>, "Aaron-Technical Support" <aaron@longsword.com> writes:
> I totally blew my buffer today. My boss saw me reading "Learning Perl" and
> asked me to write a script. OK, no prob; I wrote a functional script. It
> uses `grep blah blah blah` to look up some info in six different error
> logs. The script I wrote works but unfortunatly I only retrievs the
> specific error code that I am looking for in the logfile (i.e. 1 line) when
> I need to retrive "2" specific lines from the log (the date and time of the
> log entry and the error code) from among the multiple lines in the log. Am
> I just over looking something here?
> I anyone would be kind enough to respond (thank you, thank you) please do
> so by email.
> aaron@longsword.com
> TIA
I wrote something similar to this once.
My script was based on an example from the 'Programming Perl'
called 'cgrep'. I called my version 'wgrep' for 'window grep.'
I've attached it below for you to look at:
#!/usr/std/bin/perl
# From: "Programming Perl by Wall and Schwartz" 'cgrep'
# Modified: awdorrin@ictest.delcoelect.com - 'wgrep'
##
# Version 0.9b
##
# This program provides the ability to display x number of
# lines before and y number of lines after a 'greped'
# pattern.
###########
# This program provided AS-IS, no warrantee or guarantee is
# provided. This program may be distributed, but please leave
# this header information attached. You may modify this program
# for enhancements, but please send any modifications to the
# author.
###########
$context = 1;
$a = 0;
$b = 0;
# awd - Make sure min. required arguments.
if (@ARGV < 1)
{
print "Usage: $0 [-b#] [-a#] pattern [files]\n";
print " or $0 [-#] pattern [files]\n";
die " or $0 -h\n";
}
# They might want more or less context.
if ($ARGV[0] =~ /^-h$/)
{
print "\nUsage: $0 [-b#] [-a#] pattern [files]\n";
print " or: $0 [-#] pattern [files]\n";
print " or: $0 [-h]\n";
print " -h = This help.\n";
print " -b# = The number of lines displayed before pattern.\n";
print " -a# = The number of lines after after pattern.\n";
print " -# = The number of lines before and after pattern.\n";
print " pattern = Pattern to search for.\n";
print " files = File(s) in which to search for pattern.\n";
die "\n";
}
if ($ARGV[0] =~ /^-(\d+)$/)
{
$context = $1;
shift;
}
elsif ($ARGV[0] =~ /^-b(\d+)$/)
{
$b = $1;
shift;
if ($ARGV[0] =~ /^-a(\d+)$/)
{
$a = $1;
shift;
}
}
elsif ($ARGV[0] =~ /^-a(\d+)$/)
{
$a = $1;
shift;
if ($ARGV[0] =~ /^-b(\d+)$/)
{
$b = $1;
shift;
}
}
if ($b >= $a && $b > $context)
{
$context = $b;
}
elsif ($a >= $b && $a > $context)
{
$context = $a;
}
# Get the pattern and protect the delimiter.
$pat = shift;
$pat =~ s#/#\\/#g;
# First line of input will be middle of array.
# In the eval below, it will be $ary[$context].
$_ = <>;
push(@ary,$_);
# Add blank lines before, more input after first line.
for (1 .. $context)
{
unshift(@ary,'');
$_ = <>;
push(@ary,$_) if $_;
}
# Now use @ary as a silo, shifting and pushing.
#eval <<LOOP_END;
while ($ary[$context])
{
if ($ary[$context] =~ /$pat/)
{
print "------\n" if $seq++;
if ($b == 0 && $a == 0 )
{
print @ary,"";
}
else{
for ( $i = ($context - $b); $i <= ($context + $a); $i++ )
{
print $ary[$i],"";
}
}
}
$_ = <> if $_;
shift(@ary);
push(@ary,$_);
}
#LOOP_END
# END OF PROGRAM...
--
Al Dorrington awdorrin@ictest.delcoelect.com
Delco Electronics - IC CIM Database & Unix Administrator
Kokomo, Indiana, USA Phone: 317.451.9655
------------------------------
Date: 14 Feb 1997 11:34:42 GMT
From: prikryl@dcse.fee.vutbr.cz (Petr Prikryl)
Subject: Re: opening a file in a Recursive Call (Perl Question)
Message-Id: <5e1iki$sdn@boco.fee.vutbr.cz>
Samir Grover (sgrover@elizacorp.com) wrote:
>I think my problem is overwring the same filehandle.
[...during the recursive call]
>Consider this: [...]
>$inName = "foo";
>&doCommand($inName);
>...
>sub doCommand {
>open(FILEHANDLE, "$_[0]");
>while ($x = <FILEHANDLE>) {
> ...
> ...
> &doCommand($x);
> ...
>}
[...]
>When doCommand is called recursively from itself, it looks like its
>overwriting FILEHANDLE and, thus it stops without completing the
>reading of very first file. How to get rid of this problem?
You cannot call open() in a recursive function (you can, but it does
something different than you think). Whenever the function is called
recursively, you open the file again and again. There is only one file
in the system, so that you have to open it only once. You have to do
it BEFORE calling the recursive function (outside). To ensure the
function works with the OPENED file, you should pass the reference
to filehandle (see perlref manual page). If you need to close the
file (in the case you are writing to it), you should do it AFTER
calling the recursive function. Your example should look like:
open(FIN, "<foo") or die "Cannot open foo";
doCommand(\*FIN);
close(FIN);
...
sub doCommand {
my $fh = shift; # reference to FIN
while (<$fh>) {
print $_; # the line read from file
doCommand($fh); # call recursively with the
# same reference to filehandle
}
}
However, you should be careful when writing recursive functions.
You should ensure that the recursion always stop.
Petr
--
Petr Prikryl (prikryl@dcse.fee.vutbr.cz) http://www.fee.vutbr.cz/~prikryl/
TU of Brno, Dept. of Computer Sci. & Engineering; tel. +42-(0)5-7275 218
------------------------------
Date: 14 Feb 1997 17:12:51 GMT
From: skunz@iastate.edu (Steven L. Kunz)
Subject: Re: Perl Compiler for a large project
Message-Id: <5e26ej$d6p$1@news.iastate.edu>
In <5dtfju$7ui$1@news.iastate.edu> skunz@iastate.edu (Steven L. Kunz) writes:
>In <5dp52h$dqq@park.interport.net> aimee@interport.net (Aimee Schneider) writes:
>> Has anyone out there used the perl compiler (either perl->C or
>>perl->bytecode) on a large-ish perl project and succeeded? Are there any
>>common pitfalls you could relate? Or conversely, if you wound up
>>abandoning it for reasons of complexity or whatever, those experiences
>>would be helpful too.
>I've compiled a large Perl script (over 10,000 lines of code) into a single
>module. [...]
I ended up getting a question or two on this and decided maybe it would be
helpful to write up my experiences in more detail and put it on my "PerlMenu
Home Page". Point your favorite WWW browser to:
http://www.cc.iastate.edu/perlmenu/homepage.html
Check in the "Other Useful Documents" section and click on the "Compiling
Perlmenu Programs into Binaries" document. This explains in about as much
detail as I want to go into how I compile PerlMenu programs using the Perl5
compiler.
--
Steven L. Kunz
Networked Applications -- Project Manager, Microcomputer Networked Services
Iowa State University Computation Center, Iowa State University, Ames, Iowa
E-mail: skunz@iastate.edu
------------------------------
Date: Fri, 14 Feb 1997 16:31:53 GMT
From: Chris Vo <chrisv@on.bell.ca>
Subject: Perl question, re: POSIX setpgrp
Message-Id: <33049379.7DA5@on.bell.ca>
Hello perl gurus,
I'm sorry to bother everyone with this lame question, but I very new to
using perl... I have a script which monitors the existence of the xntp
daemon (courtesy of K.Oberman) and forces it to restart if it hangs.
I'm encountering this problem however:
>>POSIX setpgrp can't take an argument at ./check_ntp line 21.
where line 21 reads as:
setpgrp (0, $$);
the code is supposed to work fine, but I think I'm missing out on
something (being a perl newbie; running perl 5.003 on sparc 10 and
having commented out line 92(?) in Syslog.pm)
Any help would be greatly appreciated
--
Christian Vo
<chrisv@on.bell.ca>
------------------------------
Date: Fri, 14 Feb 1997 07:56:41 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: RKing <rking@thepoint.net>
Subject: Re: Perl script debug help
Message-Id: <Pine.GSO.3.95q.970214075400.11248Q-100000@julie.teleport.com>
On Thu, 13 Feb 1997, RKing wrote:
> I found this in the faq:
>
> 3. Are you using the following?
> #!/usr/bin/perl -w
> use diagnostics;
> use strict;
> I went and put it in at the top of my script, just as it apears
> above. THEN when I do ./program, I get a message that says "no such file or
> directory"
Remember to adapt the first line to have the proper path to your version
of Perl. (Use 'which perl' to find out.)
> I'm using unix and perl v. 4. (036 I think).
You'll need a more recent version than that. Use 'perl -v' to find out
which version you have, and install a newer one if you don't have a
version past 5.001m. Hope this helps!
-- Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.lightlink.com/fors/
------------------------------
Date: Fri, 14 Feb 1997 15:38:40 GMT
From: melnicki@sit.ca (Isabelle A. Melnick)
Subject: Re: Porting Perl from UNIX to NT
Message-Id: <330486dd.1559080@news.sit.qc.ca>
On Thu, 13 Feb 1997 18:52:33 GMT, syoung@actcom.co.il (Sara Young)
wrote:
>How hard is it to port Perl scripts from UNIX to NT? Will I be able to do
>such a thing, as a UNIX programmer (no experience with NT)?
There is some differences between the two platteforms. You can have
more information about that by looking at the FAQ:
http://www.endcontsw.com/~evangelo/people/evangelo/Perl_for_Win32_FAQ.html
============================================================
| Isabelle A. Melnick, B.Sc.A. G.Informatique |
| Programmeure-Analyste - dep. R&D - SIT International Inc |
| tel. (418)683-1189 poste 294 |
| email: melnicki@sit.ca |
| http://www.sit.ca |
============================================================
------------------------------
Date: 14 Feb 1997 17:42:45 GMT
From: jvenu@ctp.com (Jagadeesh Venugopal)
Subject: Re: Porting Perl from UNIX to NT
Message-Id: <5e286l$ltc@concorde.ctp.com>
In article <E5K1rM.1qo@actcom.co.il> syoung@actcom.co.il (Sara Young) writes:
>How hard is it to port Perl scripts from UNIX to NT? Will I be able to do
>such a thing, as a UNIX programmer (no experience with NT)?
>
>Thanks in advance,
You can refer to NT Perl's web site at http://www.activeware.com. They
maintain a list of things in NT Perl that do not work like 'The Real
Thing' does. Another resource is www.perl.com/perl. Please look in there
for the Perl FAQ and the Perl for Win32 FAQ.
Jag
--
/\/\ |Jagadeesh K. Venugopal, jvenu@ctp.com |http://w3.ctp.com/~jvenu
/ /_.\|Cambridge Technology Partners, Inc. |http://www.ccs.neu.edu/home/jkvg
\ /./|304 Vassar St. Cambridge, MA 02139 |
\/\/ |Phone: 617.374.2028 FAX: 617.374.8300 +
------------------------------
Date: 8 Jan 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 8 Jan 97)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.
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 V7 Issue 949
*************************************