[6537] in Perl-Users-Digest
Perl-Users Digest, Issue: 162 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Mar 23 02:07:31 1997
Date: Sat, 22 Mar 97 23:00:21 -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, 22 Mar 1997 Volume: 8 Number: 162
Today's topics:
"guaranteed" exit routine? <schramm@one.net>
Re: A Call for Clarity (Schwartzian Transform Considere (Kevin Buhr)
Re: Another dereferencing bug in 5.003 ? <jhg@io.com>
Re: Another dereferencing bug in 5.003 ? <jhg@io.com>
Fork and flush (Paul D. Smith)
Re: help!!!! (Simon Hyde (aka Jeckyll))
How to drop .cgi on perl script? (Geoffrey Hebert)
Re: How to strip newlines from string <rmcvay@acm.org>
Re: KEDIT .KLD file -Win'95 <rproctor@together.net>
Makefile.PL in Win95...where/what should I use for make (Lord Vorp)
MakeMaker error trying to install a DBD module <dmi1@ra.msstate.edu>
Re: Perl script..help! (Steven Sajous)
Persistent $SIG{CHLD} <badsmrfs@stratos.net>
printf... <cplee@thegrid.net>
Re: q: c style include command in perl? (M.J.T. Guy)
Re: regex for UNIX usernames needed! (I R A Aggie)
SIGCHLD bug in 5.004Beta? <badsmrfs@stratos.net>
undump for IRIX 6.2 <phousto@cse.dnd.ca>
Unix 'Cat' equivelent (Bryan Grenn)
Re: Unix 'Cat' equivelent (Nathan V. Patwardhan)
Re: What's a good Perl book? lvirden@cas.org
Re: What's a good Perl book? <badsmrfs@stratos.net>
When is perl program too large? (Geoffrey Hebert)
Wildcards in a system (mv, fn, fn) call won't work (Ceolas)
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 22 Mar 1997 22:25:57 GMT
From: "Rich Schramm" <schramm@one.net>
Subject: "guaranteed" exit routine?
Message-Id: <01bc3710$4ac10760$3fcb70ce@ras_schramm.scripps.com>
Hi,
I was told by someone that perl has a facility that will allow me to run a
an exit routine, even if perl were to abort abnormally. I am doing some
oracle connection stuff, and want to ensure that a logout occurs, even if
something untoward were to happen during execution.
I read about garbage collection in the camel book, but that does not seem
to be what I am looking for.
Does something like this exist?
Thanks,
Rich
------------------------------
Date: 22 Mar 1997 19:27:49 -0600
From: buhr@stat.wisc.edu (Kevin Buhr)
Subject: Re: A Call for Clarity (Schwartzian Transform Considered Scary)
Message-Id: <vba7mizpfbq.fsf@mozart.stat.wisc.edu>
Tom Christiansen <tchrist@mox.perl.com> writes:
>
> Enclosed you will find a posting pinched from the Python group that
> shows the fear and shock and pain and anger and resentment that the
> Schwartzian Transform and code of similar ilk too often invoke.
Your points are well-taken, but I can't help but think "unhighly" of
people who feel fear, shock, pain, anger, and resentment whenever
they're faced with something they don't immediately understand. (How
do people with so little self-esteem survive in day-to-day life? Are
they merely careful to limit their activities to such a degree that
they avoid experiencing anything the pushes the limits of their
knowledge?)
That being said, I've found myself "de-clevering" answers I give on
c.l.p.m, simply because, looking back at my "first draft", I discover
how very much obscure Perl idiom is required to understand something
even only marginally clever. I refuse to *totally* de-clever my
answers, however, because Perl's defining feature is the "clever
answer to a difficult problem". If you instead want laborious answers
to trivial problems, you should pick a more suitable programming tool.
Kevin <buhr@stat.wisc.edu>
------------------------------
Date: Sat, 22 Mar 1997 20:55:22 -0600
From: Jim Garrison <jhg@io.com>
Subject: Re: Another dereferencing bug in 5.003 ?
Message-Id: <33349B9A.47FC@io.com>
Randal Schwartz wrote:
> The problem is that @$foo->[...] is *illegal* syntax that wasn't
> caught correctly by 5.003,
I know this might be considered an RTFM question, but could
you please point out where in Camel-2 this is defined to be
illegal?
Thanks!
Jim Garrison
------------------------------
Date: Sat, 22 Mar 1997 20:57:16 -0600
From: Jim Garrison <jhg@io.com>
Subject: Re: Another dereferencing bug in 5.003 ?
Message-Id: <33349C0C.78EC@io.com>
Randal Schwartz wrote:
> The problem is that @$foo->[...] is *illegal* syntax that wasn't
> caught correctly by 5.003,
I know this might be considered an RTFM question, but could
you please point out where in Camel-2 this is defined to be
illegal?
Thanks!
Jim Garrison
------------------------------
Date: 22 Mar 1997 21:55:15 -0500
From: psmith@baynetworks.com (Paul D. Smith)
Subject: Fork and flush
Message-Id: <p5n2rv71ws.fsf@baynetworks.com>
'Kay, so I'm writing a module that forks/execs a process.
People are complaining that if they redirect the output to a file, they
get duplicate lines.
I've realized that I'm not flushing STDOUT/STDERR before I invoke the
subprocess. If I add this to my test program, the problem goes away:
select(STDERR); $| = 1;
select(STDOUT); $| = 1;
So, I'm pretty sure that's the problem.
However, I can't just _do_ that in my module, since it is just a
module. What I want to do is just flush the buffers right before I
fork, but not change the buffering of the file descriptors forever.
I cannot, however, seem to find anywhere just a "flush" or "fflush"
function in perl. There doesn't even appear to be one in FileHandle,
and I've so far avoided the overhead of using that (and I'd like to keep
it that way).
I looked at the perl dist and it comes with "flush.pl", which uses this
function:
sub flush {
local($old) = select(shift);
$| = 1;
print "";
$| = 0;
select($old);
}
This seems a little hokey--printing an empty string? Come on! Plus, it
will break if the user set autoflush first as it doesn't save that
value (obviously easy to fix).
I'm hoping there's a simpler solution... can't I simply flush a
filehandle?
--
-------------------------------------------------------------------------------
Paul D. Smith <psmith@baynetworks.com> Network Management Development
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist
-------------------------------------------------------------------------------
These are my opinions--Bay Networks takes no responsibility for them.
------------------------------
Date: Sat, 22 Mar 1997 23:38:41 GMT
From: shyde@poboxes.com (Simon Hyde (aka Jeckyll))
Subject: Re: help!!!!
Message-Id: <33346b94.22421881@news.uni-stuttgart.de>
On Sat, 22 Mar 1997 15:23:41 -0800, John Giblin <giblin@mail.idt.net>
wrote:
>Hey everyone!
>
>
>I have a little trouble with my perl script I got from a book, which I
>copied and pasted to notebook. I keep getting Internal Error. So I
>started eliminating sections to narrrow the problem down. I ended with
>#!/usr/local/bin/perl(the right location) and it still didn't work. Is
>it the fact I am using notepad? Is there something I have to do to the
>script besides chmod it? This is driving me crazy!!!
>
using notepad shouldn't be a problem as long as you FTP the script
onto the server in ASCII mode. You probably want to chmod it to 755.
If it still isn't working try running ./script.cgi from your shell and
seeing what the script outputs.
---
Yours Sincerely,
,
() o /| | |
/\ _ _ _ __ _ _ |___| __| _
/ \| / |/ |/ | / \_/ |/ | | |\| | / | |/
/(__/|_/ | | |_/\__/ | |_/ | |/ \_/|/\_/|_/|__/
/|
\|
(Simon Hyde)
/****************How To Contact Me******************\
| Internet Email: shyde@POBoxes.com |
\***************************************************/
------------------------------
Date: Sun, 23 Mar 1997 01:55:46 GMT
From: soccer@microserve.net (Geoffrey Hebert)
Subject: How to drop .cgi on perl script?
Message-Id: <5h21lq$c5b$1@news3.microserve.net>
I am writing a general purpose routine. The routine would cross
reference a perl script or group of perl scripts. Currently all my
perl scripts require .cgi at the end.
What must be done to eliminate this requirement?
Also this should be placed one place for all developers, where do you
suggest it be put?
Here is a proposed man description of my routine - any comments
welcome.
NAME;
xref - creates cross-reference html for perl, text, and
html files.
SYNOPSIS
xref [-p] [-o output] [-x mem] [-r mem] [file . . . ]
DESCRIPTION
The xref command creates a cross reference file
in html format from a text input file or files.
xref
xref without any parameters produces this help.
xref -p
The first parameter specifies the language type being
processed.
-p perl bypass perl idioms like \n
-h html bypass html idioms like <HR>
-t text bypass nothing
Default is -p.
In the example here, there is no file list. This will cause the
default of all text files within the directory. This is not
recommended
until you understand the amount of resources expected for
your
directory.
xref -p -o mydir
The -o option directs the output to a specific directory.
The default is xref. Each file creates a member in this
directory and additionally there will be index type files created.
It is highly suggested that this directory be reserved for this
purpose only.
In the example here, there is no file list. This will cause
the default of all text files within the directory. This
is not
recommended until you understand the amount of resources
expected for your
directory.
xref -p -o mydir -x mem
The -x option directs the command to exclude a list of
words. This is similar to word lists in spell checker.
Each word in this file will not appear in the cross reference.
The exclude file format is word on each separate line.
xref -p -o mydir -x mem -r mem
The -r option directs the command to restrict the cross
reference to only the words in the list. This would be used,
for example, when you want to know everywhere the
word command and format were found. A case insensitive
result will be produced. Tipically an -r option will not be
used with a -x option; however, they can be used together.
The -r option says to only report these items. The -x option
says to exclude these items. If a word is in both lists the
word will be excluded.
The restrict file format is word on each separate line.
xref -p -o mydir -x mem -r mem myfile*
The file can be an individual file or a file list. The
following all work:
*
*.cgi
myfile.ext
../dir/myfiles*
/usr4/shell/bin/doc/*
To View Cross Reference
Point your browser to
http://www.your.com/where_installed_dir/display.cgi/mydir
http://www.your.com/ ...You gotta know what this means
where_installed_dir/ ...Where you installed the perl cgi
supplied with this release.
display.cgi/ ...This is the name of the perl cgi
program supplied to do the browsing.
mydir ...This is the directory where you directed
the cross reference data to be placed.
See above.
------------------------------
Date: Sat, 22 Mar 1997 22:55:32 -0600
From: Ray McVay <rmcvay@acm.org>
Subject: Re: How to strip newlines from string
Message-Id: <3334B7C4.2A82@acm.org>
Stephen K. Bohler wrote:
> I'm trying:
> $string =~ tr/\n/ /
>
> When I look at the output in the file, the string looks a bit garbled. If I
> 'vi' the file, I see a '^M' where I just want a space. So, it seems this
> isn't working.
Looks like those aren't just newlines (\n) but DOS type end of lines
(\r\n).
------------------------------
Date: Sat, 22 Mar 1997 08:34:33 -0500
From: Bob Proctor <rproctor@together.net>
Subject: Re: KEDIT .KLD file -Win'95
Message-Id: <3333DFE9.332@together.net>
Bob Proctor wrote:
>
> I recently upgraded from a DOS version of Kedit to Kedit 1.5 for
> Windows. Does anyone know of or have a KEDIT Language Definition File
> for perl5?
>
> Kedit has always been a powerful DOS/Windows editor that supports a high
> function macro language. The Windows version now has syntax coloring,
> and for that to work, you need the KLD file.
>
> Help finding this file would be appreciated!
Somebody at http://www.kedit.com located the .kld file I was looking
for. Seems to work fine. Now I'm hacking perl code in color!
If anyone else wants that code, just ask.
-Bob-
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Bob Proctor (Bob-VT-) rproctor@together.net
rproctor@delphi.com
http://together.net/~rproctor/
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
------------------------------
Date: Sun, 23 Mar 1997 00:15:48 GMT
From: lordvorp@usa.net (Lord Vorp)
Subject: Makefile.PL in Win95...where/what should I use for make(.exe)?
Message-Id: <333a757a.13032720@nntp.a001.sprintmail.com>
So I've decided that perl is kewl and I wanna learn/use/practice w/ it
on my Win95 box. And I've seen that CPAN has most of the modules I
would need to implement my projects already available. However, I am
SOOOOOO clueless as to how to use a Makefile.PL under Win95 that I
have decided to post.
So:
What recommended directory Structure for Perl5?
What Evironment vars should I set?
HOW do I make Makefile.PL work?
TIA.
L8r,
L V
------------------------------
Date: 22 Mar 1997 17:51:47 -0600
From: David Ishee <dmi1@ra.msstate.edu>
Subject: MakeMaker error trying to install a DBD module
Message-Id: <m3n2rvh4do.fsf@gsubc.dot.edu>
I am trying to install DBD-mSQL-0.60pl9 on my system. I have already
installed DBI-0.77 with no problems. When I try to run perl
Makefile.PL I get this error:
"%att" is not exported by the ExtUtils::MakeMaker module at /usr/lib/perl5/Exporter.pm line 95
Exporter::export called at /usr/lib/perl5/Exporter.pm line 149
Exporter::import called at Makefile.PL line 12
main::BEGIN called at /usr/lib/perl5/ExtUtils/MakeMaker.pm line 0
eval {...} called at /usr/lib/perl5/ExtUtils/MakeMaker.pm line 0
Can't continue after import errors at Makefile.PL line 12
BEGIN failed--compilation aborted at Makefile.PL line 12.
I've never had problems installing modules before, can anyone help me
with this?
I'm running Red Hat Linux 4.0, perl 5.003, MakeMaker 5.34 (should be the
one included when I installed perl)
David
+--------------------------------------------------------------------+
| David Ishee |
| Mechanical Engineer, MS grad student dmi1@ra.msstate.edu |
| Mississippi State University |
| |
+------------- http://www2.msstate.edu/~dmi1/index.html -------------+
------------------------------
Date: Sun, 23 Mar 1997 06:07:00 GMT
From: steve@golf.com (Steven Sajous)
Subject: Re: Perl script..help!
Message-Id: <3334c849.14151479@news1.alterdial.uu.net>
Take a look at the pipe "|" capabilities of open(). That is the best
way to do it.
On Thu, 20 Mar 1997 15:12:44 -0800, Len Morrissey
<len.morrissey@sympatico.ca> wrote:
>I have created a simple perl script with simply "if" statements that
>simply takes the content of a "form" of a web page, and sends the content
>back to the html user in a formatted way.
>
>MY QUESTION...now I want to simply send the same formatted html page to
>an email. Can I write this into my script. I know that formail.cgi does
>similiar things, but it's not exactly what I want (too complex). Here is
> what my script for the html return page...
>
>#!/usr/bin/perl
>require ("cgi-lib.pl");&ReadParse (*input);
>print "Content-Type: text/html\n\n";
>print "<html><head><title>Res Builder Test 1</title></head>\n";
>print "<body bgcolor=\"#ffffff\"> \n";
>
>if ( $input{'Name'} ){
> print "<FONT SIZE=+2><center><b>$input{'Name'}\
>\n</b></center></FONT><BR>";
>}
>
>and so on...will a simple "sendmail" suffice...how do I write it in. As
>you may have guess, I'm just beginning to write my own cgi scripts. I
>appreciate any suggestions...thanks!
>
>Len Morrissey
>
------------------------------
Date: Sun, 23 Mar 1997 02:13:32 -0600
From: "Aaron, Penny, Jaymee Minner" <badsmrfs@stratos.net>
Subject: Persistent $SIG{CHLD}
Message-Id: <3334E62C.769185BA@stratos.net>
Ok, I'm more or less running the example from page 340 in the Camel
book for reaping child processes, except my process is supposed
to die() if a monitored child process vanishes (after printing some
diagnostics).
What I've found is that unless I specifically set $SIG{'CHLD'}
to 'IGNORE' somewhere after the child handler runs, the handler gets
called a second time when the parent process dies. At least that's
what it looks like. Here's some output:
$ ui_initd.pl
starting child process monitor loop...
Fork/Exec Error: exec dud.plx failed - <No such file or directory>
Argument "CHLD" isn't numeric in entersub at
/usr/local/lib/perl5/sun4-solaris/5.00393/POSIX.pm line 206.
Child Handler called by: <pkg:main> <file:ui_initd.pl> <line:99>
Fatal System Error: Error: child process died - dud.plx
Aborting...
Child Handler called by: <pkg:main> <file:ui_initd.pl> <line:0>
waitpid returned process id <-1>
The second "called by:" statement shouldn't be there, but I think
what's happening is the parent is catching its own exit in the
child handler, which doesn't seem right. Like an "atexit" I
didn't request.
In the example in the book, the signal handler is repeatedly set
to catch the next occurrence of the signal, but in this case, I
don't need to reset the signal handler, and it works better if I
actually set it to 'IGNORE' once it's been called. Anyone want to
hazard a guess as to what's going on here?
Specs: I'm running perl5.004Beta on a Solaris.
Aaron
------------------------------
Date: 22 Mar 1997 00:04:17 GMT
From: "Casey Lee" <cplee@thegrid.net>
Subject: printf...
Message-Id: <01bc3654$92f40670$0655bece@cyber>
Hello,
I am writting a script that will print statements
for our clients. The thing is that I need to
print on two halfs of the statement:
-------------------------------------------------------------------------
| | |
| Some stuff here | Some more stuff here |
| | |
| More stuff here | |
| | And more here |
| | |
-------------------------------------------------------------------------
The thing is that all field need to be variable between
0 and (size of page)/2. Is there a way I can use
printf and write a subroutine so I could say like
&printLeft("Some Stuff here");
&printRight("Some more stuff here");
etc...
and it will always start printing the right column at
the right spot no matter how much text is in the left
column? assuming left column is < (size of page)/2.
Any help would be greatly appreciated...
Thanks,
Casey Lee
----------------------------------------------------------------------------
---
Casey P. Lee casey@thegrid.net
System Administrator (805)781-6601
The Grid Network http://www.thegrid.net
------------------------------
Date: 23 Mar 1997 06:42:02 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: q: c style include command in perl?
Message-Id: <5h2jbq$ll@lyra.csx.cam.ac.uk>
Simon Hyde <shyde@poboxes.com> wrote:
>On Fri, 21 Mar 1997 21:52:41 GMT, ils@pipcom.com (Scott Card) wrote:
>
>>Is there a c++ style include command in perl for including
>>subroutines?
>>
>try:
>unshift(@INC, $path_to_filename);
>require($filename);
Don't do that. Although it'll probably work for the simple cases, it is
planting various boobytraps which may surprise you later.
1. Don't manipulate @INC directly. Do
use lib $path_to_filename;
This hides the mechanism, and happens at compile time rather than
run time.
2. Do 'use' rather than 'require'; 'use' also happens at compile time
and ensures that subroutine definitions are available before the
rest of the code is compiled.
See perlfunc/use and perlmod for more details.
(Of course, none of the above applies if you are stuck with Perl4.)
Mike Guy
------------------------------
Date: Sat, 22 Mar 1997 13:40:28 -0500
From: fl_aggie@hotmail.com (I R A Aggie)
Subject: Re: regex for UNIX usernames needed!
Message-Id: <fl_aggie-ya02408000R2203971340280001@news.fsu.edu>
In article <8cvi6k3cs5.fsf@gadget.cscaper.com>, Randal Schwartz
<merlyn@stonehenge.com> wrote:
+ And there's really no length limit, although most utilities like it to
+ be under nine characters. Just change the final + to {1,8} if you
+ think you want that restriction.
Ummm...not to pick nits, but is that true? or rather, is it a
vendor-by-vendor case?
My prefered username would have 9 characters. But since I got my
first account on multi-user, interactive platforms, the max login
name has always been 8 characters...
James - have I mentioned that I did punch cards and walked barefoot in
the snow, wind in my face, uphill in both directions to school?
--
Consulting Minster for Consultants, DNRC
To cure your perl CGI problems, please look at:
<url:http://www.perl.com/perl/faq/idiots-guide.html>
------------------------------
Date: Sat, 22 Mar 1997 20:58:49 -0600
From: "Aaron, Penny, Jaymee Minner" <badsmrfs@stratos.net>
Subject: SIGCHLD bug in 5.004Beta?
Message-Id: <33349C69.5172E61E@stratos.net>
When my SIGCHLD handler executes in 5.00393, I get the following
warning:
Argument "CHLD" isn't numeric in entersub at
/usr/local/lib/perl5/sun4-solaris/5.00393/POSIX.pm line 206.
Any ideas what this is?
Also, is there a way to keep Perl quiet about an error like
"Can't exec: program doesn't exist"? I want the exec() to
fail, which I'll test for, but I don't want the diagnostic
message telling me exec failed. (I'll probably answer my own
question as soon as I look at the book again...)
Aaron
------------------------------
Date: 23 Mar 1997 00:34:19 GMT
From: Phil Houstoun <phousto@cse.dnd.ca>
Subject: undump for IRIX 6.2
Message-Id: <5h1tqb$pkp@news.istar.ca>
Does an undump exist for IRIX 6.2? Email please. Tks.
------------------------------
Date: 17 Mar 1997 13:58:21 GMT
From: beermeister@geocities.com (Bryan Grenn)
Subject: Unix 'Cat' equivelent
Message-Id: <5gjilt$6a4@kodak.rdcs.Kodak.COM>
I'm trying to replace a lot of my unix scripts
with perl. I'm having problems trying to do
simple file manipulation..
ie
cat filea.txt fileb.txt filec.txt > newfile.txt
How can I easlily do this in perl ????
------------------------------
Date: 23 Mar 1997 02:24:44 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: Unix 'Cat' equivelent
Message-Id: <5h249c$3vs@fridge-nf0.shore.net>
Bryan Grenn (beermeister@geocities.com) wrote:
: cat filea.txt fileb.txt filec.txt > newfile.txt
: How can I easlily do this in perl ????
Very easily. Just use @ARGV for the arguments, and $#ARGV+1 for the
number of arguments. Bear in mind that (unlike C) ARGV[0] is not the
scriptname, but an argument.
Basically what you'll do is read each command line argument as open each
as a file, outputting the contents of each. Instead of being sent to STDOUT,
you'll redirect the output to a file.
--
Nathan V. Patwardhan
nvp@shore.net
------------------------------
Date: 22 Mar 1997 23:49:16 GMT
From: lvirden@cas.org
Subject: Re: What's a good Perl book?
Message-Id: <5h1r5s$f5i@srv13s4.cas.org>
Anyone writing material to teach the first time programmer (particularly
the young programmer) Perl 5?
--
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: Sat, 22 Mar 1997 20:50:08 -0600
From: "Aaron, Penny, Jaymee Minner" <badsmrfs@stratos.net>
Subject: Re: What's a good Perl book?
Message-Id: <33349A60.73C215E2@stratos.net>
I don't want to start any flames, really, but if I could
add my $.02...
I looked forward to the second version of the Camel book,
but I have to admit I'm disappointed in it. It seems like
I had to learn the book before I could learn Perl (which
seems really "duh," but I mean I had to figure out where
things were in the book before it was any help; like there
should be a book just to describe the book). I have
Steven's -Advanced Programming in the Unix Environment-
and it does a pretty good job of being both a tutorial and
a reference. I can't say the same for the Camel (2nd).
When I was particularly frustrated at not being able to find
something, it seemed like more effort was put into the
cute comments than making the book intuitively useful.
Aaron
PS. Randal, did you ever get my mail about that article
in Fortune?
>>>> "slacker" == slacker <slacker@dixonillinois.com> writes:
>
> slacker> Then the llamma book although the first chapter is a doosy until you
> slacker> figure out what it's referring to in the later chapters.
------------------------------
Date: Sun, 23 Mar 1997 02:04:59 GMT
From: soccer@microserve.net (Geoffrey Hebert)
Subject: When is perl program too large?
Message-Id: <5h2272$c91$1@news3.microserve.net>
Excuse me if this is a second post. I posted it earler and can not
now find it.
I am used to writing programs in a size smaller than 800 lines. If a
program gets above this amount I break it apart.
The perl overhead seems to me to necessitate keeping a program
together. I wonder how you all feel about the size of perl programs.
When do you say - 'This program is too large, I'll break it up'?
email please heberts@microserve.net
------------------------------
Date: Sat, 22 Mar 1997 16:20:32 -0700
From: ceolas@celtic.stanford.edu (Ceolas)
Subject: Wildcards in a system (mv, fn, fn) call won't work
Message-Id: <ceolas-2203971620320001@b461-powmac7500.stanford.edu>
I am trying to write a cgi-bin script to transfer new files for my web
server from an FTP submit area to the correct part of the web server,
allowing external contributors to update their own files. Each contributor
to the site has their own directory, so I'd like to be able to move
selected files from /submit/dir/ to /html/dir/. Since I'm another
fairly-clueless-newbie, I thought to avoid having to move each file
individually, by using a system call to the mv command:
$source = "/img/www/html/submit/bod/*";
$dest = "/img/www/html/bod/";
system ("mv", $source, $dest);
Running this as a script from the command line, mv tells me it can't find
the /bod/* file or directory. If I replace the * with a single filename,
everything works fine, and if I just type out the mv command (including
the *), that's fine too, so the problem seems to be between perl and the
*.
Question: is there any way that mv can recognise a * wildcard in a perl
system() call? If not, is there a way around it, for me to update certain
files in a directory, without transferring the whole directory across
every time?
I'm running IRIX 4.05F on an Indigo R3000, with perl 4.036. In reponse to
the FAQ, I've also downloaded perl 5.003, and get the same problem. Right
now I have all the directories and files involved with read and write
permissions for everyone. I've also got about two hairs left on my head
after the frustrations of trying to get this to work, so if anyone can
cast light on this problem, I'll be hugely grateful.
-Gerard Manning.
--
Ceolas - Celtic music on the internet: IrishNet: directory of Irish-related
http://celtic.stanford.edu/ceolas.html resources in America:
FTP: celtic.stanford.edu http://celtic.stanford.edu/IrishNet/
------------------------------
Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 8 Mar 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.
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 162
*************************************