[8033] in Perl-Users-Digest
Perl-Users Digest, Issue: 1658 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Jan 16 21:06:13 1998
Date: Fri, 16 Jan 98 18:00:23 -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, 16 Jan 1998 Volume: 8 Number: 1658
Today's topics:
2 Perl Jobs available - Rosslyn, VA jobs@nc-inc.com
Basename Question (win32) <serstad@acc.jc.edu>
Re: CGI.pm <rootbeer@teleport.com>
Re: Command Line Arguments in MacPerl (Adam Schneider)
Re: Convert .bmp to .jpg via Perl (Andy Lester)
Re: EMTY FILE? <rootbeer@teleport.com>
Re: GLOB HELP <sgordon@athena.lbl.gov>
Re: HELP !! <rootbeer@teleport.com>
Help - Perl processes in memory <scotth@nyd2.com>
How do I allow input to be retrieved from multiple line <poohba@io.com>
Re: how to mix the order of the lines in a file? <sgordon@athena.lbl.gov>
module to calculate dates? <corky@ultranet.com>
Re: module to calculate dates? (Kelly Hirano)
MS-DOS Window Suppression for Perl System Calls <lla@med.unc.edu>
Perl 5.0040x and FreeBSD-2.2.x (Soulsmith)
Re: Perl dies with segmentation fault and leaves a core <rootbeer@teleport.com>
perl module question <jlee@sandiegoca.ncr.com>
Re: perl module question (Tad McClellan)
Re: Problem running HTML Processor script <merlyn@stonehenge.com>
Problems building perl5.00404 on AIX 3.2.5 <nneul@umr.edu>
Puzzling behavior of c.l.p.* readers (Andy Lester)
Re: Puzzling behavior of c.l.p.* readers <wizard@eznet.net>
Re: Reg Expression, Case change of memory variables (Tad McClellan)
Re: Search Script -Comment please <rootbeer@teleport.com>
Re: Using SetUID <rootbeer@teleport.com>
Re: Using SetUID <mrbaseball2@rocketmail.com>
Re: What's this error <rootbeer@teleport.com>
Re: Win95: can I associate file type with perl script? (William Byrd)
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sat, 17 Jan 1998 01:03:54 GMT
From: jobs@nc-inc.com
Subject: 2 Perl Jobs available - Rosslyn, VA
Message-Id: <34c0030c.90558866@news.erols.com>
Attention Perl junkies, we have a healthcare client in Rosslyn, VA with 2
immediate openings for Perl-CGI programmers. Pay is $45-65K based on experience.
Resumes to jobs@nc-inc.com
------------------------------
Date: Fri, 16 Jan 1998 16:51:23 -0600
From: Sped Erstad <serstad@acc.jc.edu>
Subject: Basename Question (win32)
Message-Id: <884988084.1294270472@dejanews.com>
Ok -- am I being really dumb here? I thought that using the
File::Basename would work wonders for me and allow me to not worry about
Dos and Unix slashes on my filenames:
#Demo of basename with unix and dos filenames
use File::Basename;
$withpath = 'm:\wwwbuild\working\whatever.txt';
$withoutpath = basename($withpath);
print "$withpath -- $withoutpath\n";
$withpath = '/wwwbuild/working/whatever.txt';
$withoutpath = basename($withpath);
print "$withpath -- $withoutpath\n";
Shouldn't both of these print out "whatever.txt"? I'm using Activeware
Perl for Win32 build 306...
Thanks,
..sped.
-------------------==== Posted via Deja News ====-----------------------
http://www.dejanews.com/ Search, Read, Post to Usenet
------------------------------
Date: Fri, 16 Jan 1998 15:20:12 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Builders Connection <jim39@interworldnet.net>
Subject: Re: CGI.pm
Message-Id: <Pine.GSO.3.96.980116151925.669U-100000@user2.teleport.com>
On Fri, 16 Jan 1998, Builders Connection wrote:
> Where can you get CGI.pm
Anywhere you want, although it's most useful if it's along your @INC path.
> and can it be used to run a script thru
> without put it on your server?
Don't its docs answer this question? Hope this helps!
--
Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
Ask me about Perl trainings!
------------------------------
Date: Fri, 16 Jan 1998 19:43:07 -0600
From: NO_SPAM_acs@bitstream.net (Adam Schneider)
Subject: Re: Command Line Arguments in MacPerl
Message-Id: <NO_SPAM_acs-1601981943090001@acs.bitstream.net>
garts@direct.ca (D. Graham Arts) wrote:
> Can anybody tell me how to get a script running with command line arguments
> in MacPerl?
If you mean passing in some arguments in @ARGV, here's what I do at the
beginning of the script:
if ($^O =~ /^Mac/) {
$ARGV[0] = MacPerl::Ask("Enter the first argument:");
$ARGV[1] = MacPerl::Ask("Enter the second argument:");
# (and so on, however many you need....)
}
It doesn't solve all problems, but it works for me most of the time.
Adam
------------------------------
Date: 16 Jan 1998 23:26:20 GMT
From: petdance@maxx.mc.net (Andy Lester)
Subject: Re: Convert .bmp to .jpg via Perl
Message-Id: <69oqas$6te$1@usenet11.supernews.com>
: Could certainly be done in Perl.
: But depending on your software, converting the files "manually"
: may not be onerous. PaintShop Pro, for example, has a
: batch convert feature which may fit your requirements.
Actually, this proves not to be the case. Paint Shop Pro doesn't have
batch capabilities, although its sister product, JASC Image Robot
certainly does. Adobe Photoshop sort of has batch capabilities, if you
use 4.0's actions.
xoxo,
Andy
--
--
Andy Lester: <andy@petdance.com> http://tezcat.com/~andy/
Chicago Shows List: <shows@ChicagoMusic.com> http://ChicagoMusic.com/
------------------------------
Date: Fri, 16 Jan 1998 15:02:15 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Jahnel Klaus <jahnel@xarch.tu-graz.ac.at>
Subject: Re: EMTY FILE?
Message-Id: <Pine.GSO.3.96.980116150126.669Q-100000@user2.teleport.com>
On Thu, 15 Jan 1998, Jahnel Klaus wrote:
> How can i test a file weather its empty or not (but not with the testing
> of the file size)
Could you want the -z filetest? It's documented in the perlfunc manpage.
Hope this helps!
--
Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
Ask me about Perl trainings!
------------------------------
Date: Fri, 16 Jan 1998 17:26:26 -0800
From: Shawn Gordon <sgordon@athena.lbl.gov>
To: Shade Lawrence Jenifer <sjenifer@isc.mds.lmco.com>
Subject: Re: GLOB HELP
Message-Id: <34C008C2.9093FFDC@athena.lbl.gov>
Shade Lawrence Jenifer wrote:
> that take glob variables as arguments. I'm having some
> trouble getting the glob concept down. Is there any material
> out there which explains globbing well? thanks!
>
> shade
Check out chap. 3 of the very well written book
'Advanced Perl Programming' by Srinivasan (O'Reilly).
shawn.
------------------------------
Date: Fri, 16 Jan 1998 15:32:21 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Wayne Patton <wbpatto@wmccmsvr.ssr.hp.com>
Subject: Re: HELP !!
Message-Id: <Pine.GSO.3.96.980116153148.669Z-100000@user2.teleport.com>
On Fri, 16 Jan 1998, Wayne Patton wrote:
> Subject: HELP !!
Please check out this helpful information on choosing good subject
lines. It will be a big help to you in making it more likely that your
requests will be answered.
http://www.perl.com/CPAN/authors/Dean_Roehrich/subjects.post
> @Fields=split "\|" ;
Check the docs for split again. Hope this helps!
--
Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
Ask me about Perl trainings!
------------------------------
Date: Fri, 16 Jan 1998 17:50:12 -0500
From: Scott Holmes <scotth@nyd2.com>
Subject: Help - Perl processes in memory
Message-Id: <34BFE424.33CF276E@nyd2.com>
I have a perl script running on an intranet server that's giving me some
trouble. The machine is Windows NT 4.0 and is running Netscape
Enterprise server 2.0 and Perl 5. The the admin hasn't updated things
since they had NS ver 1.0 so Perl scripts must still be run through a
bat file. This all works fine...but I'm finding that Perl.exe is
building up rapidly in memory until you manually have to go into task
manager and stop all the extra Perl processes to keep the machine from
crashing.
What is causing this problem and how do I fix it? Thanks!
------------------------------
Date: Fri, 16 Jan 1998 19:43:05 -0600
From: Chocolate <poohba@io.com>
Subject: How do I allow input to be retrieved from multiple lines?
Message-Id: <Pine.BSI.3.96.980116194114.11100A-100000@bermuda.io.com>
How do I make it so that if my input needs more than one line I can hit
return without sending it? How do I make it so that a line with only a
period lets it know that I am done inputting?
------------------------------
Date: Fri, 16 Jan 1998 17:07:02 -0800
From: Shawn Gordon <sgordon@athena.lbl.gov>
To: nelson chin <butta1@bu.edu>
Subject: Re: how to mix the order of the lines in a file?
Message-Id: <34C00436.312F03A9@athena.lbl.gov>
how about:
@a = <>;
while(@a) {
$ran = int(rand($#a +1));
print splice(@a,$ran,1);
}
shawn
nelson chin wrote:
>
> How do i mix the rows of data in a file in a random order using
> perl?
------------------------------
Date: Fri, 16 Jan 1998 19:13:20 -0500
From: Bob Trieger <corky@ultranet.com>
Subject: module to calculate dates?
Message-Id: <34BFF7A0.2BFE@ultranet.com>
Is there a perl module/library out there that calculates dates?
I am looking for something that returns a date after I feed a date into
it and tell it to subtract or add a number of days.
I don't want to have to reinvent the wheel. Besides that, mine would
probably be a flat tire.
Any help is appreciated,
Bob Trieger
corky@ma.ultranet.com
------------------------------
Date: 16 Jan 1998 16:32:45 -0800
From: hirano@Xenon.Stanford.EDU (Kelly Hirano)
Subject: Re: module to calculate dates?
Message-Id: <69ou7d$gn@Xenon.Stanford.EDU>
Date::DateCalc
($year,$mm,$dd) = calc_new_date($year,$mm,$dd,$offset);
=======================================================
Starting from the given date, a new date can be calculated
with this function which is "$offset" days away from the
original date. "$offset" may be positive (for a date later
than the original date) or negative (for a date earlier than
the given date).
If the given date is invalid or the new date cannot be
calculated (for instance, if the new date would be before
the year one), an empty list is returned.
To calculate a new date with a year, month and day offset,
see the function "year_month_day_offset()" in the
"Date::DateCalcLib" module.
hope that helps!
kelly
In article <34BFF7A0.2BFE@ultranet.com>,
Bob Trieger <corky@ultranet.com> wrote:
>Is there a perl module/library out there that calculates dates?
>
>I am looking for something that returns a date after I feed a date into
>it and tell it to subtract or add a number of days.
>
>I don't want to have to reinvent the wheel. Besides that, mine would
>probably be a flat tire.
>
>
>Any help is appreciated,
>Bob Trieger
>corky@ma.ultranet.com
--
Kelly William Hirano Stanford Athletics:
hirano@cs.stanford.edu http://www.gostanford.com/
hirano@alumni.stanford.org (WE) BEAT CAL (AGAIN)! 100th BIG GAME: 21-20
--
Kelly William Hirano Stanford Athletics:
hirano@cs.stanford.edu http://www.gostanford.com/
hirano@alumni.stanford.org (WE) BEAT CAL (AGAIN)! 100th BIG GAME: 21-20
------------------------------
Date: Fri, 16 Jan 1998 18:26:14 -0500
From: Lance Arnder <lla@med.unc.edu>
Subject: MS-DOS Window Suppression for Perl System Calls
Message-Id: <34BFEC96.278754C6@med.unc.edu>
Is there a way to suppress the generation of an MS-DOS window
each time I do a system call from Perl for Win32? The window
stays open for the duration of time that the system call needs
to run and then closes. Seeing this window open and close
is distracting.
Thanks,
Lance Arnder
Department of Radiology
University of North Carolina at Chapel Hill
lla@med.unc.edu
------------------------------
Date: 16 Jan 1998 22:56:03 GMT
From: soulsmit@vader.deepsky.com (Soulsmith)
Subject: Perl 5.0040x and FreeBSD-2.2.x
Message-Id: <slrn6bvpbv.2hm.soulsmit@vader.deepsky.com>
I'm having some difficulties with Perl on the FreeBSD platform and I'm
wondering if anybody else has come across the same problems?
This is what I perceive when I run perl5.00401 and perl5.00404 on a
FreeBSD-2.2.1 box:
- Errors like this:
Running '/usr/local/bin/perl /usr/local/lib/perl5/ExtUtils/xsubpp
temp000 2>&1' exits with status 1 at (eval 25) line 41.
- Constant locale errors when running scripts
- Unable to successfully compile perl module makefiles (see the first
point)
When I run it on an UPGRADED FreeBSD-2.2.1 box to 2.2.5:
- Same as above
When I run it on a box which has had a fresh 2.2.5 install:
- No problems.
Can anybody explain this or offer suggestions as to what I can do to fix this?
It is perplexing and making things useless for me. Thanks in advance!
Mike.
------------------------------
Date: Fri, 16 Jan 1998 15:14:15 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Bob <rwp@omni.ac.uk>
Subject: Re: Perl dies with segmentation fault and leaves a core
Message-Id: <Pine.GSO.3.96.980116151307.669S-100000@user2.teleport.com>
On Fri, 16 Jan 1998, Bob wrote:
> Is there anything that a user script can do to cause a Segmentation
> fault and core dump, or is it a perl bug?
Yes, and yes. :-) You should probably file a bug report. Hope this helps!
--
Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
Ask me about Perl trainings!
------------------------------
Date: Fri, 16 Jan 1998 16:29:08 -0800
From: Justin Lee <jlee@sandiegoca.ncr.com>
Subject: perl module question
Message-Id: <34BFFB54.553D@sandiegoca.ncr.com>
I'm having a bit of trouble with perl modules:
I've written the following module for perl5.003,
and placed it in a file called 'Manipulate_Tree.pm'.
---------------------------------------------------------------
package Manipulate_Tree;
require Exporter;
@Manipulate_Tree::ISA = qw(Exporter);
@Manipulate_Tree::EXPORT = qw(Dump_Tree,Recover_Tree,Print_Tree);
sub Dump_Tree {
# subroutine definition omitted
}
sub Recover_Tree {
# subroutine definition omitted
}
sub Print_Tree {
#subroutine definition omitted
}
# EOF
-----------------------------------------
I also have a driver program in another file which consists of the
following:
#!/usr/local/bin/perl
use Manipulate_Tree;
my($tree);
$tree = &Recover_Tree("PRSBD.CONFIG");
print "tree = $tree\n";
&Print_Tree($tree);
#EOF
----------------------------------------
However, when I attempt to run the program the interpreter attempts
to run &Main::Recover_Tree() and &Main::Print_Tree() instead of
&Manipulate_Tree::Recover_Tree() and &Manipulate_Tree::Print_Tree().
My question is the following: Is there a way to write the module so
that I'm not forced to do explicit scope resolution every time I
want to use an imported module?
Thanks in advance,
Justin
------------------------------
Date: Fri, 16 Jan 1998 19:06:43 -0600
From: tadmc@flash.net (Tad McClellan)
Subject: Re: perl module question
Message-Id: <370p96.qm4.ln@localhost>
Justin Lee (jlee@sandiegoca.ncr.com) wrote:
: I'm having a bit of trouble with perl modules:
: I've written the following module for perl5.003,
: and placed it in a file called 'Manipulate_Tree.pm'.
: ---------------------------------------------------------------
: package Manipulate_Tree;
: require Exporter;
: @Manipulate_Tree::ISA = qw(Exporter);
: @Manipulate_Tree::EXPORT = qw(Dump_Tree,Recover_Tree,Print_Tree);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Export one (pretty long) symbol. I expect you were trying to
export three symbols?
I think you should s/,/ /g there...
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: 16 Jan 1998 17:12:49 -0700
From: Randal Schwartz <merlyn@stonehenge.com>
To: terry@rednickel.com (Terry Lecander)
Subject: Re: Problem running HTML Processor script
Message-Id: <8cpvlslzzy.fsf@gadget.cscaper.com>
>>>>> "Terry" == Terry Lecander <terry@rednickel.com> writes:
Terry> I am fairly new a implementing Perl scripts and am no
Terry> programmer. I am trying to make use of a script that is ment to
Terry> insert HTML fragments into and existing HTML page. The script
Terry> was written by Carl Davis "cdavis@interaccess.com" to give
Terry> credit.
Well, I don't know, and maybe this is just a shot in the dark, but...
... since you're no programmer, how about hiring
cdavis@interaccess.com to come give you some help? He's probably
pretty familiar with his own code.
:-)
And Perl really wasn't intended for people that call themselves "no
programmer". If you need perl hacking done, hire a Perl hacker, or
get a good book on Perl (I could recommend a few :-) and *learn* to be
a programmer. There's really no two ways around it.
"I wanna drive this big truck full of expensive stuff, but I'm no
driver. Can someone just point out where the radio is? ... I'll be
fine once I can change the station." :-)
print "Just another Perl hacker," # but not what the media calls "hacker!" :-)
## legal fund: $20,990.69 collected, $186,159.85 spent; just 227 more days
## before I go to *prison* for 90 days; email fund@stonehenge.com for details
--
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: 16 Jan 98 22:52:09 GMT
From: Nathan Neulinger <nneul@umr.edu>
Subject: Problems building perl5.00404 on AIX 3.2.5
Message-Id: <34bfe499.0@news.cc.umr.edu>
I have been unable to get perl5 built on aix 3.2.5.
----------
.....
chmod 644 Fcntl.bs
LD_RUN_PATH="" ld -o ../../lib/auto/Fcntl/Fcntl.so -H512 -T512 -bhalt:4
-bM:SRE -bI:../../perl.exp -bE:Fcntl.exp -e _nostart -lc Fcntl.o
Fcntl.o(.pr+0xa):Fcntl.c: undefined reference to `errno'
Fcntl.o(.pr+0x54):Fcntl.c: undefined reference to `strncmp'
Fcntl.o(.pr+0x6c):Fcntl.c: undefined reference to `strcmp'
Fcntl.o(.pr+0x9c):Fcntl.c: undefined reference to `strcmp'
Fcntl.o(.pr+0xcc):Fcntl.c: undefined reference to `strcmp'
....
----------
If I manually edit the Makefile in ext/Fcntl/, and add a /lib/libc.a to
the ld line, it works, but this is obviously not going to work on a
global basis.
This problem occurs whether I build it with gcc or with cc.
Has anyone successfully gotten this to work?
-- Nathan
------------------------------------------------------------
Nathan Neulinger EMail: nneul@umr.edu
University of Missouri - Rolla Phone: (573) 341-4841
Computing Services Fax: (573) 341-4216
------------------------------
Date: 16 Jan 1998 23:44:43 GMT
From: petdance@maxx.mc.net (Andy Lester)
Subject: Puzzling behavior of c.l.p.* readers
Message-Id: <69ordb$mi3$1@usenet48.supernews.com>
I'm vaguely amused by a couple of behaviors here in the c.l.p.* groups.
These people seem to pop up all the time.
* People who automatically think that something besides their code is
broken: "Subject: CGI.pm broken????!?!?"
Take a look at the revision list for it. You'd think that if it wasn't
processing environment variables properly, that someone besides you would
have caught it by now, eh?
* People who tell us how urgent things are for them, as if we care about
their level of stress, usually over something trivial:
"Subject: URGENTLY NEED HELP!" with a body roughly "I need to know how to
take the last character from a string!"
* People who try to fit Perl into their BASIC/C/whatever paradigms, and
have apparently looked at NO code besides their own, anywhere.
"I want to see if the first character of a string is a Y. Here's what I
have so far:
$string = "Yes";
$firstchar = substr( $string, 1, 1 );
if ( $firstchar == "Y" ) || ( $firstchar == "y" ) { ...
but it doesn't work! Why?"
Sooner or later, you have to learn to use the tool you're using, no?
* People who negate any chance of correspondence in their spamanoia. This
is all over Usenet, of course, but I'm amazed whenever I see it:
"Remove the '.fuckyouspammers' from my email address in order to send me
mail." No, I won't. You're on your own.
xoxo,
Andy
--
--
Andy Lester: <andy@petdance.com> http://tezcat.com/~andy/
Chicago Shows List: <shows@ChicagoMusic.com> http://ChicagoMusic.com/
------------------------------
Date: Fri, 16 Jan 1998 19:06:45 -0500
From: "David A. Frantz" <wizard@eznet.net>
Subject: Re: Puzzling behavior of c.l.p.* readers
Message-Id: <34bff535.0@news.eznet.net>
Andy Lester wrote in message <69ordb$mi3$1@usenet48.supernews.com>...
>>Sniped
>
>* People who negate any chance of correspondence in their spamanoia. This
>is all over Usenet, of course, but I'm amazed whenever I see it:
>"Remove the '.fuckyouspammers' from my email address in order to send me
>mail." No, I won't. You're on your own.
>
Andy for the most part I would agree with you and I'am a new PERL user.
But
the above remark kinda leaves me wondering if you have every recieved on
occasion
to much junk mail. Its sad but there may be good reason for some to
respond as
above.
Dave
>xoxo,
>Andy
>
>--
>--
>Andy Lester: <andy@petdance.com> http://tezcat.com/~andy/
>Chicago Shows List: <shows@ChicagoMusic.com> http://ChicagoMusic.com/
>
------------------------------
Date: Fri, 16 Jan 1998 19:23:45 -0600
From: tadmc@flash.net (Tad McClellan)
Subject: Re: Reg Expression, Case change of memory variables
Message-Id: <171p96.9p4.ln@localhost>
Colin Kuskie (colink@latticesemi.com) wrote:
[snip]
: 1) Regexp tip 1: How to get out of escaping the / character
: Not many people bother to read the man pages, so they don't know that
: ANY character can be used as the regexp delimiter:
^^^^^^^^^^^^^
^^^^^^^^^^^^^
like an 's', for instance?
ss(APP)\.(\w+)\.(\w+)s$1/$2/$3sgi
Nope ;-)
"A lot" of characters other than slash, but not *any* character.
from 'perlop':
"Any non-alphanumeric, non-whitespace delimiter may
replace the slashes."
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Fri, 16 Jan 1998 15:00:07 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Andrew Spiers <andrew.spiers@virgin.net>
Subject: Re: Search Script -Comment please
Message-Id: <Pine.GSO.3.96.980116145403.669P-100000@user2.teleport.com>
On Thu, 15 Jan 1998, Andrew Spiers wrote:
> I have written a script to search through my site and return urls of
> pages found and the number of matches. I am looking for comments
> #!/usr/bin/perl
It's good to use -w, even though some error messages will merely annoy
you. The rule is, "When you completely understand every error message you
get, you can ignore them. And when you understand every error message you
_can_ get, you can turn of -w entirely." :-)
'use strict' is similarly helpful in preventing programming errors. I
recommend it whenever a script will grow beyond about a screenful of text.
> find (\&wanted, '/web');
>
> sub wanted { return unless /htm/; push @ARGV, $File::Find::name; };
That regular expression may or may not be what you want. Do you want to
match 'html_info.txt' and not 'homepage.HTML'? I'd think you want
/\.html?$/i , or something like that.
> while (<>) {
While that construct is handy for q&d applications, you should be aware
that if a file isn't readable, you'll get an error message. That's not
generally appropriate for a CGI script, of course.
Hope this helps!
--
Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
Ask me about Perl trainings!
------------------------------
Date: Fri, 16 Jan 1998 15:31:11 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: matthew@ukonline.co.uk
Subject: Re: Using SetUID
Message-Id: <Pine.GSO.3.96.980116153050.669Y-100000@user2.teleport.com>
On 16 Jan 1998 matthew@ukonline.co.uk wrote:
> I have been told that there is a function in perl (setuid?)
You probably want the perlsec manpage. Hope this helps!
--
Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
Ask me about Perl trainings!
------------------------------
Date: Fri, 16 Jan 1998 17:59:23 -0600
From: Brad Bradley <mrbaseball2@rocketmail.com>
To: matthew@ukonline.co.uk
Subject: Re: Using SetUID
Message-Id: <34BFF45B.8FCAAAB4@rocketmail.com>
Matt,
The best technique I found for this is to use the 'wrapsuid' program. It is freely available and quite easily configured. It simply places a C wrapper around the script and runs it as root, ot
whatever ID you want.
HTH,
Brad Bradley
> I have a script (b) that is called from another script(a) on a seperate server.
>
> Script b creates various files, according to the info passed from script a. The problem is, script b assumes the permissions of script a, which means script(b) is not allowed to create any files.
>
> I have been told that there is a function in perl (setuid?) that allows the second script(b), to assume a seperate set of permissions. i.e script A perms = me script b perms = you.
------------------------------
Date: Fri, 16 Jan 1998 15:06:13 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Wussy <noblecomputing@erols.com>
Subject: Re: What's this error
Message-Id: <Pine.GSO.3.96.980116150457.669R-100000@user2.teleport.com>
On Thu, 15 Jan 1998, Wussy wrote:
> Subject: What's this error
When Perl gives you an error message that you don't understand, you should
first try to find it in the perldiag manpage. Hope this helps!
--
Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
Ask me about Perl trainings!
------------------------------
Date: Sat, 17 Jan 1998 01:13:30 GMT
From: wcb4@erols.com (William Byrd)
Subject: Re: Win95: can I associate file type with perl script?
Message-Id: <69oqnb$gtu$2@winter.news.erols.com>
On 16 Jan 1998 00:38:51 GMT, "Don Silvia" <lyanddon@peapod.com> wrote:
>Us windows kids fear the command line.
>Thanks,
>Don Silvia
Don't give us all a bad name. Many us us "WINDERS KIDZ" still remember
the C:\> prompt fondly for all its fault, it was simple and much more
elegant, which is why those of us like that kinda live dual
windows/unix lives at times.
Bill
-----------------------------------------------------
Please always check the syntax before applying any fix
anyone gives you on a newsgroup, no one is perfect.
Not everyone reads the newgroups every day, but most
check their e-mail. A private e-mail with the answer
as well as the NG posting is often appreciated.
Just my 2 cents worth.
------------------------------
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 1658
**************************************