[7787] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1412 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Dec 5 04:16:40 1997

Date: Fri, 5 Dec 97 01:00:46 -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, 5 Dec 1997     Volume: 8 Number: 1412

Today's topics:
     Re: 'Middle of String' sort revisited cotal@delphi.com
     Re: ++/-- rounds only neg. numbers? <barnett@houston.Geco-Prakla.slb.com>
     Re: ++/-- rounds only neg. numbers? <tycage@infi.net>
     Re: can perl do multi-threaded programming? (Kerry Schwab)
     Driving an FTP session from Perl... <mgousset@nmhs.net>
     Re: Driving an FTP session from Perl... (Alan Strassberg)
     Re: Forced to use brain-dead perl 4 -- how do I accompl (I R A Aggie)
     Re: Forced to use brain-dead perl 4 -- how do I accompl (Mike Stok)
     FTP on a Windows box, Was(Re: Driving an FTP session fr <ludlow@us.ibm.com>
     grep <sme@planetpod.com>
     Re: help for a perl beginner! <$_=qq!fearless\@NOSPAMio.com!;y/A-Z//d;print>
     Re: help for a perl beginner! <camerond@mail.uca.edu>
     Re: How To Test if number is ODD or EVEN? (John Moreno)
     Re: if ( ($a{$b}{$c} > $d ... Newby Question (Mike Stok)
     Re: IIS 3.0 seems to ignore #EXEC directive (Patrick)
     Re: Intermediary compiled perl? (Malcolm Beattie)
     Re: localtime() (thelab)
     need direct access to VTOC <andrew_gehring@mk.com>
     Re: Package closure(?) question (Tad McClellan)
     Re: Package closure(?) question <tchrist@mox.perl.com>
     Re: Package closure(?) question (Kjetil Skotheim)
     Re: Perl editor needed <henry@DotRose.com>
     Re: Perl editor needed <ludlow@us.ibm.com>
     perl script <paul.peters@ica.unimaas.nl>
     Re: perl script (Kjetil Skotheim)
     Re: perl script <$_=qq!fearless\@NOSPAMio.com!;y/[A-Z]//d>
     Please help :( <ayvaz@weborigins.com>
     Please help again :( forget to attach the file <ayvaz@weborigins.com>
     Re: Problem with setting timezone through $ENV{TZ} (Brandon S. Allbery KF8NH; to reply, change "void" to "kf8nh")
     Processing of Postscript files with included EPS-file <hotdog@stibo.dk>
     Re: Q about Active State Perl <$_=qq!fearless\@NOSPAMio.com!;y/A-Z//d;print>
     Re: Q: lambda fun, loop, string to expr <clark@s3i.com>
     Re: Q: lambda fun, loop, string to expr <merlyn@stonehenge.com>
     Re: READING the last few lines of a HUGE FILE. (bill)
     Re: size of a DB (Brandon S. Allbery KF8NH; to reply, change "void" to "kf8nh")
     small problem with perl INSTALL <weav@plover.havant.ibm.com>
     Re: storage of IO::Socket::INET instance in a module (Andrew M. Langmead)
     Re: truncating a string (Brandon S. Allbery KF8NH; to reply, change "void" to "kf8nh")
     Web Discussion Board with RFC1867 file upload <brians@helicon.com>
     Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: Wed, 03 Dec 1997 09:34:31 -0600
From: cotal@delphi.com
To: rootbeer@teleport.com
Subject: Re: 'Middle of String' sort revisited
Message-Id: <881162627.27434@dejanews.com>

That works great Tom.
Thanks for the Schwartzian pointer as well.
The 'bottom-up' logic makes more sense to me now.

In article
<Pine.GSO.3.96.971202165831.19514X-100000@usertest.teleport.com>,  Tom
Phoenix <rootbeer@teleport.com> wrote:

>
> On Tue, 2 Dec 1997 cotal@delphi.com wrote:
>
> > Want to sort an array of links based on a string in the middle, in my case
> > the country and state abbreviation (US-...)
>
> > What I want to do is find "US-" in each line then print them out in sorted
> > order.
>
> Use the Schwartzian Transform, something like this.
>
>     @sorted =
> 	map { $_->[0] }			# the original element of
> 	sort { $a->[1] cmp $b->[1] }	# the sorted list of
> 	map { my $temp = $_;
> 		$temp =~ s/^.*?US-//;
> 		[ $_, $temp ] }		# the string and its dopple
> 	@list;
>
> For more information on the S.T., check out this page.
>
>     http://www.5sigma.com/perl/schwtr.html
>
> 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!

-------------------==== Posted via Deja News ====-----------------------
      http://www.dejanews.com/     Search, Read, Post to Usenet


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

Date: Wed, 03 Dec 1997 11:07:55 -0600
From: Dave Barnett <barnett@houston.Geco-Prakla.slb.com>
Subject: Re: ++/-- rounds only neg. numbers?
Message-Id: <348591EA.EDF9A7A1@houston.Geco-Prakla.slb.com>

speed@racer.cartoon.spam.address wrote:

> That's not what I get:
>
> >> perl -e '
> > $a = 2.5;
> > $b = -2.5;
> > $a++;
> > $b++;
> > print "$a $b\n";
> > '
> 3.5 -1.5
>

I get what the original poster is getting:3.5 -1

when running perl 5.001.

On solaris2 running perl 5.004_01, I get the more logical (and accurate)
3.5  -1.5


Dave

--
"Security through obscurity is no security at all."
                -comp.lang.perl.misc newsgroup posting

------------------------------------------------------------------------
* Dave Barnett               U.S.: barnett@houston.Geco-Prakla.slb.com *
* DAPD Software Support Eng  U.K.: barnett@gatwick.Geco-Prakla.slb.com *





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

Date: Wed, 03 Dec 1997 12:54:58 -0500
From: Ty Cage Warren <tycage@infi.net>
Subject: Re: ++/-- rounds only neg. numbers?
Message-Id: <34859CF2.D48DE8A@infi.net>

Dave Barnett wrote:
> 
> speed@racer.cartoon.spam.address wrote:
> 
> > That's not what I get:
> >
> > >> perl -e '
> > > $a = 2.5;
> > > $b = -2.5;
> > > $a++;
> > > $b++;
> > > print "$a $b\n";
> > > '
> > 3.5 -1.5
> >
> 
> I get what the original poster is getting:3.5 -1
> 
> when running perl 5.001.
> 
> On solaris2 running perl 5.004_01, I get the more logical (and accurate)
> 3.5  -1.5
> 
> Dave

I went back and tried again with perl5.003 on my linux box and got

3.5 -1 

as well. Looks like it was a bug in perl5.003 and before.  I guess you
need to upgrade to 5.004_04.

Hope this helps,
  Ty

-- 
+---+
Ty Cage Warren                                           tycage@infi.net
Systems Engineer                                                 InfiNet
The Web Site of Love: http://tazer.engrs.infi.net/mst3k/
PGP Public Key: http://tazer.engrs.infi.net/~tycage/pgpkey.html
PGP Fingerprint: FF C1 28 CA 80 B5 31 78  B1 24 2E 8C AB DA FB D2
------------->Never invoke anything bigger than your head.<-------------


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

Date: 3 Dec 1997 10:40:22 -0700
From: kschwab@nyx.net (Kerry Schwab)
Subject: Re: can perl do multi-threaded programming?
Message-Id: <6645i6$1pa$1@nyx10.nyx.net>

In article <661gsj$3ji$1@csnews.cs.colorado.edu>,
Tom Christiansen  <tchrist@mox.perl.com> wrote:
> [courtesy cc of this posting sent to cited author via email]
>
>In comp.lang.perl.misc, 
>    "David M Rosner" <dave@digidem.com> writes:
>:i have a program where i want to kick off several other programs all at
>:once. i could fork each one into its own process and then exec it, but i'd
>:rather have the advanatages of true-multithreading and do each one as a
>:seperate task. i've searched around and i can't seem to find any
>:multi-threading information on Perl. is there such a thing? 
>
>Fork is good for you.  Here's a demo that shows how powerful
>fork is for multithreading:
>
>    # make socket SOCFH, connect, then dup the PC
>    if (fork) 	{ while (<SOCFH>) { print STDOUT $_ } }
>    else      	{ while (<STDIN>) { print SOCFH $_ } }
>
>All you get from the "threading" is shared data, which is its own
>problem.  We've done multitasking for years you know with fork.
>For most people, non-PC-duplicating threading is a lame excuse
>for not understanding the select system call.
>

I suppose this is true at a very basic level, but cases where 
multi-threaded perl might be nicer than fork:

1) NT,95, other platforms where fork() isn't available.

2) X11 modules (TkPerl?) where forked children can't muck with
   windows created by the parent. Don't you hate that hourglass ?
   (And yes, I've tried processing bits at the top of the event
    loop, but you end up freezing the gui lots)

3) Complex multi socket connections where native multithreading 
   provides better timeslicing (esp while reading and writing)
   than one can hope for using select()).  I guess a good example would 
   be some sort of interactive chat server.  I have no doubt that
   Tom could do this without multi-threading, but I also suppose
   it would be less complex using threads.


Having been involved with user-space pthreads before, I would concede 
that user-space threads are (almost) useless. 
 
--
Kerry

>Now, it probably is not so in your case, but I advise you 
>not to jump on the "threads are God" bandwagon too quickly.
>
>--tom
>-- 
>	Tom Christiansen	tchrist@jhereg.perl.com
>Your csh still thinks true is false.  Write to your vendor today and tell
>them that next year Configure ought to "rm /bin/csh" unless they fix their
>blasted shell. :-)   --Larry Wall in Configure from the perl distribution




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

Date: Wed, 03 Dec 1997 09:59:51 -0600
From: Mickey Gousset <mgousset@nmhs.net>
Subject: Driving an FTP session from Perl...
Message-Id: <348581F6.10626945@nmhs.net>

Hey!

I was wondering if you can drive an FTP session using perl.  What I need
to do is ftp to a site, enter my login id and password, do a directory
listing of the site, and then check that directory listing for a file.

Does anyone have any suggestions on how to do this?

Thanks

Mickey Gousset
mgousset@nmhs.net



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

Date: 3 Dec 1997 09:15:03 -0800
From: alan@bali.seg.wj.com (Alan Strassberg)
Subject: Re: Driving an FTP session from Perl...
Message-Id: <66442n$cqm$1@bali.seg.wj.com>

In article <348581F6.10626945@nmhs.net>,
Mickey Gousset  <mgousset@nmhs.net> wrote:
>Hey!
>
>I was wondering if you can drive an FTP session using perl.  What I need
>to do is ftp to a site, enter my login id and password, do a directory
>listing of the site, and then check that directory listing for a file.

	Most likely in the FAQ, but here's a start ....

=-*-=-*-=-*-=-*-=-*-=-*-=-*-=-*-=-*-=-*-=-*-=-*-=-*-=-*-=-*-=-*-=-*-
#!/usr/local/bin/perl
# autoftp
require Net::FTP;

$Source = '/usr/ftp';		# source dir
$Dest   = '/pub';		# dest dir

     $ftp = Net::FTP->new("ftp.foo.com");  # open ftp session to server
     $ftp->login("ftp","ftp\@foo.com") 	# login/password
	 or die ("login/password wrong on ftp $!\n");

     $ftp->cwd("$Dest");		# change to default destination
     $ftp->binary;

     while (<$Source/*>) {		# loop thru all the files
        $ftp->put("$_") or warn ("Cannot ftp file => $_ \n");
      }
	
     $ftp->quit;			# we're outta here!

=-*-=-*-=-*-=-*-=-*-=-*-=-*-=-*-=-*-=-*-=-*-=-*-=-*-=-*-=-*-=-*-=-*-

     Note you'll need these from CPAN:
     data-dumper-2_07_tar.gz
     libnet-1_0506_tar.gz
     libwww-perl-5.14.tar.gz

				alan
-- 
alan@wj.com


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

Date: Wed, 03 Dec 1997 09:36:20 -0500
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: Forced to use brain-dead perl 4 -- how do I accomplish task that is simple in perl 5 ?
Message-Id: <-0312970936200001@aggie.coaps.fsu.edu>

In article <6630hv$bsm$1@gte2.gte.net>, pojo@gte.net.nospam (Eric) wrote:

+ Howdy,
+ 
+ Unfortunately, the server
+ that I'm using uses Perl 4 on an AIX box. 

Perhaps you should mention to the sysadmins of that machine that

1. perl4 is CERTifiably insecure
2. perl4 is not y2k compliant

Might work...might not...but what the hey?

James

-- 
Consulting Minister for Consultants, DNRC
Support the anti-Spam amendment <url:http://www.cauce.org/>
To cure your perl CGI problems, please look at:
<url:http://www.perl.com/perl/faq/idiots-guide.html>


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

Date: 3 Dec 1997 17:14:39 GMT
From: mike@stok.co.uk (Mike Stok)
Subject: Re: Forced to use brain-dead perl 4 -- how do I accomplish task that is simple in perl 5 ?
Message-Id: <66441v$rb5@news-central.tiac.net>

In article <-0312970936200001@aggie.coaps.fsu.edu>,
I R A Aggie <fl_aggie@thepentagon.com> wrote:

>1. perl4 is CERTifiably insecure
>2. perl4 is not y2k compliant

Please tell me how perl 4 is not Y2K compliant where perl 5.xxx is Y2K
compliant.  I have scanned the perldelta for references to 2000 and Y2K
and don't see any.  Does this mean that perl 5.xxx is not y2k compliant
too?  

While I have some sympathy for encouraging people to get with the times,
using FUD as a justification seems dubious at best. 

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@colltech.com                  |            Collective Technologies (work)


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

Date: Wed, 03 Dec 1997 11:11:43 -0600
From: James Ludlow <ludlow@us.ibm.com>
Subject: FTP on a Windows box, Was(Re: Driving an FTP session from Perl...)
Message-Id: <348592CF.6A76@us.ibm.com>

Mickey Gousset wrote:
> I was wondering if you can drive an FTP session using perl.  What I need
> to do is ftp to a site, enter my login id and password, do a directory
> listing of the site, and then check that directory listing for a file.
[..snip..]
> mgousset@nmhs.net

Now, undoubtedly, someone is going to tell you to read the FAQ because
there is a CPAN module called Net::FTP that makes this kind of thing
really easy.  But, and this is where my question comes in, how in the
world do you do this on a WinNT machine?  I've had very little luck (and
even less success) in getting the Net:FTP module to work on a Windows
box.

I have not been able to find a FAQ that covers the process involved for
using modules with Win95/NT.  Does "Learning Perl for Win32" cover this
kind of thing?  My main problem with it is in simply getting the module
to compile.

Thanks in advance for any input.

--
James Ludlow (ludlow@us.ibm.com)
This isn't tech support, and all opinions are my own.


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

Date: Wed, 03 Dec 1997 09:55:36 -0800
From: Stewart Eastham <sme@planetpod.com>
Subject: grep
Message-Id: <34859D17.833DAEB3@planetpod.com>

I am trying to enter an item into a list.  First I check to remove it
from the list if it was already on it.  Then I add it, sort the list,
and print it out to a file.  For some reason with the code below, it
just adds the item to the list and doesn't remove any previous entries
with the same name.  It also does not sort the list.

Here is my code:

# prevent from having the same entry several times
$entry = "$userName:$password\n";
@entries = grep(!/^$userName:/, @entries);
print PASS sort(@entries, $entry);


Thanks for your help.

sme



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

Date: Wed, 3 Dec 1997 06:26:51 -0800
From: "Creede Lambard" <$_=qq!fearless\@NOSPAMio.com!;y/A-Z//d;print>
Subject: Re: help for a perl beginner!
Message-Id: <663q6b$nsl@bgtnsc01.worldnet.att.net>

Joe Ng wrote in message <3484FE0E.B53EE7D1@isu.edu>...
>Hi,
>
> I am doing an exercise by writing a perl program to removes all the
>occurrences of "\r" from a file.

Since this is an exercise, here's a chance to learn some really cool Perl
stuff. :D

>From the command line:

perl -i.bak -e"s/\r//g" filename

What this does (it's untested but it should work) is make a BACKUP! of the
original file with .bak tacked onto the end of it, edit the file (here
called filename) in place, replacing all occurrences of \r with nothing. and
saves the new file under the original filename.

HTH,

--- Creede Lambard
Minister of Irregular Expressions
Programming Republic of Perl





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

Date: Wed, 03 Dec 1997 09:39:20 -0600
From: Cameron Dorey <camerond@mail.uca.edu>
To: ngyat@isu.edu
Subject: Re: help for a perl beginner!
Message-Id: <34857D28.EC0A91C7@mail.uca.edu>

Hi, Ng,

Your code looks like perl to me, however, you haven't done anything with
either file except open and close them. Have you left out your code to
manipulate the files from your message? 

Otherwise, 2 points:

	1. I (and most others) suggest you use "chomp" instead of "chop" to
delete the newline from your input. It's safer.

	2. To open to read or write, see perlfunc (perldoc perlfunc on UNIX
boxes, I believe, or open perlfunc.html in your browser in Win32
machines) for the correct syntax (right now, they are both opened just
for reading). IOW, RTM, it's filled with good stuff.

Cameron Dorey
camerond@mail.uca.edu


Joe Ng wrote:
> 
> Hi,
> 
>  I am doing an exercise by writing a perl program to removes all the
> occurrences of "\r" from a file.  However, somehow, the output file
> always have nothing in there; it's file size always be "zero".  May be
> I
> made some mistakes in my codes. If you know what I did wrong in my
> code,
> just let me know, thanks!
> 
> Joe
> 
> #!/usr/bin/perl
> # this is a program that removes all the "\r" from a file.
> 
> print "Input a file name:";
> $infilename=<STDIN>;
> chop ($infilename);
> open(MYFILE, $infilename);
> 
> print "Type output file name:";
> $outfilename=<STDIN>;
> chop ($outfilename);
> $outfilename =~ s/^/>/;
> open(MYOUTFILE,$outfilename);
> 
> close (MYINFILE);
> close (MYOUTFILE);


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

Date: Wed, 3 Dec 1997 12:15:32 -0500
From: phenix@interpath.com (John Moreno)
Subject: Re: How To Test if number is ODD or EVEN?
Message-Id: <1d0oomn.i64bhy1jaoa9lN@roxboro-173.interpath.net>

Ken Fox <fox@pt0204.pto.ford.com> wrote:

> branderr@cuug.ab.ca (Roy Brander) writes:
> > Ken Fox (fox@pt0204.pto.ford.com) wrote:
> > : jay@dixonssurgical.co.uk (Jay Dixon) writes:
> > : > I want to test if a variable is Odd (or Even)
> > : 
> > : As inspired by abigail:
> > : 
> > : perl -wle 'print "Even" if (1 x shift) =~ /^(1+?)\1$/'
> > : 
> > 
> > It's now official.  I will never be a perl guru.  I've been
> > staring at that one for a minute and still can't figure it.
> 
-snip-

> As far as elegant solutions go, if you think (1 x shift) =~ /^(1+?)\1$/
> is elegant, I'd say Fortran really has damaged your brain.  Do you
> instinctively wrap your Perl programs before you hit column 73?  Pine for
> the good ole' three-way branch?  Name all your variables with six letters?
> 
> If so, you've found a good home 'cause Perl likes everybody. :)

Re-read - he didn't UNDERSTAND the code, he was saying he'll never be a
perl guru (personally I prefer the term god) because he couldn't figure
out what was happening.  Explain it to him, and he'll probably realize
that although it's kinda cute it's not very good.  For instance try it
with a value of 4293999998 or even 73999998 and I think you'll see that
it has minor difficulties.


-- 
John Moreno


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

Date: 3 Dec 1997 15:12:25 GMT
From: mike@stok.co.uk (Mike Stok)
Subject: Re: if ( ($a{$b}{$c} > $d ... Newby Question
Message-Id: <663ssp$m78@news-central.tiac.net>

In article <3484F270.8C6B801@sgi.com>,
Jamie Heller-Evans  <tigger@engr.sgi.com> wrote:
>I am trying to understand this construct:
>
>if (  ($a{$b}{$c} > $d || !$a{$b}{$c})  ) 
>{
>	$a{$b}{$c} = $d;
>}
>
>
>I'm just learning about hashes, but I have never seen
>this kind of syntax before.  I don't understand how
>this works, and why the curly braces:
>
>	$a{$b}{$c}
>
>and I was wondering if someone could explain it to me.  
>I haven't seen this particular construct in any of the
>books I'm using (O'Reilly books, and another by Nigel
>Chapman).  

One place to look is the perldsc man page (perl data structures cookbook)
as it explains how preferences can be used to build complex data
structures.

$a{$b}{$c}is shorthand for $a{$b}->{$c} which means that you're looking at
the hash %a and expecting the value associated with %b to be a reference
to another hash.  $c is used as a key into this hash. 

In perl the intermediate (anonymous) hashes are automatically created when
needed, so saying

  $a{'b'}{'c'} = 'hello';

will "just work" - in the debugger:

  DB<1> $a{'b'}{'c'} = 'hello'

  DB<2> X a
%a = (
   'b' => HASH(0x810fed4)
      'c' => 'hello'
)

Other documentation to look at is the perlref page, and the perllol (lists
of lists) page.

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@colltech.com                  |            Collective Technologies (work)


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

Date: Wed, 03 Dec 1997 23:24:23 GMT
From: Venice @ euronet.nl (Patrick)
Subject: Re: IIS 3.0 seems to ignore #EXEC directive
Message-Id: <663q6j$g4q$1@news.NL.net>

Kerry Peterson <peterson@cns.uni.edu> wrote:

>In trying to execute a perl script from within a .htm document, it seems

>to ignore the line <!--#exec cgi="testit.pl"-->, as if I'm running IIS
>2.0. We're running NT 4.0 with IIS 3.0. I've renamed the doc with a .stm

>extension, verified that I have ServerSideIncludesEnabled set to 1 in
>the registry and verified that I can run #include statements. What might
>we
>be missing or doing wrong to make it ignore the directive? I'm able to
>run
>.pl files in other aspects,

>-- K. Peterson

Sounds like a typical filename extension problem
You tried .stm also .shtml ?





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

Date: 3 Dec 1997 15:01:06 GMT
From: mbeattie@sable.ox.ac.uk (Malcolm Beattie)
Subject: Re: Intermediary compiled perl?
Message-Id: <663s7i$pao$1@news.ox.ac.uk>

In article <34855799.2FCA@plab.ku.dk>,  <tobez@plab.ku.dk> wrote:
>Malcolm Beattie wrote:
>
>> >I know someone is working on a perl compiler. I was wondering something else,
>> >namely: is it possible to store the result of perl *after* perl compiles your
>> >script, but before perl starts executing it (a sort of perl bytecode)?
>> 
>> That's what the Bytecode backend of the compiler does.
>
>Sometimes this is not convenient.  The typical situation:
>
>An interactive program embeds perl interpreter.  On startup it evals
>"use HUGE1; use HUGE2;" etc...
>Than it launches main script.  HUGE*.pm almost never change, and it
>seems very appropriate
>to have them precompiled;  not for the purpose of source hiding - just
>to speed up things.
>
>Is THIS possible somehow?

Yes, using (surprise, surprise) the Bytecode backend of the compiler.
It's messy to do using alpha3, though, especially since you have to
replace manually the HUGE1.pm with a HUGE.pm that roughly does
"use B qw(byteload_fh); open(FOO, "..../HUGE.pmc"); byteload_fh(*FOO)".
I may have a chance to improve that side of things for 5.005.

--Malcolm

-- 
Malcolm Beattie <mbeattie@sable.ox.ac.uk>
Oxford University Computing Services
"I permitted that as a demonstration of futility" --Grey Roger


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

Date: Mon, 01 Dec 1997 10:17:18 -0500
From: thelab@nmarcom.com (thelab)
Subject: Re: localtime()
Message-Id: <thelab-0112971017190001@host-043.nmarcom.com>

In article <01bcfe63$0d826cc0$3e03b480@mm>, "Phil R Lawrence"
<prl2@lehigh.edu> wrote:

> Problem: $loc_fmt[4] in the following code returns 11 instead of 12 for a
> file created today (12/1/97).  Why?
> 
localtime returns a 0..11 value for month, and 0..6 for day of week.

-Mit


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

Date: Wed, 03 Dec 1997 10:41:14 -0700
From: Andrew Gehring <andrew_gehring@mk.com>
Subject: need direct access to VTOC
Message-Id: <348599BA.C93D81EF@mk.com>

This is a multi-part message in MIME format.
--------------605462E5C25980A24291CE7E
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Any one know of a mod or way to directly access the VTOC on a Solaris
system?

Thanks,

Andrew

--
Andrew M. Gehring                       Morrison-Knudsen Corporation
Senior Systems Administrator            P.O. Box 73
andrew_gehring@mk.com                   Boise, ID.      83729
(208) 386-XXXX - Voice                  (208) 386-5039 - Fax



--------------605462E5C25980A24291CE7E
Content-Type: text/x-vcard; charset=us-ascii; name="vcard.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Andrew Gehring
Content-Disposition: attachment; filename="vcard.vcf"

begin:          vcard
fn:             Andrew Gehring
n:              Gehring;Andrew
org:            Morrison Knudsen
adr:            P.O. Box 73;;;Boise;ID;83729;USA
email;internet: andrew_gehring@mk.com
title:          Senior Systems Administrator
tel;work:       (208) 386-XXXX
tel;fax:        (208) 386-5039
x-mozilla-cpt:  ;0
x-mozilla-html: FALSE
version:        2.1
end:            vcard


--------------605462E5C25980A24291CE7E--



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

Date: Wed, 3 Dec 1997 08:20:12 -0600
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Package closure(?) question
Message-Id: <sqp366.lu.ln@localhost>

Tim Ayers (tayers@bridge.com) wrote:
: I'm new to using packages and am hoping someone would tell me
: why the following doesn't work. (I'm using Perl5.003.)

:   #!/usr/local/bin/perl5 -w

:   package foo;
:   
:   sub compare {
:     return $b <=> $a;
:   }

:   package bar;

:   @list = qw(1 3 2);
:   @sortedList = sort foo::compare @list;
                  ^^^^
                  ^^^^
:   print "@sortedList\n";



Looking up sort() in the 'perlfunc' man page is a Really Good Idea
when having a problem with sort()...

(underlining added)


--------------------------
=item sort SUBNAME LIST

=item sort BLOCK LIST

=item sort LIST

Sorts the LIST and returns the sorted list value.  If SUBNAME or BLOCK
is omitted, sorts in standard string comparison order.  If SUBNAME is
specified, it gives the name of a subroutine that returns an integer
less than, equal to, or greater than 0, depending on how the elements
of the array are to be ordered.  (The C<E<lt>=E<gt>> and C<cmp>
operators are extremely useful in such routines.)  SUBNAME may be a
scalar variable name, in which case the value provides the name of the
subroutine to use.  In place of a SUBNAME, you can provide a BLOCK as
an anonymous, in-line sort subroutine.

In the interests of efficiency the normal calling code for subroutines is
bypassed, with the following effects: the subroutine may not be a
recursive subroutine, and the two elements to be compared are passed into
the subroutine not via @_ but as the package global variables $a and
                                     ^^^^^^^^^^^^^^
$b (see example below).  They are passed by reference, so don't
modify $a and $b.  And don't try to declare them as lexicals either.
--------------------------


package foo cannot see the two vars that package bar wants to compare...


This works:

   sub compare {
     return $bar::b <=> $bar::a;
   }


--
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


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

Date: 3 Dec 1997 14:31:32 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Package closure(?) question
Message-Id: <663qg4$boj$1@csnews.cs.colorado.edu>

 [courtesy cc of this posting sent to cited author via email]

In comp.lang.perl.misc, Tim Ayers <tayers@bridge.com> writes:
:I'm new to using packages and am hoping someone would tell me
:why the following doesn't work. (I'm using Perl5.003.)

That's because the sort built-in uses the $a and $b of the package
in which the sort built-in itself found itself compiled, not 
the package in which its comparison routine was compiled.  

--tom
-- 
	Tom Christiansen	tchrist@jhereg.perl.com

    tmps_base = tmps_max;                /* protect our mortal string */
        --Larry Wall in stab.c from the perl source code


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

Date: 3 Dec 1997 17:00:54 GMT
From: kjetil.skotheim@usit.uio.no (Kjetil Skotheim)
Subject: Re: Package closure(?) question
Message-Id: <664386$ih2$2@ratatosk.uio.no>

In article <34855E45.269534C1@bridge.com>, tayers@bridge.com says...
>
>I'm new to using packages and am hoping someone would tell me
>why the following doesn't work. (I'm using Perl5.003.)
>
>  #!/usr/local/bin/perl5 -w
>
>  package foo;
>  
>  sub compare {
>    return $b <=> $a;
>  }


Package foo does not know any $a or $b. Try something like:

sub compare {
  my $caller_package=(caller)[0];
  return ${$caller_package."::a"} <=> ${$caller_package."::b"};
}


--
Kjetil Skotheim



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

Date: Wed, 03 Dec 1997 10:49:49 -0500
From: Henry Hartley <henry@DotRose.com>
Subject: Re: Perl editor needed
Message-Id: <34857F9D.21214779@DotRose.com>

I'd recommend Homesite from Allaire (http://www.alaire.com).  One of the options
is to "Always save using UNIX format (LF only).  It's a great html editor and I
use it for all my programming.  One of my favorite features is multiple file find
and replace.  It does have some annoyances and I've never been able to get a
response to questions about them but it is still the best I've seen.  (Win95/NT
only).

Henry


> Larry Hanlon wrote:
>
> Hello, just found first lesson in PERL. I need to find a editor that doesn't
> add a CR to the end of each line. What I am doing is the programming in a
> WIN95/DOS environment and when the scripts are run on a UNIX platform the
> CR's create errors. Please reply to e-mail as the news server is sometimes
> buggy.





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

Date: Wed, 03 Dec 1997 10:39:07 -0600
From: James Ludlow <ludlow@us.ibm.com>
Subject: Re: Perl editor needed
Message-Id: <34858B2B.AC9@us.ibm.com>

> > Larry Hanlon wrote:
> >
> > Hello, just found first lesson in PERL. I need to find a editor that doesn't
> > add a CR to the end of each line. What I am doing is the programming in a
> > WIN95/DOS environment and when the scripts are run on a UNIX platform the
> > CR's create errors. Please reply to e-mail as the news server is sometimes
> > buggy.

I had exactly the opposite experience.  I wrote some code on Win95/NT
and it worked just fine on a Unix box (even with the ^M at the end of
each line).  If it's giving you problems though, just remember that you
are using Perl, and stripping the ^M off of each line of a file on the
Unix side would be a fairly trivial task.

I'll even bet that some of the more experienced readers of this
newsgroup would be able to do it as a one-liner.  Hmmm... any takers?

--
James Ludlow (ludlow@us.ibm.com)
This isn't tech support, and all opinions are my own.


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

Date: Wed, 03 Dec 1997 16:29:11 +0100
From: Paul Peters <paul.peters@ica.unimaas.nl>
Subject: perl script
Message-Id: <34857AC7.E702FBA0@ica.unimaas.nl>

Can anyone tel me why the next script works on a UNIX system but not on
Windoes NT

$dirname="\.";
opendir( dir , $dirname) || die "directory <$dirname> bestaat niet.";
while ($filename=readdir(dir))
   {
   if (-d $filename )
      {
      print "\n$filename";
      }
   else
      {
      print "\nGeen dir: $filename";
      }
   }
closedir(dir);



Paul



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

Date: 3 Dec 1997 16:45:13 GMT
From: kjetil.skotheim@usit.uio.no (Kjetil Skotheim)
Subject: Re: perl script
Message-Id: <6642ap$ih2$1@ratatosk.uio.no>

In article <34857AC7.E702FBA0@ica.unimaas.nl>, paul.peters@ica.unimaas.nl 
says...
>
>Can anyone tel me why the next script works on a UNIX system but not on
>Windoes NT
>
>$dirname="\.";
>opendir( dir , $dirname) || die "directory <$dirname> bestaat niet.";
>while ($filename=readdir(dir))
>   {


This works fine on my Win95 PC. Might have something to do
with your version or from where you got your NT-Perl.
I got my 5.003_07 from http://www.activestate.com

--
Kjetil Skotheim



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

Date: Wed, 3 Dec 1997 08:58:10 -0800
From: "Creede Lambard" <$_=qq!fearless\@NOSPAMio.com!;y/[A-Z]//d>
Subject: Re: perl script
Message-Id: <66438n$9oo@news.microsoft.com>

Because you wrote it in Dutch? :D

Seriously . . . I just tried it on Windows NT 4.0 using the ActiveState port
and it works just fine, assuming this is the type of output you want:

 .
 ..
Geen dir: clear.bat
foo
bar
baz
Geen dir: test.pl
ie
oe
ue
Geen dir:list.txt

The only substantial difference between my script and yours was that I used
DIR as the filehandle rather than dir, but since upper case is only a
recommendation for file handles, not a requirement, that shouldn't make any
difference whatever.

Paul Peters wrote in message <34857AC7.E702FBA0@ica.unimaas.nl>...
>Can anyone tel me why the next script works on a UNIX system but not on
>Windoes NT
>
>$dirname="\.";
>opendir( dir , $dirname) || die "directory <$dirname> bestaat niet.";
>while ($filename=readdir(dir))
>   {
>   if (-d $filename )
>      {
>      print "\n$filename";
>      }
>   else
>      {
>      print "\nGeen dir: $filename";
>      }
>   }
>closedir(dir);
>
>
>
>Paul
>




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

Date: 3 Dec 97 14:25:49 GMT
From: "Ahmet Ayvaz" <ayvaz@weborigins.com>
Subject: Please help :(
Message-Id: <01bd0010$22132a40$2d0d63cf@default>

Can somebody tell me what the problem is with this script. It's
very simple, but I keep getting an internal server error when I try to
run it. I've set all the permissions right so that isn't it and I FTP'd the
file in ASCII mode.

My web hosting service won't help either(I'll be moving my sites soon).

Thanks in advance for all you help!

P.S. The script is attached. named example1.pl (copied from book).

Best regards,
Ahmet Ayvaz
ayvaz@weborigins.com


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

Date: 3 Dec 97 14:26:56 GMT
From: "Ahmet Ayvaz" <ayvaz@weborigins.com>
Subject: Please help again :( forget to attach the file
Message-Id: <01bd0010$4a91fc80$2d0d63cf@default>

Can somebody tell me what the problem is with this script. It's
very simple, but I keep getting an internal server error when I try to
run it. I've set all the permissions right so that isn't it and I FTP'd the
file in ASCII mode.

My web hosting service won't help either(I'll be moving my sites soon).

Thanks in advance for all you help!

P.S. The script is attached. named example1.pl (copied from book).

Best regards,
Ahmet Ayvaz
ayvaz@weborigins.com


begin 600 example1.pl
M(R$O=7-R+VQO8V%L+V)I;B]P97)L( T*(V5X86UP;&4Q+G!L#0H-"FEF("@D
M14Y6>R=215%515-47TU%5$A/1"=](&5Q("=03U-4)RD-"GL-"G)E860H4U1$
M24XL("1B=69F97(L("1%3E9[)T-/3E1%3E1?3$5.1U1()RD[#0I <&%I<G,@
M/2!S<&QI="@O)B\L("1B=69F97(I.PT*9F]R96%C:" D<&%I<B H0'!A:7)S
M*0T*>PT**"1N86UE+" D=F%L=64I(#T@<W!L:70H+STO+" D<&%I<BD[#0HD
M=F%L=64@/2T@='(O*R\@+SL-"B1V86QU92 ]+2!3+R4H6V$M9D$M1C M.5U;
M83UF02U&,"TY72DO<&%C:R@B0R(L(&AE>"@D,2DI+V5G.PT*)&9O<FU[)&YA
M;65](#T@)'9A;'5E.PT*#0I]#0I]#0H-"G!R:6YT(")#;VYT96YT+71Y<&4Z
M('1E>'0O:'1M;%QN7&XB.PT*<')I;G0@(CQH=&UL/B([#0IP<FEN=" B/&AE
M860^(CL-"G!R:6YT("(\=&ET;&4^4F5S=6QT<SPO=&ET;&4^(CL-"G!R:6YT
M("(\+VAE860^(CL-"G!R:6YT("(\8F]D>3XB.PT*<')I;G0@(CQH,3Y%>&%M
M<&QE(')E<W5L=',\+V@Q/B([#0IP<FEN=" B5&AI<R!I<R!T:&4@<W1R:6YG
M.B!<(B1F;W)M>R=S=')I;F<G?5PB("([#0IP<FEN=" B/"]B;V1Y/B([#0IP
:<FEN=" B/"]H=&UL/B([#0H-"F5X:70[#0IP
`
end



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

Date: Wed, 03 Dec 97 12:14:55 -0500
From: bsa@void.apk.net (Brandon S. Allbery KF8NH; to reply, change "void" to "kf8nh")
Subject: Re: Problem with setting timezone through $ENV{TZ}
Message-Id: <34859435$5$ofn$mr2ice@speaker>

In <663kks$1hu$1@sirius.cs.pdx.edu>, on 12/03/97 at 04:51 AM,
   maurice@cs.pdx.edu (Maurice L. Marvin) said:
+-----
|   I need to display UTC times in the user's local timezone.
| I know that the TZ environment variable can be set, to control
| the result of localtime().  However, it doesn't seem to work
| within Perl.  If I set TZ in the shell, and then execute a
+--->8

If you check DejaNews you'll find the last time this question was asked... and
answered.

Your system's C library determines when the TZ environment variable is
checked; on many systems, it's only checked the first time localtime() (the C
function, not the Perl one) is called.  Unfortunately for you, by the time
yoru Perl script starts executing it's already been called and it's too late.

-- 
sub AUTOLOAD{print$_{$_.++$x{$_}}}sub new{my%x;%_=map{++$a%2?$_.++$x{$_}:$_}
split(//,pack('N*',unpack('w*',unpack('u*','M@H*HP\'2"@\C`88+SE/!EA(F!A\'6'.
"\$LZV0+(3;C9QRA9NAPG2&D\\G(88:KL=A0\n4AN.5W\"\"&\\[W>;H>3S>0@A\\N@PB\$`")
)));bless{}}$b=new main;map{$b->_}split(//,' Brandon S. Allbery KF8NH');#:-)


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

Date: Wed, 03 Dec 1997 16:59:06 +0100
From: "Niels O. Jensen" <hotdog@stibo.dk>
Subject: Processing of Postscript files with included EPS-file
Message-Id: <348581C9.767F94D9@stibo.dk>

Hi'

Can you instruct perl to accept both '\n' and '\r' as input line
seperator.

This is important to me, because i frequently get an 'Out Of Memory'
error when i process PostScript PS dump
file (with regular '\n' line termination) that contains a MAC EPS (with
'\r' line termination).

Hope someone can help me!! - Lars



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

Date: Wed, 3 Dec 1997 06:33:06 -0800
From: "Creede Lambard" <$_=qq!fearless\@NOSPAMio.com!;y/A-Z//d;print>
Subject: Re: Q about Active State Perl
Message-Id: <663qi2$oqk@bgtnsc01.worldnet.att.net>

Whether you can get sockets to work may depend on which Win32 you're talking
about. I've had very good luck using them in Windows NT 4.0 hooked up to an
Ethernet network. I've had very poor luck using them on Windows 95 with PPP.

One program I use quite a bit uses the Sockets module. It's available on the
Net somewhere but I don't have the URL in my head. I'll make myself a note
to send you a copy from work.

--- Creede Lambard
Minister of Irregular Expressions
Programming Republic of Perl

Vladimir Afanasiev wrote in message
<348731dd.3093721@windows.proxy.telekom.ru>...
>   If anybody have program, which work at Win 32 Perl compiler
>from Active State and use TCP/IP sockets, send me source or its URL
>please!
>---
>Vladimir
>http://www.ipclub.ru




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

Date: 03 Dec 1997 09:20:23 -0500
From: Clark Dorman <clark@s3i.com>
Subject: Re: Q: lambda fun, loop, string to expr
Message-Id: <dn2iibja0.fsf@s3i.com>


Jim Bowlin <bowlin@sirius.com> writes:
> > Question: what's the theoretical advantage of a loop with a middle exit?
> 
> This is not a Perl question per se, but it makes coding easier and can
> prevent repeating blocks of code and other groovy things. Do it when you
> need it.

I usually use it when I have a file that I'm trying to find something in:

while (defined ($inline=<FILE>)) {
   last if $inline=~ /stuff/;
}

This will get you out of the loop once you find what you are looking for.
That way, if FILE is megs of data and you find what you are looking for on
the first line, you dont have to continue reading through the rest of the
file.  (Actually, in this case, I might do a system grep call)
 
> > Must anonymous subroutine always be bound to a variable? If so, isn't the
> > advantage of ANONYMOUS routine lost?
> 
> No. Yes.
>  
> > Question: How to convert a string to an expression or vice versa? For
> > example, how to construct "$ext eq htm || $et eq html || $ext eq shtml"
> > given "@a" where "@a = qw(htm html shtml)"?
> 
> $extensions = join('|', qw(html htm shtml));
> $ext =~ /($extensions)/o and print "matched\n";
> 
> or even
> 
> $file =~ /\.($extensions)$/o

Well, this produces what he actually said he wants to construct: 

@a = qw(htm html shtml);
$ext_test = '$ext eq ' . join(' || $ext eq ', @a);
print " $ext_test\n";

Of course, your code actually does what he probably wants it to
accomplish.

BTW, you probably know but testing "$ext eq htm" probably won't do
what you want it to because htm is not quoted so perl is going to look
for something called htm and wont find it.  If I was going to see if
the extension of a file was one of a list, I'd do something like:

foreach (@a) {
   if ($ext eq $_) {
      print "Matches \n";
      last;
   }
}

This is not the most succinct, but if I have to maintain the code, it
makes the most sense to me.

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


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

Date: 03 Dec 1997 07:29:42 -0700
From: Randal Schwartz <merlyn@stonehenge.com>
To: "Xah" <xah@best.com>
Subject: Re: Q: lambda fun, loop, string to expr
Message-Id: <8cwwhmzei1.fsf@gadget.cscaper.com>

>>>>> "Xah" == Xah  <xah@best.com> writes:

Xah> Question: what's the theoretical advantage of a loop with a middle exit?

Watch:

	{
		print "enter any number, 999 to quit: ";
		chomp($n = <STDIN>);
		last if $n == 999;
		$sum += $n;
		redo;
	}
	print "the sum is $sum\n" if defined $sum;

There.  A middle-exiting loop is the most natural way to express this
loop.  Sure you can do it with really convoluted while(...)
conditions, or duplicated code, but this way is trivial.

Xah> Question: In Perl, an anonymous subroutine at runtime is defined like:
Xah>     $subref = sub BLOCK;

That's one of many ways, yes.

Xah> Must anonymous subroutine always be bound to a variable?

No.

Xah>  If so, isn't the
Xah> advantage of ANONYMOUS routine lost?

Not applicable.  For example:

	@a = (
		sub { print "Fred!" },
		sub { print "Barney!" },
		sub { print "Betty!" },
		sub { print "Wilma!" },
		sub { print "Dino!"; for (1..10) { print " (yip)" }},
	);
	for (1..10) {
		$a[rand @a]->(); print "\n";
	}

There is no "variable" in which each of these coderefs is stored.
Instead, they are merely elements in a larger data structure.

Xah> Question: How to convert a string to an expression or vice versa? For
Xah> example, how to construct "$ext eq htm || $et eq html || $ext eq shtml"
Xah> given "@a" where "@a = qw(htm html shtml)"?

"convert to an expression"... Hmm.  Can't quite tell the context of that
question.  I can tell you have to see if $ext is one of @a though:

	$found = grep $ext eq $_, @a;

Note that this is not particularly efficient for large @a, but it's OK
for this one.  The PerlFAQ has methods for larger lists.

print "Just another Perl hacker," # but not what the media calls "hacker!" :-)
## legal fund: $20,990.69 collected, $186,159.85 spent; just 272 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@ora.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: Wed, 3 Dec 1997 08:43:27 -0800
From: bill@earthgatetours.com (bill)
Subject: Re: READING the last few lines of a HUGE FILE.
Message-Id: <1997113010451342332790N@three.earthgatetours.com>

Guy Doucet <gdoucet@ait.acl.ca> wrote:

> But what if I want to read only the last few lines of an enourmously
> large log file. I'm talking a few MBytes or maybe 10MBytes. I don't want
> to write to it, only read it. The lines in the file are all different
> lengths.

If you're on a Unix system and are willing to call an external program -
if you don't need portability I say why not? - you could use "tail"
which has the virtue of giving you complete lines and only as many as
you need:

  @lines = split("\n",`tail -$numOfLinesWanted $fileName`);

As always, there's more than one way to do it...

Bill Tucker

(For my real address replace nospam with earthgatetours)

+-------------------------+----------------------------------------+
| Bill Tucker             | We shall not cease from exploration    |
| NeoPath, Inc.           | And the end of all our exploring       |
| bill@nospam.com         | Will be to arrive where we started     |
| (206) 869-7284          | And know the place for the first time. |
|                         |               - T. S. Eliot            |
+-------------------------+----------------------------------------+


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

Date: Wed, 03 Dec 97 12:20:55 -0500
From: bsa@void.apk.net (Brandon S. Allbery KF8NH; to reply, change "void" to "kf8nh")
Subject: Re: size of a DB
Message-Id: <34859526$6$ofn$mr2ice@speaker>

In <660hl9$gb2$2@due.unit.no>, on 12/02/97 at 08:42 AM,
   Morten Simonsen <mortensi@idt.ntnu.no> said:
+-----
| Another comment on this subject: In my doc it says that SDBM_File has
| "small" database size. Is this supposed to be a joke? Unfortunantly I
+--->8

If you'd ever seen a dbm(3) (old Unix hash database library) database, you'd
understand.

-- 
brandon s. allbery           [Team OS/2][Linux][JAPH]        bsa@void.apk.net
cleveland, ohio              mr/2 ice's "rfc guru" :-)                  KF8NH
"Never piss off a bard, for they are not at all subtle and your name scans to
 `Greensleeves'."  ---unknown, quoted by Janet D. Miles in alt.callahans



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

Date: Wed, 03 Dec 1997 17:12:39 +0000
From: Nick Weavers <weav@plover.havant.ibm.com>
Subject: small problem with perl INSTALL
Message-Id: <34859307.35399851@plover.havant.ibm.com>

If you are installing under AIX/AFS you hit a problem when INSTALL gets
to the man pages. ie It won't take "none" for an answer :-)

<start snip>
Perl5 has manual pages available in source form.
However, you don't have nroff, so they're probably useless to you.
If you don't want the manual sources installed, answer 'none'.
 
Where do the main Perl5 manual pages (source) go? (~name ok) [none] 

Since you are running AFS, I need to distinguish the directory in which
manual pages reside from the directory in which they are installed (and from
which they are presumably copied to the former directory by occult means).

Where will man pages be installed? (~name ok) none
Where will man pages be installed? (~name ok) 
<end snip>
-- 
Nick Weavers, IBM SSD, Havant, PO9 1SA, UK. e-mail: weav@hursley.ibm.com
Tel: 011-44-(0)1705-486363 ext 5121  Fax: 011-44-(0)1705-499278


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

Date: Wed, 3 Dec 1997 16:45:31 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: storage of IO::Socket::INET instance in a module
Message-Id: <EKMH7w.CLx@world.std.com>

clintdw@netcom.com (Clinton Wong) writes:

>At some point in a module, I do this:

>  $self->{'fh'} = new IO::Socket::INET ( ... );

>Somewhere else in the module, I want to do this:

>  print $self->{'fh'} "hi there\n";

According to the perlfunc man page, an indirect filehandle can either
be a simple scalar or a block returning a scalar.

  print { $self->{'fh'} } "hi there\n";

You could also make use of the fact that IO::Socket::INET inherits
from IO::Handle, so you can use IO::Handle's print method:

  $self->{'fh'}->print("hi there\n");

-- 
Andrew Langmead


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

Date: Wed, 03 Dec 97 12:22:20 -0500
From: bsa@void.apk.net (Brandon S. Allbery KF8NH; to reply, change "void" to "kf8nh")
Subject: Re: truncating a string
Message-Id: <34859573$7$ofn$mr2ice@speaker>

In <663c40$ao4$1@news.pop-stuttgart.de>, on 12/03/97 at 11:25 AM,
   "Ronald G\"oggel" <r.goeggel@atos-group.de> said:
+-----
| >$myvar = substr($myvar, 0, 10);
| I thought of this possibility too, but it implies that $[ has the value of
| 0.
+--->8

In Perl5, it should.

-- 
sub AUTOLOAD{print$_{$_.++$x{$_}}}sub new{my%x;%_=map{++$a%2?$_.++$x{$_}:$_}
split(//,pack('N*',unpack('w*',unpack('u*','M@H*HP\'2"@\C`88+SE/!EA(F!A\'6'.
"\$LZV0+(3;C9QRA9NAPG2&D\\G(88:KL=A0\n4AN.5W\"\"&\\[W>;H>3S>0@A\\N@PB\$`")
)));bless{}}$b=new main;map{$b->_}split(//,' Brandon S. Allbery KF8NH');#:-)


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

Date: Wed, 3 Dec 1997 10:10:10 -0500
From: "Brian Sullivan" <brians@helicon.com>
Subject: Web Discussion Board with RFC1867 file upload
Message-Id: <663soj$ebr$1@tor-nn1.netcom.ca>

Does anybody have any knowledge of a Web based discussion board system
written in Perl supporting RFC1867 file uploads.

Specifically I would like to allow posts that have file attachments, store
the uploads, preserve the attachment with the message and allow downloads.
Does such a beast exist?






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

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

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