[6845] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 470 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue May 13 21:07:29 1997

Date: Tue, 13 May 97 18:00:31 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Tue, 13 May 1997     Volume: 8 Number: 470

Today's topics:
     --------------- Comprehensive Internet Programmer's Res (Thomas Porter, Ph.D.)
     Re: [Q] program execution (A. Deckers)
     Re: A Perl Question (etta )
     Analyzing my() variables in the debugger <achoy@us.oracle.com>
     Re: Basic question -"Do you set execute bits"? <rootbeer@teleport.com>
     Re: Best Perl Book <allenjs@nic.techops.lmco.com>
     Re: control-M makes for very long $_ <djohnson@uu.net>
     Re: DB access with Perl <boei@trifox.com>
     Re: Definition of $<digit> in perlvar.pod (David Alan Black)
     Re: Definition of $<digit> in perlvar.pod (Ilya Zakharevich)
     Re: Graphing a tree from a text <rootbeer@teleport.com>
     Re: How to run Perl scripts directly from netscape on a (Matthew Burnham)
     Re: Learning PERL <rootbeer@teleport.com>
     Re: More problems with FileHandle (Tim  Smith)
     Re: New draft of scripting white paper <cimarron@dis.org>
     Re: Newbie flock() question <rootbeer@teleport.com>
     Re: Pattern Matching Help Needed!! (Eclectic?)
     Re: Perl 5.003_07 and FrontPage 97 <stranw@gte.net>
     Perl on Windows NT4.0 (Jenny Khuon)
     Re: Perl on Windows NT4.0 <allenjs@nic.techops.lmco.com>
     Re: Private area using Perl/CGI (Abigail)
     Re: Private area using Perl/CGI (Tung-chiang Yang)
     Re: Private area using Perl/CGI <ketilf@ifi.uio.no>
     problem with script that processes a form  -  2 Attachm hitesh@etnet.lloyds-tsb.co.uk
     Re: Procedure to count unique lines (....What Is?....)
     Re: Randal Schwartz (Scott Erickson)
     Re: SOLUTION: Drawing a graph? (David Combs)
     Re: speeding up a regex (Tim  Smith)
     Start, Stop, Restart, Kill a Process and Subprocesses.  <dorman@s3i.com>
     Timeline for better support for tied arrays? (....What Is?....)
     Re: Timer on my perl script (Brooks Davis)
     Re: Timer on my perl script (Mike Stok)
     Re: unlink vs. system("rm...") (Mike Stok)
     Re: Year 2000 compliance (Abigail)
     Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: Tue, 13 May 1997 23:40:34 GMT
From: tporter@dtool.com (Thomas Porter, Ph.D.)
Subject: --------------- Comprehensive Internet Programmer's Resource ----------------
Message-Id: <337afaa6.68591802@news.one.net>

An Internet Programmer's Paradise (if there is such a place). A most
comprehensive index containing 100's of links to the following
resources:
HTML, The CGI, UNIX, Perl, Java, Javascript, Computer Companies,
Technical Information,
Win95, and Newspapers & Magazines. Updated browser common atrributes.
Even contains a section for newbies [basic training], relaxing w/
Dilbert, 
and other entertainment. 

Updated every 2-3 days w/ the latest interesting [to me] technical
news.

URL: http://www.dtool.com

[Optional comments]

This site was coded using HomeSite v 6.4001, Frontpage 2002,
Javascript rev
8.012c, and is best suitable for viewing on a system using Nav v
127.03b138551,
or MSIE v 5.02b/clsid:12345678-1234-1234-1234-123456789012". 

Minimum System requirements: 8192x6144 video display: 128 megs SDRAM,
Intel Merced 
overclocked to 183, redundant OC3 dialup, and serial mouse.  O/S's
supported:
Win 2013 [ beta !!!].  What else is there???     

This site may destroy your monitor... & worse

It will format your hard drive. Not only that, but it will scramble
any disks that are even close to the computer. It will reset all of
your SCSI ID's & pull the jumpers out of every ISA card.  It will
install Claris & Frontpage 97 three times each, then put them in the
Start folder. It will moved your swap file to your Jaz drive, then
store the swap on an X-jack modem card that it wedged into the drive
slot.  

It will recalibrate your refrigerator's coolness setting so all your
ice cream melts. It will demagnetize the strips on all your credit
cards, reset the timer to 12:00 on all the VCR's in the house and use
subspace field harmonics to scratch all your Carpenters CD's. It will
mix Drano in your fishtank, drank all the milk, and leave its socks
out on the coffee table. It will switch the bands between all the
Macanudo & Don Diego's in your humidor.It will put a dead squirrel in
the back pocket of your good pants and hide your car keys when you are
late for work.

This site will make you fall in love with a penquin. It will give you
nightmares about circus midgets, 3 tubes of toothpaste, a litre of
lime jello, and one of those shiatsu massagers. It will pour sugar in
your gas tank and shave off both your eyebrows, while it dates your
significant other behind your back and then bill the dinner and hotel
room to your VISA card

It will kick your dog. It may eat all of your goldfish. It will leave
libidinous messages on your mother's voice mail in your voice! It will
leave the toilet seat up and forget to flush. It will make a batch of
amphetamines in your bathtub, and then leave bacon burning on the
stove while it goes out to chase gradeschoolers with your new mulching
mower.  

You have been warned...
=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=
                 tporter@dtool.com     			
		 Thomas Porter, Ph.D.
	         THE DIGITAL TOOL GROUP
		 http://www.dtool.com

	   "Never attribute to malloc
that which can be adequately explained by stupidity"
=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o
	


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

Date: 11 May 1997 17:53:27 GMT
From: I-hate-cyber-promo@man.ac.uk (A. Deckers)
Subject: Re: [Q] program execution
Message-Id: <slrn5nc1sk.46i.I-hate-cyber-promo@nessie.mcc.ac.uk>

In comp.lang.perl.misc,
	cjk@omedsrvb.omed.pitt.edu wrote:
>
>Hi
>
>I have starting learing perl and confused with a little program I wrote.
>I bought the O'Reily mouse book and type in an example pgm, code
>snippet:
>
>#!/usr/bin/perl
>print "Content-type: text/html\n\n";
>print "<HTML> \n";
>print "<HEAD> \n";
>print "<TITLE> "xxxxxxxxxxxxxxxx",  </TITLE> \n";
>print </HEAD> \n";
       ^
       Typo.

Alain

-- 
Perl information: <URL:http://www.perl.com/perl/>
        Perl FAQ: <URL:http://www.perl.com/perl/faq/>
    Perl archive: <URL:http://www.perl.com/CPAN/>


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

Date: Sun, 11 May 1997 19:37:19 GMT
From: etta@fyi.com (etta )
Subject: Re: A Perl Question
Message-Id: <33761ef3.159457825@netnews.worldnet.att.net>

On Sun, 11 May 1997 18:31:51 GMT, "Tom Nuss" <info@tomworld.demon.nl>
wrote:

>
>
>Ali Ranjbar <ranjbar@cig.mot.com> schreef in artikel
><33721653.41C67EA6@cig.mot.com>...
>> Hello there;
>> 
>> I am new to Perl. I am trying to search for parentheses in a string and
>> then get read of them. Getting read of them should not be difficult.
>> However; sounds like Perl is using () for memory in regular expressions.
>> How do I do that. I tried:

>> if ($summary=~ /\(/{ # where $summary has the string I am searching in.
maybe this will work   if($summary =~ s/\(/ /) eg;
or maybe this:  $summary =~ tr/\(/ /;
did you try to you the split method?

etta

>> I also tried:
>> if ($summary=~ /(/{ # where $summary has the string I am searching in.
>> 
>> and
>> if ($summary=~ /(|)/{ # where $summary has the string I am searching in.
>> 
>> Every time I get a syntax error.
>> -- 
>> Ali N. Ranjbar			Motorola CIG, IL75-3J5
>> Phone:(847)435-9797		Fax:(847)632-5959     E_mail:ranjbar@cig.mot.com
>> 
>> I will not let anyone walk through my mind with their dirty feet.
>> 							Mahatma Gandhi
>> 



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

Date: Tue, 13 May 1997 16:06:11 -0700
From: Allen Choy <achoy@us.oracle.com>
Subject: Analyzing my() variables in the debugger
Message-Id: <3378F3E3.4B4E@us.oracle.com>

Does anyone know if it's possible to look/analyze my-type variables
in the debugger?  It's a pain to put print statements.

Thanks in advance,

Allen


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

Date: Tue, 13 May 1997 13:36:18 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: brennan@byte-back.com
Subject: Re: Basic question -"Do you set execute bits"?
Message-Id: <Pine.GSO.3.96.970513133350.4466H-100000@kelly.teleport.com>

On Sun, 11 May 1997 brennan@byte-back.com wrote:

> I am trying to get a perl script to run on a web server 

> Do you have to set the execute bit on a perl script? 

Generally, you do set the execute bit on any script to make it usable from
the command line on a Unix-type system. I'd expect most webservers to want
it set on CGI scripts as well, although they could be made to not require
it. 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: Tue, 13 May 1997 14:46:19 -0700
From: Jay Allen <allenjs@nic.techops.lmco.com>
To: loay@micron.net
Subject: Re: Best Perl Book
Message-Id: <3378E12B.2A69@nic.techops.lmco.com>

Loay M. A. wrote:
> 
> I've heard about Perl and I am impressed so far.  Could someone
> please, recommend a good Perl book for me as a starting point.

	grep WWW /ORA*Perl/    -->>  http://www.ora.com/

Great books...

  -j-
---------
Jay Allen
allenjs@nic.techops.lmco.com
ICYRA-Internet Coordinator
Lockheed-Martin - Web Page Lead
The Maxim Group - Sr. Programmer/Analyst
(w) (310) 727-1086
(h) (562) 433-7727


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

Date: Mon, 12 May 1997 16:31:45 -0500
From: Dale Johnson <djohnson@uu.net>
To: Tom Lewis-Flood <t.lewisflood@elsevier.com>
Subject: Re: control-M makes for very long $_
Message-Id: <33778C41.446B9B3D@uu.net>

Tom Lewis-Flood wrote:
> 
> I'm debugging someone's perl cgi script and I hardly know perl, so here
> it goes:
> 
> 1. I look at a file with less and I see control-Ms where I would expect
> to see newlines. I presume this is because the file was created with
> DOS.
> 

This is correct.  When you create a file in a DOS based system, you must 
transfer it in ASCII mode (if it is a text file) when you move it to a 
unix system.  The ^M 's will be swapped out if you transfer via ASCII
mode.

> 2. The script is supposed to print the file between html <PRE> tags.
> When the script says,
>     while  (<FILEHANDLE>) {
>         print;
>     }
> and nothing comes out, but when I change the file with the commandline,
>         perl -p -i -e 's#^M#\n#g' filename.txt
> it outputs the file properly.
> 
> 3. I've tried things like,
>     s#\cM#\n#g;
>     while  (<FILEHANDLE>) { 
>         print;
>     }

The problem here is that during the while(<FILEHANDLE>) {} routine, you
are
still just reading each line in and then printing.  I'd do something
like this:

while  (<FILEHANDLE>) {
     s#\cM#\n#g;
     print;
}

You need to alter EACH LINE of <FILEHANDLE>, so before printing each
line, 
you need to remove the ^M's before printing.  That is, if you don't
correct
the problem at the FTP of the file from DOS, that is.

Good luck.

Dale


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

Date: Mon, 12 May 1997 08:45:33 -0700
From: Bob Eisner <boei@trifox.com>
Subject: Re: DB access with Perl
Message-Id: <33773B1D.5A6@trifox.com>

Paul Vermette wrote:
> 
> I am looking for any product that will allow me
> to connect to any database using perl
> 
> I am trying to construct a list of them so that
> I can evaluate them
> 
> Please don't bother mentioning dbPerl or DBI I
> already know about those <g>

Trifox has a product, VORTEXperl.  It talks to multiple RDBMS.
It uses Perl Sockets so there is no need to re-build the Perl
runtime.  

Please see http://www.trifox.com for details.

The beta version is available on our FTP server:

 ftp://ftp.trifox.com/pub/products/perl/vtxperl.tar

Regards,

Bob Eisner
408.369.2392


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

Date: 13 May 1997 16:10:35 GMT
From: dblack@icarus.shu.edu (David Alan Black)
Subject: Re: Definition of $<digit> in perlvar.pod
Message-Id: <5la3pr$b9c@pirate.shu.edu>

Hello -

allen@gateway.grumman.com (John L. Allen) writes:

>        perl -e '$_="abcd"; /(?:(b)|(c))+/; print "$1:$2:$3:$4\n"'
>        :c::
>
>        perl -e '$_="bcde"; /(?:(b)(c)|(d)(e))+/; print "$1:$2:$3:$4\n"'
>        :c:d:e
>
>One or both of these examples exhibit bugs.  I'm asking what the correct
>output should be and why.  In the name of consistency, the outputs should
>be either
>
>        :c::   and   ::d:e
>
>or
>
>        b:c::  and   b:c:d:e
>
>Now, which is it?

Ummm, neither.  Here's my best shot at explaining it, with some
incremental examples.

(This comes to you from an end-of-semester, influenza-enhanced,
exam-grading stupor.  Corrections are welcome.  But I think
it's basically sound :-)

#!/usr/local/bin/perl -w

$_="abcd"; /([bc])+/; print "$1:$2:$3:$4\n";
# c:::
# matches 'bc'.  Does it one character at a time, so $1
# returns only one character (not the whole match).
# It returns 'c', not 'b', because the most recent
# successful match *of the expression in parentheses*
# (as opposed to the whole pattern) was 'c', not 'b'.

# Compare with:
$_="abcd"; /([bc]+)/; print "$1:$2:$3:$4\n";
# bc:::
# where the parentheses surround the quantifier, and which
# therefore returns the whole match (as opposed to isolated
# characters from it).

$_="abcd"; /(b|c)+/; print "$1:$2:$3:$4\n";
# c:::
# Similar to first example ([bc])

$_="abcd"; /((b)|(c))+/; print "$1:$2:$3:$4\n";
# c::c:
# The outer parens now match $1.  $2 isn't set, because
# as of the last success, the match was with 'c', not 'b'
# (and the parens around (b) are $2's parens.)  Hence $1 and
# $3 match, but not $2 or $4.

$_="abcd"; /(?:(b)|(c))+/; print "$1:$2:$3:$4\n";
# :c::
# This time, due to ?:, the outer parentheses don't count
# in the $<digit> numbering, so whatever is returned by
# (b) is $1 (namely, nothing), and whatever is returned
# by (c) (namely, 'c') is $2.

$_="bcde"; /((b)(c)|(d)(e))+/; print "$1:$2:$3:$4\n";
# de::c:d
# Here, the outer parens "remember" 'de'.  The $2 parens
# remember nothing, because at the time of the 'de' match,
# the (b)(c) side failed.  In fact, it failed on (b),
# which cleared $2 (i.e., those parens now come up empty),
# but - since it could jump over the (c) to the other side
# of the | - the original $3 match on 'c' is still there.
# ($5 is set to 'e' in this example, by the way.)

$_="bcde"; /(?:(b)(c)|(d)(e))+/; print "$1:$2:$3:$4\n";
# :c:d:e
# Similar principles apply, except the matches are all
# moved over to the left (as regards the $<digit> numbering)
# because the ?: causes the outer parens not to remember
# anything.

__END__

David Black
dblack@icarus.shu.edu


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

Date: 14 May 1997 00:12:10 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: Definition of $<digit> in perlvar.pod
Message-Id: <5lb00q$a2v$1@mathserv.mps.ohio-state.edu>

[A complimentary Cc of this posting was sent to David Alan Black
<dblack@icarus.shu.edu>],
who wrote in article <5la3pr$b9c@pirate.shu.edu>:
> $_="abcd"; /((b)|(c))+/; print "$1:$2:$3:$4\n";
> # c::c:

This is a bug in perl.

  perl -le '$_ = "abcd"; /((b)|(c))+/; print defined $2, "," , length $2'
  1,0

So it did match.  It is just set to wrong value (better in my copy).

> # The outer parens now match $1.  $2 isn't set, because
> # as of the last success, the match was with 'c', not 'b'
> # (and the parens around (b) are $2's parens.)  Hence $1 and
> # $3 match, but not $2 or $4.

Wrong: Since the second set of parenths did match (during the first
match of the group-1), $2 should be set to the value it matched.

Hope this helps,
Ilya


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

Date: Tue, 13 May 1997 14:59:51 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: Mike McLeod <mcm@mround.bt.co.uk>
Subject: Re: Graphing a tree from a text
Message-Id: <Pine.GSO.3.96.970513144918.4466T-100000@kelly.teleport.com>

On 12 May 1997, Mike McLeod wrote:

> Does anyone know of a chunk of code that will take a text representing a
> tree and convert it into a graphical representation in say gif format? 

I can see it now. Here's the input: "It's kinda tall, in a meadow, with
nice leaves all green in the spring air, and there's a pretty girl sitting
underneath it, writing poems." 

    I think that I may never see
      Perl code which draws (from text) a tree.
    Indeed, lest you a module call,
      I doubt you'll draw a tree at all.

Check out the graphics drawing modules (and maybe some of the text parsing
modules) on CPAN. Hope this helps! 

    http://www.perl.org/CPAN/
    http://www.perl.com/CPAN/

-- 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: Sun, 11 May 1997 18:59:32 GMT
From: danew@enterprise.net (Matthew Burnham)
Subject: Re: How to run Perl scripts directly from netscape on a local PC ?
Message-Id: <33778c3e.21315505@194.72.192.4>

Erik Paardekooper <E.G.J.Paardekooper@Syntegra.net> wrote:

>On my work I create Perl programs, which I can directly access with my
>internet browser.
>
>Now I want to do this the same at home on my local Windows95 PC. The
>only way to look at the output with my browser, is to redirect the
>output of the Perl program to a HTML file and read this file into my
>browser. 
>They told me I needed a webserver environment to do this (and work with
>partitions). Who can supply me with information how to do this ?
Get something like OmniHTTPD (I can't remember the url atm, I think it's
a Harvard Uni, but just do a search).



-- 
Matthew Burnham, Manager, MindWeb | danew@enterprise.net
Commercial web design and hosting, reasonable rates
UKP24/Mb/Year for DIY space | mindweb@pobox.co.uk
FTP, CGI, password protection, etc. too!
http://www.virtual-pc.com/mindweb/


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

Date: Tue, 13 May 1997 13:50:43 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: Darren Shilson <dshilson@plym.ac.uk>
Subject: Re: Learning PERL
Message-Id: <Pine.GSO.3.96.970513134737.4466K-100000@kelly.teleport.com>

On Fri, 9 May 1997, Darren Shilson wrote:

> I'm relatively new to PERL programming and would really like to find out
> as much as I can about the language. However being a poor student I
> can't fork out loads of money on books, but I've got free Internet
> Access, so if you know of any on-line tutorials, e-zines, e-books, etc,
> I'd love to hear from you. 

   http://www.perl.org/
   http://www.perl.org/CPAN/
   http://www.perl.com/CPAN/

-- 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: 11 May 1997 12:25:02 -0700
From: trs@azstarnet.com (Tim  Smith)
Subject: Re: More problems with FileHandle
Message-Id: <5l56ee$rfa@web.azstarnet.com>

In article <5l44lg$e18$1@murrow.corp.sgi.com>,
Gene Johannsen <gej@spamalot.mfg.sgi.com> wrote:
>    my $fh = new FileHandle ">>$file";
>
>    return bless \$fh, $class;
>
>It's not the right way, I get errors like ``String found where operator
>expected'' when I try to write to the file.  What is the correct way to
>do this?

You shouldn't need to return a reference to the FileHandle.  Just:

return bless $fh, $class;

Tim



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

Date: Mon, 12 May 1997 15:22:12 -0700
From: Cimarron Taylor <cimarron@dis.org>
Subject: Re: New draft of scripting white paper
Message-Id: <33779814.7897@dis.org>

lvirden@cas.org wrote:
> Can you provide specific examples of the types of things you believe one
> cannot do in Tcl but which would be required to be able to be done to
> be able to create domain specific APIs?  During the previous part of this
> thread, I had thought of Expect for instance as an example of a domain specifc
> API.  Obviously, there are some implications of your statement above which
> eliminates Expect from being such a construct.  I'm curious to understand
> the implication.

	I'm not a serious user of Expect but I've followed its development
	since  Don Libes's initial Usenix paper was published.  I think
	say that Expect is a great tool and an example of the upper limit of
	what you can do with Tcl.  Expect's model of specifying Tcl actions
	to take in response to input makes many tasks much simpler.  However
	I don't believe expect itself has any mechansism one can use to 
	reason about the interactions themselves.  For instance, it has no
	way of examining the arbitrary Tcl actions associated with an input 
	sequence so it can't really do actual protocol verification.

	The things Tcl is not really suitable for are the things
	which require altering or extending the fundamental semantics
	of expression evaluation.  My work involves data management,
	symbolic processing and communication and I find Tcl has 
	few of the concepts I want.  For instance, it doesn't have much 
	support for declarative query processing, integrity constraints, 
	rules, data type semantics, transaction models or access plans.  
	As such, it doesn't make a good language in which to build the 
	framework of data management applications.  So if your application 
	involves data management, it's probably no suprise that you're 
	probably better off to use SQL or some other language closer 
	to the problem domain (data management).  

	I'm sure I could come up with more examples, but I want to respond
	to Raymond's post as well before I have to get to the airport...


	Cimarron Taylor
	cimarron@dis.org


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

Date: Tue, 13 May 1997 13:55:48 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: Dannyman <dannyman@arh0135.urh.uiuc.edu>
Subject: Re: Newbie flock() question
Message-Id: <Pine.GSO.3.96.970513135152.4466L-100000@kelly.teleport.com>

On 13 May 1997, Dannyman wrote:

> 	One locks files, yet flock is called on file descriptor. 

Correct. That way, if your program fails to unlock the file for any reason
before it terminates, the file is automatically unlocked at termination. 
(This cannot, of course, prevent your program from hanging and keeping the
file locked indefinitely.) 

> The methodology used on page 154 of Gundavaram involves locking the
> file, reading it in, unlocking it, then re-opening the file, locking it,
> and writing it again.

I don't have that book handy, but I hope it warns you that (as you
suspected) another process may modify the file during the interval during
which the lock is dropped. I usually recommend re-reading upon every open.

I think you could use the methods in Randal's fourth Web Techniques
column, which explains how to use flock() to avoid problems when multiple
processes need to modify one file. Hope this helps! 

   http://www.stonehenge.com/merlyn/WebTechniques/

-- 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: Tue, 13 May 1997 23:12:32 GMT
From: Eclectic?@zu.net (Eclectic?)
Subject: Re: Pattern Matching Help Needed!!
Message-Id: <3378ec93.31731127@news.earthlink.net>

On Mon, 12 May 1997 03:22:50 GMT, frank@primemail.com (Frank Fisher)
wrote:

>I have a string I'm trying to match on:
>
>$filter = "this is a test string 1234****";
>$str = "1234****";
>
>I get the following perl error:
>
>/*/: ?+* follows nothing in regexp at test.pl line 58
>
>this is line 58:
>
>if ($str =~ /$filter$/)
>
>Is there anyway to turn off perl trying to see the * char as a special
>character?  I need to look at the last part of the string which is
>1234****
>
>Thanks...
>
>--frank
>
>
If you place a \ in front of a meta,  it makes it a normal

Mike Dore
Senior partner
CyebrExpressions
mike@cyxp.com
(Still a newbie, but learning on-line at
http://www.mcp.com/waite/ezone)


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

Date: 13 May 1997 21:48:41 GMT
From: "William Stranathan" <stranw@gte.net>
Subject: Re: Perl 5.003_07 and FrontPage 97
Message-Id: <5lanjp$l9p$2@news13.gte.net>

If you use the personal web server, that should work fine.  I'm not sure
about the web server that came with the beta.  Anyhow, personal web server
is just a watered down IIS, so if you read the docs (INCLUDING THE
MICROSOFT KNOWLEGE BASE!) regarding the install for IIS, you should be
fine.  You will need to update the registry yourself.

HKEY_LOCAL_MACHINE/System/CurrentControlSet/Services/W3Svc/Parameters/Script
Map

Add .pl   <Path to perl.exe> %s

The %s MUST be lowercase.  I'm a caps kinda' guy, and it took me two hours
to figure out that the %s must be lowercase

Elmar H. Band <media@telcel.net.ve> wrote in article
<01bc5d70$ee6136c0$0fc088d0@TELCEL.TELCEL.NET.VE>...
> Hi there,
> 
> I just installed Perl Version 5.003_07 on Win95 and tried to get it
running
> on FrontPage 97 as a local server. It doesn't work, I'm getting the da..
> 500 Server error all the time. I tried it on FolkWeb and it worked fine. 
> 
> Is there anybody out there using Perl in conjunction with FrontPage 97?
> 
> Help!
> 
> Greetings from Venezuela,
> 
> Elmar.
> 
> 


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

Date: 12 May 1997 21:19:09 GMT
From: jkhuon@athena.mit.edu (Jenny Khuon)
Subject: Perl on Windows NT4.0
Message-Id: <5l81gd$op0@senator-bedfellow.MIT.EDU>


-- 

Hi!

Does anyone can give me a pointer where I can get perl's Windows NT version.

thanks -Jenny






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

Date: Tue, 13 May 1997 14:36:55 -0700
From: Jay Allen <allenjs@nic.techops.lmco.com>
To: Jenny Khuon <jkhuon@athena.mit.edu>
Subject: Re: Perl on Windows NT4.0
Message-Id: <3378DEF7.70FA@nic.techops.lmco.com>

Jenny Khuon wrote:
> 
> Does anyone can give me a pointer where I can get perl's Windows NT version.

http://www.activeware.com/

> thanks -Jenny

	No problem...

  -j-
---------
Jay Allen
allenjs@nic.techops.lmco.com
ICYRA-Internet Coordinator
Lockheed-Martin - Web Page Lead
The Maxim Group - Sr. Programmer/Analyst
(w) (310) 727-1086
(h) (562) 433-7727


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

Date: Tue, 13 May 1997 21:55:58 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Private area using Perl/CGI
Message-Id: <EA53LA.EG1@nonexistent.com>

On Tue, 13 May 1997 22:18:14 +0200, Ketil Froyn wrote in
comp.lang.perl.misc URL: news:3378CC86.4499@ifi.uio.no:
++ Does anyone know how to make a section of web-pages that needs a
++ password to access?

Yes.

++ password to access? If so, would you like to share your knowledge with
++ me? :)

No. Why on earth are you asking this in comp.lang.perl.misc?
Don't you know that soc.culture.china is the obvious place to ask?



Abigail


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

Date: Wed, 14 May 1997 00:04:58 GMT
From: tcyang@netcom.com (Tung-chiang Yang)
Subject: Re: Private area using Perl/CGI
Message-Id: <tcyangEA59KA.893@netcom.com>

Abigail (abigail@fnx.com) wrote:

: (deleted)

: ++ password to access? If so, would you like to share your knowledge with
: ++ me? :)

: No. Why on earth are you asking this in comp.lang.perl.misc?
: Don't you know that soc.culture.china is the obvious place to ask?

Well, you could be right....  "soc.culture.xxxx" has been totally
wiped out by crosspostings, and our friend is welcome to ask there....
:)

--
Tung-chiang Yang                       tcyang@netcom.com

soc.culture.taiwan, soc.culture.china (by SCC FAQ Team) FAQ's:
   http://www.clever.net/tcyang/Taiwan_faq.shtml, China_faq.shtml


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

Date: Wed, 14 May 1997 01:16:59 +0200
From: Ketil Froyn <ketilf@ifi.uio.no>
Subject: Re: Private area using Perl/CGI
Message-Id: <3378F66B.341C@ifi.uio.no>

Abigail wrote:
> ++ password to access? If so, would you like to share your knowledge with
> ++ me? :)
> No. Why on earth are you asking this in comp.lang.perl.misc?
> Don't you know that soc.culture.china is the obvious place to ask?

I'm sorry. Punish me. I thought the way to do this was cgi/perl. I have
now seen the error of my ways, and I thank you for your guidance.

Ketil


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

Date: 13 May 1997 13:57:27 GMT
From: hitesh@etnet.lloyds-tsb.co.uk
Subject: problem with script that processes a form  -  2 Attachments [1/1]
Message-Id: <5l9s07$gmj@argon.btinternet.com>
Keywords: perl script problem when processing forms

--*-*-*- Next Section -*-*-*

HI, 

This is my first attemp to write a script that proceeses a form. 
I have been working on it for some time but I keep getting 
errors. Can anyone put me in the right direction with some 
advice. I am using Win 95/o'Reilly web server and perl 5. 

The script is supposed to take the info from the form and put it 
into a file called comments.txt. It also sends a html reply 
saying thanks for your response and states what they inputed.

The server responds with a 500 error message saying there's no 
separtion between header and the rest of the script. The script 
and form are attached. 

Thanks for your time..
Hitesh  
--*-*-*- Next Section -*-*-*
Content-Type: Application/octet-stream; name=agent.pl
Content-Transfer-Encoding: x-uue

begin 755 agent.pl
M(R$O=7-R+V)I;B]P97)L#0HC(&%G96YT+G!L#0IR97%U:7)E("=C9VDM;&EB
M7W!L)SL-"B9296%D4&%R<V4H*F9O<FTI.PT*#0IP<FEN="`B0V]N=&5N="UT
M>7!E.B!T97AT+VAT;6Q<;EQN(CL-"@T*(W-E;F0@<F5S<&]N<V4@=&\@8G)O
M=W-E<@T*<')I;G0@(CQ(5$U,/B([#0IP<FEN="`B/&AE860^/'1I=&QE/E1H
M86YK<SPO=&ET;&4^/"]H96%D/B([#0IP<FEN="`B/&)O9'D@8F=C;VQO=7(]
M(B-F9F9F9F8B/B([#0IP<FEN="`B/&@Q/E1H86YK<SPO:#$^(CL-"G!R:6YT
M(")4;SH@)&9O<FU[)VYA;64G?2([#0IP<FEN="`B/'`^1G)O;3H@5&AE(%=E
M8B!496%M(CL-"G!R:6YT("(\<#Y792!R96%L;'D@87!P<F5C:6%T92!Y;W5R
M(&9E961B86-K(CL-"G!R:6YT("(\+V)O9'D^/"]H=&UL/B([#0H-"B1T:6UE
M7VYO=R`](&QO8V%L=&EM93L-"@T*(U!R:6YT('1O($9I;&4-"@T*;W!E;B`H
M1$(L(CX^(&-O;6UE;G1S+G1X="(I('Q\(&1I92`B0V%N;F]T(&]P96X@8V]M
M;65N=',@9FEL92Y<;B([#0H-"G!R:6YT($1"(").86UE.EQN(CL-"G!R:6YT
M($1"("(D9F]R;7LG;F%M92=]7&XB.PT*<')I;G0@1$(@(EQN1&5P87)T;65N
M=#I<;B([#0IP<FEN="!$0B`B)&9O<FU[7&XB.PT*<')I;G0@1$(@(EQN4&]S
M:71I;VXZ7&XB.PT*<')I;G0@1$(@(B1F;W)M>R=P;W-I=&EO;B=]7&XB.PT*
M<')I;G0@1$(@(EQN5&5L97!H;VYE.EQN(CL-"G!R:6YT($1"("(D9F]R;7LG
M=&5L)WU<;B([#0IP<FEN="!$0B`B7&Y#;VUM96YT<UQN(CL-"G!R:6YT($1"
M("(D9F]R;7LG8V]M;65N=',G?5QN(CL-"G!R:6YT($1"(")<;D)R;W=S97(@
M5'EP93I<;B([#0IP<FEN="!$0B`B)$5.5GLG2%144%]54T527T%'14Y4)WU<
M;B([#0IP<FEN="!$0B`B7&Y$871E.EQN(CL-"G!R:6YT($1"("(D=&EM95]N
A;W=<;EQN(CL-"@T*8VQO<V4@*$1"*3L-"F5X:70H,"D[
`
end
--*-*-*- Next Section -*-*-*
Content-Type: Application/octet-stream; name=form1~1.htm
Content-Transfer-Encoding: x-uue

begin 755 form1~1.htm
M/$A434P^"@H\2$5!1#X*/%1)5$Q%/DEN=&5L;&EG96YT($%G96YT<R`M($9E
M961B86-K/"]4251,13X*/"](14%$/@T*/$)/1%D@0F%C:V=R;W5N9#TB(B!"
M1T-O;&]R/2-F9F9F9F8@5&5X=#TC,#`P,#`P($QI;FL](S`P,#!F9B!63&EN
M:STC,#`X,&,P($%,:6YK/2-F9C`P,#`^#0H\2#$^1D5%1$)!0TL\+T@Q/@T*
M/%`^#0I(97)E)W,@>6]U<B!C:&%N8V4@=&\@<')O=FED92!C;VYS=')U8W1I
M=F4@9F5E9&)A8VL@;VX@=VAA="!Y;W4@=&AO=6=H="!O9B!T:&ES(&%R=&EC
M;&4N/$)R/@T**%1H:7,@:7,@86QS;R!T97-T(&9O<FT@=&\@<V5E('=H971H
M97(@=&AE(&9O<FT@:7,@<&]S=&5D(&EN('1H92!C;W)R96-T(&UA;FYE<BD-
M"B`-"CQ&3U)-($%C=&EO;CTB:'1T<#HO+W-O,7)S:6XQ+FQL;WED<V)A;FLN
M8V\N=6LO8V=I+6)I;B]A9V5N="(@;65T:&]D/2)P;W-T(CX*#0H\<')E/@T*
M#0I.86UE.B`@("`@("`\24Y0550@5'EP93TB=&5X="(@3F%M93TB;F%M92(@
M4VEZ93TB,S4B($UA>&QE;F=T:#TB.#`B(%9A;'5E/2(B/CPO24Y0550^#0H\
M0E(^"D1E<&%R=&UE;G0Z(#Q)3E!55"!4>7!E/2)T97AT(B!.86UE/2)D97!T
M(B!3:7IE/2(S-2(@36%X;&5N9W1H/2(X,"(@5F%L=64](B(^/"])3E!55#X-
M"CQ"4CX-"E!O<VET:6]N.B`@(#Q)3E!55"!4>7!E/2)T97AT(B!.86UE/2)P
M;W-I=&EO;B(@4VEZ93TB,S4B($UA>&QE;F=T:#TB.#`B(%9A;'5E/2(B/CPO
M24Y0550^#0H\0E(^"E1E;&5P:&]N93H@(#Q)3E!55"!4>7!E/2)T97AT(B!.
M86UE/2)T96PB(%-I>F4](C,U(B!-87AL96YG=&@](C@P(B!686QU93TB(CX\
M+TE.4%54/@H\0E(^#0I#;VUM96YT<SH@(`T*"2`@("`\5$585$%214$@3F%M
M93TB8V]M;65N=',B(%)O=W,](C0B("!#;VQS/2(S,"(^/"]415A405)%03X-
M"@T*/"]P<F4^#0H\<')E/@T*"2`@("`\24Y0550@5'EP93TB<W5B;6ET(B!.
M86UE/2)3=6)M:70B(%9A;'5E/2(@("`@(%-E;F0@("`@("(^(#PO24Y0550^
M/$E.4%54(%1Y<&4](G)E<V5T(B!686QU93TB("`@("!297-E="`@("`B/CPO
M24Y0550^#0H-"CPO<')E/@T*/%`^"@T*/"]&3U)-/@T*#0H-"@H\+T)/1%D^
)"@H\+TA434P^
`
end
--*-*-*- Next Section -*-*-*--



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

Date: 13 May 1997 20:42:44 GMT
From: whatis@nic.cerf.net (....What Is?....)
Subject: Re: Procedure to count unique lines
Message-Id: <5lajo4$7cd@news.cerf.net>

In article <slrn5mjtuf.l8.awm@luers.qosina.com> awm@qosina.com writes:
>I have a 3.4MB text file with one entry per line.  I'm trying to count
>the number of times each line item is listed.  I tried doing it via
>sort and count the number of items before the item itself changes, to
>no avail, and it was VERY VERY slow.
>
>Has anyone already done this?  I would appreciate any pointers.

How about something straightforward like:

%uniqueLines = ();
while (<>)
	{ chomp; $uniqueLines{$_}++; }

Now you have a list of lines, and how many times each occurred.

Steven Boswell
whatis@yyz.com
<http://www.cerfnet.com/~whatis/>


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

Date: Mon, 12 May 1997 16:46:00 -0500
From: sericks3@css1.css.edu (Scott Erickson)
Subject: Re: Randal Schwartz
Message-Id: <sericks3-ya02408000R1205971646000001@news.d.umn.edu>

Michael Lauzon wrote:

> This is a question for Randal Schwartz.

What?!?! Aren't I good enough to answer your question?


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

Date: Wed, 14 May 1997 00:33:23 GMT
From: dkcombs@netcom.com (David Combs)
Subject: Re: SOLUTION: Drawing a graph?
Message-Id: <dkcombsEA5Avn.6CM@netcom.com>

In article <1997050915094542258@rhrz-ts2-p2.rhrz.uni-bonn.de>,
Michael Schuerig <uzs90z@uni-bonn.de> wrote:
>Nathan V. Patwardhan <nvp@shore.net> wrote:
>
>> Michael Schuerig (uzs90z@uni-bonn.de) wrote:
>> 
>> : I'm looking for a module that draws a graph for me. I only want to input
>> : nodes (with labels) and edges (with labels) and have the module do
>> : everything else. Is there such a thing?
>> 
>> Yes.  Check CPAN for the Graph modules - I think there's one called GIFGraph
>> which might do what you want.
>
>That's not what I had meant. I want to draw graphs, not charts. And I
>don't even want to draw myself, I want the module to do the hard layout
>work.
>
>Michael
>
>---
>Michael Schuerig           Nothing helps a bad mood like spreading it.
>mailto:uzs90z@uni-bonn.de                                     -Calvin
>http://www.uni-bonn.de/~uzs90z/

Very recently, there are suddenly MANY programs that do this --
but I don't know of any in perl.  Nonetheless, you can always
CALL them FROM perl.

Every year since '94 there has been a symposium on the very subject
you are interested in -- automatic drawing of (hairy) graphs (of the
type you mean: edges, nodes, directed, non-directed, 3-d even, etc).

Much of it is freely downloadable.  Lots of work is happening in
your own country, Germany.

Buy ALL THREE of these books (symposium proceedings), all from Springer
Verlag, "Lecture Notes in Computer Science":

'94: LNCS #894
'95: LNCS #1027
'96: LNCS #??? (It's here somewhere (the book), but I can't
    find it right now).

The titles all begin the same: "GRAPH DRAWING .*".

Like I say, you want ALL THREE.  (as a little extra, each year
they have a contest: they put out three or so problems (nodes, edges),
and judge what programs generate either the most beautiful or
maybe the most interesting graphs.

Hope this helps!



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

Date: 12 May 1997 11:08:54 -0700
From: trs@azstarnet.com (Tim  Smith)
Subject: Re: speeding up a regex
Message-Id: <5l7mbm$e7e@web.azstarnet.com>

In article <5l6dcu$pjg$1@news.fsu.edu>,
Justin C Lloyd <lloyd@cs.fsu.edu> wrote:
>
> $_->[5] =~ /^$firstinit/ && /^($first|$firstinit)?\s+($middle\s+)?$last$/
>            
>           \________________/

Justin,

It looks like that second match is against $_, NOT against $_->[5]!  Maybe
that's why it's so much faster....

Tim



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

Date: 13 May 1997 16:57:42 -0400
From: Clark Dorman <dorman@s3i.com>
Subject: Start, Stop, Restart, Kill a Process and Subprocesses.  Solution
Message-Id: <d207b6qex.fsf@s3i.com>


Greetings,
	I've been stuck for a while on a problem with a script I've been
writing, but now I have a solution.  I thought that maybe people would be
interested in it.  The script is supposed to monitor the cpu usage on some
computers, and spawn off these hairy jobs when the cpu usage drops down.  It
is also supposed to shut down the jobs for a while when the cpu usage goes
up.  The idea was to have a process that forks a child and the parent keeps
an eye on the cpu, ready to stop the child (the hairy process) when the cpu
usage goes up.

Assume that $pid is the child pid.  The difficulty is that while it is easy
to do:

	kill 'TSTP', $pid

to the process, it does not stop the sub-processes of the process $pid.  You
could do:
	
	kill 'TSTP', -$process_group

but this has the (obvious) side effect of stopping that parent as well as the
child.

The solution, as so many other things, is presented in the FAQs.  The answer:

   {
      local $SIG{TSTP} = 'IGNORE';
      kill TSTP => -$$;
   }

This defines a signal handler for the TSTP signal in the parent, sends the
signal (and ignores it), and the parent process continues on it's merry way.
Personally, I don't know why you would write

	kill TSTP => -$$; 

rather than 

	kill 'TSTP', -$process_group;

but, as usual, there is more than one way to do anything in perl.

Here's a script that does the fork, stop, restart, and kill:

 ------------------------------
#!/home/dorman/bin/perl -w

# In this script, have the parent call a kill to the entire process group.
# However, set it up so that the signal is handled / ignored in the parent,
# but not the child.

use strict;
use Config;

my $pid = fork;
my $our_pgrp;

defined ($pid) or die "couldn't fork: ($!)" ;

if ($pid) {
   $our_pgrp = getpgrp;

   print " Child pid is ($pid).  Now in parent, ($our_pgrp) is pgrp.  ";
   print " Parent \$\$ is ($$) = ($our_pgrp)\n";

   sleep 20;
   print " Stopping child from parent  ($pid)\n";
   {
      local $SIG{TSTP} = 'IGNORE';
      kill TSTP => -$$;
   }

   sleep 20;
   print " Restarting child from parent  ($pid)\n";
   {
     local $SIG{CONT} = 'IGNORE';
      kill CONT => -$$;
   }

   sleep 20;
   print " Killing child from parent  ($pid)\n";
   {
     local $SIG{HUP} = 'IGNORE';
      kill HUP => -$$;
   }
   print " tried to kill\n";

} else {
   # In child.
   $our_pgrp = getpgrp;
   sleep 5;
   print " Exec'ing in child ($our_pgrp) is pgrp.  ";
   print " Child \$\$ is ($$) != ($our_pgrp) pgrp\n";
   exec("time_waster.sh");
}
 ------------------------------

time_waster.sh looks like:

 ------------------------------
#! /bin/csh -f
time_waster
 ------------------------------

And time_waster is a time_wasting c-program, in my case the Sieve of
Erasthones (however that's spelled).

-- 
Clark Dorman				"Evolution is cleverer than you are."
http://cns-web.bu.edu/pub/dorman/D.html                -Francis Crick


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

Date: 13 May 1997 21:24:04 GMT
From: whatis@nic.cerf.net (....What Is?....)
Subject: Timeline for better support for tied arrays?
Message-Id: <5lam5k$9fk@news.cerf.net>

I was surprised to find that the support for tied arrays is so much
lower than support for tied scalars and hashes.

Is this something that the Powers That Be(TM) are planning to do soon,
or are there other priorities?

Steven Boswell
whatis@yyz.com
<http://www.cerfnet.com/~whatis/>


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

Date: 13 May 1997 22:49:59 GMT
From: brdavis@orion.ac.hmc.edu (Brooks Davis)
Subject: Re: Timer on my perl script
Message-Id: <5lar6n$lgr$1@cinenews.claremont.edu>

Benny Chee (chchee@iti.gov.sg) wrote:
: Hi,
: 	Was trying to set a timer for my 
: 	script to execute certain applications
: 	during a certain time.

Why not just use cron?  You are clearly using a unix system so cron should
be available unless your system admin has turned it off for you.  If that's
not an acceptable answer (it's definaly the prefered one) then you need to
have your program figure out how long it is until the next time you want
your code to execute.  Actually, you should do this every time because
if the files are large you will get into trouble with your execution times
changeing over time.

-- Brooks


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

Date: 13 May 1997 11:00:45 GMT
From: mike@stok.co.uk (Mike Stok)
Subject: Re: Timer on my perl script
Message-Id: <5l9hkt$96j@news-central.tiac.net>

In article <Pine.SOL.3.91.970513130304.13682A-100000@hercules.iti.gov.sg>,
Benny Chee  <chchee@iti.gov.sg> wrote:
>Hi,
>	Was trying to set a timer for my 
>	script to execute certain applications
>	during a certain time.
>
>	I've written a script (rather clunky) on it.
>	What i wanted to do is to make it do
>	2 jobs in a day. At 7:30am, copy a file.
>	At 12 midnight, delete a file.

What kind of system are you running your program on?  On unix type systems
there are ways of scheduling jobs using the at program or the cron program
(which uses files called crontab files to keep the schedules of operations
to do for individual users.)  Other operating syetems have other
scheduling facilities.  On a unix system you might have lines like:

30 7 * * * * /usr/local/bin/perl /home/chchee/perl/copy-file
0 0 * * * * /usr/local/bin/perl /home/chchee/perl/delete-file

and the system will take care of scheduling the program.

  [...]

>while(1) {
>  DOIT:
>  while(($hour==7 && $min==30 && $sec==0)|| 
>        ($hour==23 && $min==59 && $sec==0)) {

The outher while (1) loop will be "tight" until 7:30:00 or 23:59:00.  One
way to ease the load on the machine if you really want to do a loop that
polls the time is something like

  $lastCopied = $lastDeleted = time;

  while (1) {
    sleep 60;

    if (should have copied between $lastCopied and now) {
      do the copy
      $lastCopied = time;
    }

    if (should have deleted between $lastDeleted and now) {
      do the delete
      $lastDeleted = time;
    }
  }

>    if ($hour==7) {
>      copy ("file1.txt", "file2.txt");
>      sleep 59398; #i calculated this..it will sleep till 11:59pm

watch out for the granularity of sleep - on unix you might get the signal
later than expected - my sleep man page cautions:

  The sleep() function suspends execution of a process for the interval
  specified by the seconds parameter.  The suspension time may be longer than
  requested due to the scheduling of other activity by the system.

so your exact sleep may not wake up until 23:59:01 in which case the inner
while will not get triggered.  Also it's possible for the file copy to
take an unpredictable amount of time due to the machine scheduling and IO
dependencies.

>      open(DELETE, ">file2.txt");
>      print DELETE "";
>      close DELETE;   

This truncates the file, if you really want to delete it then unlink may
be a better function to use.

In general I'd rather use a system provided scheduling service than my own
process.

Hope this helps,

Mike

-- 
mike@stok.co.uk                    |           The "`Stok' disclaimers" apply.
http://www.stok.co.uk/~mike/       |   PGP fingerprint FE 56 4D 7D 42 1A 4A 9C
http://www.tiac.net/users/stok/    |                   65 F3 3F 1D 27 22 B7 41
stok@psa.pencom.com                |      Pencom Systems Administration (work)


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

Date: 13 May 1997 22:07:35 GMT
From: mike@stok.co.uk (Mike Stok)
Subject: Re: unlink vs. system("rm...")
Message-Id: <5laon7$4rd@news-central.tiac.net>

In article <3378D666.2E46@mathematica-mpr.com>,
the count  <eglamkowski@mathematica-mpr.com> wrote:
>if i create a file in a perl program (via open(FOO, ">foo.tmp"), and 
>later in the same program want to delete that file, which would be
>the preferred method of doing this:
>
>unlink("foo.tmp"); or
>system("rm -f foo.tmp");

unlink is likely to be more efficient as you don't have to run another
process, and also if you ever generate files with "odd" characters in
their name then you don't end up worrying about whether the a shell will
get spawned for you and if it does whether it'll mangle your file name.

Hope this helps,

Mike
-- 
mike@stok.co.uk                    |           The "`Stok' disclaimers" apply.
http://www.stok.co.uk/~mike/       |   PGP fingerprint FE 56 4D 7D 42 1A 4A 9C
http://www.tiac.net/users/stok/    |                   65 F3 3F 1D 27 22 B7 41
stok@psa.pencom.com                |      Pencom Systems Administration (work)


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

Date: Tue, 13 May 1997 21:59:32 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Year 2000 compliance
Message-Id: <EA53r9.ELC@nonexistent.com>

On Tue, 13 May 1997 11:01:57 -0700, Susan Malisch wrote in
comp.lang.perl.misc URL: news:3378AC94.3AF2@smtp.ais.ucla.edu:
++ We have several scripts in production using perl 5.001.  Has anyone seen
++ any mention of Year 2000 compliance or issues with perl?  We are trying
++ to determine how much work/installations/upgrades we have outstanding in
++ preparation for the millenium change.  I'd appreciate a direct response
++ to my email address so I don't miss any postings.

There is nothing 2000 year specific with Perl.

If your scripts have problems dealing with the year 2000, then
it's a bug in your scripts, not in Perl.

Make sure you read the man page about localtime ().


Abigail


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

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

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