[8429] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 2046 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Mar 7 11:08:02 1998

Date: Sat, 7 Mar 98 08:00:32 -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, 7 Mar 1998     Volume: 8 Number: 2046

Today's topics:
    Re: "Learning Perl" or "Programming Perl" <itccars@twics.com>
    Re: Add int, convert to string, substitute. HELP! <r.goeggel@atos-group.de>
        frames: <Dpaladin@ix.netcom.com>
    Re: frames: <webmaster@bruin.net>
        Help wanted <itccars@twics.com>
    Re: How to run a shell script which sets env vars? <r.goeggel@atos-group.de>
        IO::Select problem on Win 95 (dave)
    Re: isn't perl clever: short-circuit logic <rjk@coos.dartmouth.edu>
    Re: Length of an array? (Robert F. Harrison)
    Re: Matching words anywhere in strings: need \A, \Z? <r.goeggel@atos-group.de>
        Memory limitation of Perl for OS/2 (ic)
    Re: Perl Script count lines of c/c++ code (Robert F. Harrison)
        perl source (G Moore)
    Re: perl (Bart Lateur)
    Re: Pw32i302...now this is just plain frustrating! <KIMANDKELLEY@prodigy.net>
    Re: regexp <rjk@coos.dartmouth.edu>
    Re: safe file modification strategy (w/flock, new_tmpfi <merlyn@stonehenge.com>
    Re: Special Characters <uri@sysarch.com>
        system commands running but not .exe from perl script <manohar.uchil@citicorp.com>
    Re: The -w switch (was Re: better way to do this?) <joseph@5sigma.com>
    Re: The -w switch (was Re: better way to do this?) <joseph@5sigma.com>
    Re: The -w switch (was Re: better way to do this?) <joseph@5sigma.com>
    Re: The -w switch (was Re: better way to do this?) <jbc@west.net>
        Training in UK? <pads@diawl.demon.co.uk>
    Re: utime not working [FAQ] (Robert F. Harrison)
    Re: What is PERL? Learn JAVA instead? (Bart Lateur)
    Re: What is PERL? Learn JAVA instead? (Bart Lateur)
        Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: Sat, 7 Mar 1998 18:47:57 +0900
From: "ITC" <itccars@twics.com>
Subject: Re: "Learning Perl" or "Programming Perl"
Message-Id: <6dr5il$q82$1@skytrain.asahi-net.or.jp>

I share the feelings of Mr. Benjamin Smith about "Tom Christiansen's
behaviour". When I contacted him by E-mail to suggest him some necessary
point which I believe he had omitted in his current edition, he or one of
his pets put me off by his rude and proud reply. We should not support such
people by buying their products.

R. A. Abbasi





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

Date: Sat, 7 Mar 1998 12:55:04 +0100
From: "Ronald G\"oggel" <r.goeggel@atos-group.de>
Subject: Re: Add int, convert to string, substitute. HELP!
Message-Id: <6drcjj$k2i$1@news.pop-stuttgart.de>


John Robson schrieb in Nachricht <6dmpf2$7er@freenet-news.carleton.ca>...
>
>I have an input file that looks like this:
>
>"0001","widget a"

<snip>
>Here's my attempt:
>
>s/"([0-9][0-9][0-9][0-9])"/$1+1000/ge
>
>You can assume that the numbers are always 4-char long (fixed length
field).
>The substitution gives this solution:
>
>1001,"widget a"
<snip>
>But I want to see the numbers in quotes " " !

use
s/([0-9][0-9][0-9][0-9])/$1+1000/ge
or
s/([0-9][0-9][0-9][0-9])/$1+1000/e

HTH
Ronald




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

Date: Sat, 07 Mar 1998 01:52:34 -0800
From: Douglas Nusbaum <Dpaladin@ix.netcom.com>
Subject: frames:
Message-Id: <350118E1.C4DA091D@ix.netcom.com>

To all:

I have a perl script and some HTML pages that have frames.  I know that
it is possible, from within a frame, to have a button that when pressed
will start up an entirely new page with
new frames, the entirety being driven by a CGI perl script.   However, I
am unable to find the secret code that does this.

Can someone please provide the lines I need to insert into my code to
start up a new HTML page with frames from within a frame?

Thanks



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

Date: Sat, 07 Mar 1998 04:15:45 -0800
From: Marty McKolskey <webmaster@bruin.net>
Subject: Re: frames:
Message-Id: <35013A71.81EF53AD@bruin.net>

Douglas Nusbaum wrote:
 
> I have a perl script and some HTML pages that have frames.  I know that
> it is possible, from within a frame, to have a button that when pressed
> will start up an entirely new page with
> new frames, the entirety being driven by a CGI perl script.   However, I
> am unable to find the secret code that does this.
> 
> Can someone please provide the lines I need to insert into my code to
> start up a new HTML page with frames from within a frame?
> 
> Thanks

1. This should be addressed to the comp.infosystems.www.authoring.cgi
group; 
   it is more a CGI/perl/HTML issue.
2. To open a new window: either use javascript, or simply target=_blank
in
   your form or link.
3. To create frames in a new window: 
   a) print out a frameset like so, using a script if you like:
      <frameset cols="50,*">
      <frame src="http://yourname.com/cgi-bin/frame_script.pl?left" ...>
      <frame src="http://yourname.com/cgi-bin/frame_script.pl?right"
 ...>
      </frameset>
   b) frame_script.pl can use the QUERY_STRING to determine what to
print into
      each frame.
   Now obviously this isn't the only way to do this.  You can use
different
   scripts, or PATH_INFO, or whatever.  But it should give you some idea
of 
   what to do.

HTH,
Marty
-- 
my $name  = 'Marty';
my $email = 'marty@marty.net';
last;


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

Date: Sat, 7 Mar 1998 19:00:44 +0900
From: "ITC" <itccars@twics.com>
Subject: Help wanted
Message-Id: <6dr657$nau$1@skytrain.asahi-net.or.jp>

As a beginner to Perl, I have a problem. I am contacted with TWICS
(http://www.twics.com). In my first CGI script in Perl, the line;
$name = <SCRIPT> does not seem working. Similarly, the line;

print("\n"); or print("\t"); don't work.

I desperately need a help from someone. If needed, I can send all the 7
lines of code to check. I am quite familiar with "C" and other programming
language but feel helpless taking the first step in Perl. Is it so difficult
to program?





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

Date: Sat, 7 Mar 1998 12:46:17 +0100
From: "Ronald G\"oggel" <r.goeggel@atos-group.de>
Subject: Re: How to run a shell script which sets env vars?
Message-Id: <6drc37$jm3$1@news.pop-stuttgart.de>


Yong Huang <34FDE96F.17426FAD@columbia.shell.com> writes ...

>variable. Is there any way to set environment variables by calling the
>first Perl script. If yes, how do I modify the two scripts?
>
No. see perl FAQs

>A related question: can %ENV modify parent process environment
>variables?
Yes






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

Date: Sat, 07 Mar 1998 14:37:13 GMT
From: meet@the.zoo (dave)
Subject: IO::Select problem on Win 95
Message-Id: <35015b33.834423@news.isoc.net>


Hi,

Here is some code I'm trying to get working onWin 95:  It  just keeps
printing "I did not block!".  What's wrong?

Thanks,
Dave

-- code begins here---

#/user/bin/perl -w

use IO::Select;

$sel = IO::Select->new();
$sel->add( \*STDIN );
for(;;)
{
  if( @ready = $sel->can_read() )
  {
    print "Got some input.\n";
    for $fh ( @ready )
    {
      if( $fh == STDIN )
      {
        print $inp if defined( $inp = <STDIN> );
      }
    }
  }
  print "I did not block!\n"; sleep 1;
}


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dlripberXisoc.net (sub X with shunned char)
http://www.isoc.net/dlripber

/--\./==\./ee\./oo\./--\


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

Date: Fri, 06 Mar 1998 23:30:17 -0500
From: Ronald J Kimball <rjk@coos.dartmouth.edu>
Subject: Re: isn't perl clever: short-circuit logic
Message-Id: <3500CD5B.466E1C20@coos.dartmouth.edu>

kevin@cmhcsys.com wrote:
> 

You've already received advice on improving your code, with the end result
that you don't need all the short circuit logic.  I just wanted to point out
one thing:

> ($rime) || ($rime = $');

$rime ||= $';

||= is the coolest assignment operator!

-- 
 _ / '  _      /         - aka -             rjk@coos.dartmouth.edu
( /)//)//)(//)/(    Ronald J. Kimball           chipmunk@m-net.arbornet.org
    /                                   http://www.ziplink.net/~rjk/
        "It's funny 'cause it's true ... and vice versa."


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

Date: 6 Mar 98 16:04:44 GMT
From: harrison@pixi.com (Robert F. Harrison)
Subject: Re: Length of an array?
Message-Id: <slrn6g07l0.9ub.harrison@localhost.localdomain>

On 6 Mar 1998 07:46:03 GMT, David Waring <dwaring@nwsr.com> wrote:
> > 
> It is interesting how many people say read the FAQ in response to
> questions that are not in the FAQ. Yes this question is covered in the
> books but I could not find it in the FAQ.

It is, however, the documentation that comes with perl in the perldata
document.  It is also covered in some books.

-- 
rfh harrison@pixi.com



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

Date: Sat, 7 Mar 1998 13:04:43 +0100
From: "Ronald G\"oggel" <r.goeggel@atos-group.de>
Subject: Re: Matching words anywhere in strings: need \A, \Z?
Message-Id: <6drd5n$kg7$1@news.pop-stuttgart.de>


Peter Scott schrieb in Nachricht <6dnhg6$cd8@netline.jpl.nasa.gov>...
>Wanting to detect and count number of occurrences of the word "abc" in
$str,
>I wrote:
>
> $str = "abc def abc def abc ghi abc";
> $count= () = $str =~ /\Wabc\W/ig;  # require 5.004 :-)
>
>but this misses the first and last "abc".  My next attempt was:
>
> $count = () = $str =~ /(?:\W|\A)abc(?:\W|\Z)/ig;
>
>which works.  But it looks darn ugly.  Am I missing an easier way?


$count= () = " $str " =~ /\Wabc\W/ig;  # require 5.004 :-)

HTH




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

Date: 7 Mar 1998 10:11:40 GMT
From: altmann@zoology.ubc.ca (ic)
Subject: Memory limitation of Perl for OS/2
Message-Id: <6dr6gs$h2c$1@nntp.ucs.ubc.ca>

To OS/2 users:

It looks like the version of Perl that I am using on OS/2 does not use any 
more than 32 megs of RAM.  Has anyone else run into a similar problem?

Do you know a version of the interpretor that can use more than 32 megs 
of RAM on OS/2?

Please send you answers to: tam@vansel.alcatel.com

Thanks a lot.



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

Date: 6 Mar 98 13:40:07 GMT
From: harrison@pixi.com (Robert F. Harrison)
Subject: Re: Perl Script count lines of c/c++ code
Message-Id: <slrn6fvv5p.9ub.harrison@localhost.localdomain>

On 05 Mar 1998 22:00:24 -0500, Uri Guttman <uri@sysarch.com> wrote:
> gip <gibson@doitnow.com> writes:
> 
> > Does someone have a script that counts lines of C and/or C++ code?  Yeah
> > I know I can write it, but I thought it may have already been done ;}
> 
<non-perl semi-solutions snipped>
> who needs perl :-)
> uri

Actually, I don't think it's possible to count lines of C code, let
alone C++. First, most of it has never been put on the net or opened
to inspection. We might be able to determine the number of lines of
available C code, but all of it?  Nah.


I think we ought to let 'gip' give it a try since he claims he can do
it. :-)

-- 
rfh harrison@pixi.com



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

Date: Fri, 06 Mar 1998 09:33:52 GMT
From: gvwmoore@ix.netcom.com (G Moore)
Subject: perl source
Message-Id: <34ff328e.5282576@nntp.ix.netcom.com>

does anyone have a version of the non-tarred, non-zipped
version of perl? my tar program is not working.

please give an http site, or ftp site.

thanks.




gvwmoore@ix.spam.netcom.com remove the spam


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

Date: Sat, 07 Mar 1998 11:11:59 GMT
From: bart.mediamind@tornado.be (Bart Lateur)
Subject: Re: perl
Message-Id: <3503254b.5774704@news.tornado.be>

Ralph Rickes <rickesr@pamco.com> wrote:

>Help.  I have never used perl before, but I have to write a small program
>to re-format an inventory file.  The file has five fields right now.  I
>have to cut it down to three fields with different spec's.  The first
>second nd fourth fields are needed.  Right now they are seperated by
>tabs, and the second field has some single spaces.  The 1st field is the
>parts number, 2nd is description, 3rd is the price.  I have looked through
>a book I have on perl, but I can't find anything to help me copy, seperate
>it and then print it out.  Thank you.  

Like this?

	$, = "\t";		# output field separator
	$\ = "\n";		# output end
	while (<>) {	# for every line in the input
		chomp;	#kill newline
		($partnumber,$description,$dummy,$price) = split /\t/;
		 # split input fields separated by tabs
		print $partnumber, $description, $price;
		# print out  wanted fields, separated by tabs 
		# and followed by a newline
	}


I sure hope that this example inspires you to really learn Perl, as I'm
pretty convinced that the other "helpful" answers will not.

HTH,
Bart.


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

Date: Sat, 7 Mar 1998 10:34:13 -0500
From: "Kelley W Phillips" <KIMANDKELLEY@prodigy.net>
Subject: Re: Pw32i302...now this is just plain frustrating!
Message-Id: <6droum$3pl0$1@newssvr03-int.news.prodigy.com>

Mark Stackhouse wrote...
>HELP... I downloaded Ps32i302.exe and ran it from my
>Windows95 "run".  The install MS-DOS batch file
>automatically launched and installed Perl.  So far... no
>problem!  I then used "Notepad" to enter the "Hello World"
>program right out of my "Learning Perl" book.  HOW DO I RUN
>THE SCRIPT???  If I try to run it from a DOS prompt, I'm
>told that the program can't be run from DOS.  If I try to
>run it with Windows95 "run", it launches Notebook with my
>source!!!  What gives?  I feel dumber than dirt!
>
>--
>Mark Stackhouse


Mark,
  After you install Perl make sure that the perl executable is in
your autoexec.bat path statement (ex: c:\perl\bin\perl.exe). Then
re-boot your PC, and to run the script type 'perl scriptnameherel' at
a DOS prompt in the scripts directory.




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

Date: Fri, 06 Mar 1998 23:23:46 -0500
From: Ronald J Kimball <rjk@coos.dartmouth.edu>
To: bourhis@qcd.th.u-psud.fr
Subject: Re: regexp
Message-Id: <3500CBD3.8EF643D@coos.dartmouth.edu>

[posted and mailed]

bourhis@qcd.th.u-psud.fr wrote:
> 
> I want to remove the sequence '\n', five spaces and one character which is not
> whitespace in a string. I tried the regexp /\n {5}\S/ but it does not work.
> Strangely (for me), the regexp / {5}\S/ and /\n {5}/ works.

Are you sure the string only has 5 spaces between the \n and the
non-whitespace character?  It sounds to me like it has more than that.

-- 
 _ / '  _      /         - aka -             rjk@coos.dartmouth.edu
( /)//)//)(//)/(    Ronald J. Kimball           chipmunk@m-net.arbornet.org
    /                                   http://www.ziplink.net/~rjk/
        "It's funny 'cause it's true ... and vice versa."


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

Date: 07 Mar 1998 07:45:23 -0700
From: Randal Schwartz <merlyn@stonehenge.com>
To: shaug@callamer.com
Subject: Re: safe file modification strategy (w/flock, new_tmpfile, and syscopy?)
Message-Id: <8c90qm7e64.fsf@gadget.cscaper.com>

>>>>> "shaug" == O'Shaughnessy Evans <shaug@gromit.callamer.com> writes:

>> open file for read/write
>> flock file exclusive
>> compare dev/ino of file to dev/ino of handle, if not same, loop back
>> read from file, writing to file2
>> rename file2 to file (deleting file)
>> close handle (releasing the flock)

shaug> So... a couple of other questions:
shaug>     1) Since I'm doing the rename, I shouldn't close(TMP), right?
shaug>        Or should I close TMP and not FILE, since (I think) I've lost
shaug>        my inode entry for $file by doing the rename?

I'm not sure what TMP and FILE are compared to "file2" and "file" above.
If you mean "file2" for TMP, yes, close it before the rename.

shaug>          But that might
shaug>        give me trouble with the lock, unless Perl or the kernel knows
shaug>        to release it when the inode disappears.
shaug>        Sketchy ... understanding ... of Unix ... filesystem ...
shaug>        internals.  Must ... resist.
shaug>     2) rename() doesn't accept a file handle, does it?  If not, as I
shaug>        suspect from the POD, then I can't use IO::File::new_tmpfile().
shaug>        If that's the case, then does everyone agree that $file.$$ is
shaug>        the best temporary name?

No... since you are the only process creating file2, and it has to be
"next to" the original file "file" (so that the rename can happen
without crossing FS boundaries), just put it right in the same
directory and call it "file.new" or "file2".  No need for $$.

shaug>          It seems that I could muck around,
shaug>        trying /tmp/`basename $file` and awkward stuff like that, but
shaug>        $file.$$ just seems simpler.

No.

print "Just another Perl hacker," # but not what the media calls "hacker!" :-)
## legal fund: $20,990.69 collected, $186,159.85 spent; just 178 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: 07 Mar 1998 03:58:49 -0500
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Special Characters
Message-Id: <x71zwex4fq.fsf@sysarch.com>


i don't know why but my server never got this followup. someone sent it
to me and i got it from dejnews.

abigail@fnx.com (Abigail) writes:

  A> Uri Guttman (uri@sysarch.com) wrote on 1648 September 1993 in
  A> <URL: news:x7pvk0wsh1.fsf@sysarch.com>:
  A> ++ abigail@fnx.com (Abigail) writes:
  A> ++ 
  A> ++ > 
  A> ++ > Puzzle: How do I escape $, @ and \ in interpolative strings without using \?
  A> ++ 
  A> ++ print "@{[q|ab$c\@d|]}\n" ;
  A> ++ 
  A> ++ prints
  A> ++ 
  A> ++ ab$c\@d
  A> ++ 
  A> ++ but you can't have \ as the last char since it escapes the closing |
  A> ++ quote. it's ugly but solves the puzzle.

  A> Well, no, it doesn't, as you can't escape a backwack. I wasn't considering
                                                     ^^^^
it is whack. i normally don't go after spelling but this one i feel
merits attention since it is the main subject of the quiz.

  A> putting the entire string in @{}; you could have used '' then.
  A> Assume there's lots of things to be interpolated, and a handful of
  A> $, @ and \ to be escaped, without using a \.

i beg your pardon, my answer works as well as yours and with many fewer
keystrokes (the mark of excellence of an emacs user)

print "@{['ab$\c\@d']}\n" ;

will print

ab$\c\@d

as i said it fails only if the \ is in front of the trailing quote. and
that can be handled with my method in most cases. if you need that then
your idea (or other variations like @{[sprintf '%c', 0x5c]} would be
needed. but it still is simpler for the $ and @ to use my method and
clearer as the characters appear as themselves.

  A> "This is a string with a @{[chr 0x24]}, a @{[chr 0x40]} and a @{[chr 0x5C]}"
 "This is a string with a @{['$']}, a @{['@']} and a @{[]}"

and this works too with no quotes and the ability to handle multiple bytes

print "a backwhack @{[pack c => 0x5c]}"
print "@{[pack c3 => 0x24, 0x40, 0x5c]}" ;

so there, it is solved another way like perl promises.

uri


-- 
Uri Guttman                     SYStems ARCHitecture and Software Engineering
uri@sysarch.com                                          Have Perl, Will Hack
http://www.sysarch.com                (781) 643-7504 x*2  FAX: (781) 643-2710
Try the Best Search Engine on the Net -------->  http://www.northernlight.com


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

Date: Sat, 07 Mar 1998 15:45:30 +0530
From: Manohar Uchil <manohar.uchil@citicorp.com>
Subject: system commands running but not .exe from perl script
Message-Id: <35011E42.2052D053@citicorp.com>

I have not been able to run .exe applications from my cgi/perl
application although the system commands(copy,dir) etc can be executed
from the perl script.It was suggested to me that I  give the full
path(of the .exe file) ,so as to make the web browser understand the
path.This however has not helped.I have WindowsNT on our m/c and are
using the peer web server.I  have read all the documentation on the
exec(),system() and ` ` commands,but are still w/o any answers
for eg
exec "copy c:\\1.html c:\\scratch\\1"; works ,but

exec "c:\\pkware\\pkunzip c:\\chat1\\lib\\client.zip
c:\\inetpub\\wwwroot\\sp\\sp1"; does not work

also if I run my .pl file from command prompt both these commands
work fine.The problem occurs only when the .pl is run from the web.
      please send cc to vishalpuri@hotmail.com

regards

manohar



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

Date: Fri, 06 Mar 1998 21:53:54 -0700
From: "Joseph N. Hall" <joseph@5sigma.com>
Subject: Re: The -w switch (was Re: better way to do this?)
Message-Id: <3500D2E2.FC790D09@5sigma.com>

What is it with this attitude that users exist to debug code?
Is this a MIE/Navigator regression, or what?

	-joseph

John Porter wrote:
> I will reiterate what Abigail said:
> 
>         If an insignificant speed hit is important for your users,
>         you probably shouldn't write Perl anyway.

-- 
Joseph N. Hall, prop., 5 Sigma Productions       mailto:joseph@5sigma.com
Author, Effective Perl Programming . . . . . http://www.effectiveperl.com
Perl Training  . . . . . . . . . . . . . . .  http://www.perltraining.com


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

Date: Thu, 05 Mar 1998 11:17:51 -0700
From: "Joseph N. Hall" <joseph@5sigma.com>
Subject: Re: The -w switch (was Re: better way to do this?)
Message-Id: <34FEEBF7.62846341@5sigma.com>

Tom, what the hell are you talking about, and why do you think
you should volunteer an opinion?  Is it just your nature to
meddle, insult, and disparage, or were you having a bad day?

	-joseph

Tom Christiansen wrote:
> [courtesy cc of this posting sent to cited author via email]
>
>In comp.lang.perl.misc, Jon Drukman <jsd@hudsucker.gamespot.com> writes:
>:note that the book "effective perl programming" by joseph hall and
>:randal schwartz 
>
>Randal wrote five pages, so "with" is probably too strongly worded.

-- 
Joseph N. Hall, prop., 5 Sigma Productions       mailto:joseph@5sigma.com
Author, Effective Perl Programming . . . . . http://www.effectiveperl.com
Perl Training  . . . . . . . . . . . . . . .  http://www.perltraining.com


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

Date: Fri, 06 Mar 1998 21:51:26 -0700
From: "Joseph N. Hall" <joseph@5sigma.com>
Subject: Re: The -w switch (was Re: better way to do this?)
Message-Id: <3500D24E.B4657F64@5sigma.com>

Your users are running prototype software?

Perl is perfectly suitable for producing finished products.  Finished
products don't yield assertion failures under any circumstances.

	-joseph

Abigail wrote:
> I very much prefer a useful error message than a "it produced the wrong
> results" report from the users.

-- 
Joseph N. Hall, prop., 5 Sigma Productions       mailto:joseph@5sigma.com
Author, Effective Perl Programming . . . . . http://www.effectiveperl.com
Perl Training  . . . . . . . . . . . . . . .  http://www.perltraining.com


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

Date: Sat, 07 Mar 1998 07:52:08 -0800
From: John Callender <jbc@west.net>
Subject: Re: The -w switch (was Re: better way to do this?)
Message-Id: <35016D28.6E40ED7F@west.net>

Joseph N. Hall wrote:
> 
> Is it just your nature to
> meddle, insult, and disparage, or were you having a bad day?
 
Actually, that's a false dichotomy, since both halves of the statement
are clearly true: yes, that's his nature, and yes, the posts in question
seem to have been made when he was in a particularly feisty mood.

I'm thinking caffeine deprivation, maybe?

--
John Callender
jbc@west.net
http://www.west.net/~jbc/


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

Date: Sat, 7 Mar 1998 12:31:52 +0000
From: Patrick Daley <pads@diawl.demon.co.uk>
Subject: Training in UK?
Message-Id: <S0Ls$EA44TA1Ewdr@acen.demon.co.uk>

Anyone know of any Perl training courses in the UK?
-- 
Patrick Daley



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

Date: 6 Mar 98 15:12:46 GMT
From: harrison@pixi.com (Robert F. Harrison)
Subject: Re: utime not working [FAQ]
Message-Id: <slrn6g04jh.9ub.harrison@localhost.localdomain>


[Cc not sent to Kat's broken email address]

On Fri, 06 Mar 1998 07:21:19 GMT, Kat 
<kmphillip@spamsuck.hotmail.com> wrote:
>
> I'm having trouble getting the utime function to work on NT. 
>
> <snip>
>
> PLEASE HELP OR TELL ME A BETTER WAY TO CHANGE THE FILE MOD DATE!

OKAY. STOP SHOUTING.

If you would look at the documentation for the distribution of perl
you are using you would see in "perlfaq5" this note:

      Note that utime() currently doesn't work correctly with
      Win95/NT ports.  A bug has been reported.  Check it
      carefully before using it on those platforms.

This is found in perlfaq5 under the heading of:

      How do I set a file's timestamp in perl?

Take a look at the information on Perl and on running perl in your
environment at:

      http://www.perl.com/

Sorry I don't have a better answer for you.

-- 
rfh harrison@pixi.com



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

Date: Sat, 07 Mar 1998 12:35:59 GMT
From: bart.mediamind@tornado.be (Bart Lateur)
Subject: Re: What is PERL? Learn JAVA instead?
Message-Id: <35033c85.795314@news.tornado.be>

"Keith G. Murphy" <keithmur@mindspring.com> wrote:

>Bart Lateur wrote:

>> In the meantime, a workaround might be manually breaking the circular
>> chain, once you know you're through.

>IIRC there's an example of that in HTML::Element.

As Ilya pointed out, there no mark-and-sweep type of GC in Perl, not
even at interpreter shutdown.

However, I can think of a way of automatically reclaim space taken by
possibly cyclic structures, and that is by adding an extra access level.

I assume you're trying to build graphs, which have elements  that can
point to other elements, and that all elements are unique (i.e. used in
no more than one graph).

Now, you probably implement this by defining a NODE structure (or
object, which is essentially the same thing). You reference to a graph
using a reference to a start NODE.

My suggestion is to limit referencing these graphs by an extra level, a
GRAPH object, that simply points to the starting node. All referencing
to graphs should be restricted to go through these.

Now put the chain-breaking code in the GRAPH's destructor method. That
should allow the Perl reference-count GC to reclaim all unused elements.

Or am I still missing something?

	Bart.


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

Date: Sat, 07 Mar 1998 12:36:06 GMT
From: bart.mediamind@tornado.be (Bart Lateur)
Subject: Re: What is PERL? Learn JAVA instead?
Message-Id: <35013a44.218271@news.tornado.be>

ilya@math.ohio-state.edu (Ilya Zakharevich) wrote:

>Since Perl has no garbage collector to invoke, your suggestions are
>moot.  (You can hardly call the kill-everything-that-moves stuff that
>Perl does at termination a GC.)

I see. Evan's posts suggested that there was a mark-and-sweep type of
garbage collection at the end of the Perl run. Now I've come to think of
it, there's no reason to go through the "mark" stage, as there will be
nothing to keep. So the Perl engine can just go ahead, and "sweep"
simply everything.

	Bart.


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

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

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