[7609] in Perl-Users-Digest
Perl-Users Digest, Issue: 1235 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Oct 27 19:13:47 1997
Date: Mon, 27 Oct 97 16:00:34 -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 Mon, 27 Oct 1997 Volume: 8 Number: 1235
Today's topics:
'A$#%i$#*>*:071d*>CQ <jf5102@ms18.hinet.net>
Re: Class vars and "exists": Error in book (Toutatis)
Controlling Decimal Point mail@net-workshop.demon.co.uk
Re: Controlling Decimal Point (brian d foy)
Re: DBM (hashes of arrays) <seay@absyss.fr>
Re: eval 'use Socket' vs. 'use socket' (Rahul Dhesi)
File name available in -n loops? (John Siracusa)
Re: Fortran to Perl Converter <rpsavage@ozemail.com.au>
Re: hashes of arrays in dbm <seay@absyss.fr>
Re: How do I find out whether my script is running firs <seay@absyss.fr>
Re: How to send keystrokes from Perl to Win95 app (Matthew H. Gerlach)
Looking for perlTk <aklank@twisto.compaq.com>
oraperl (Paul Weinstein)
Re: Passing HTML Forms to IMAP4/POP3 (J. Kivi Shapiro)
PDF (Charles Thayer)
Re: PDF <rootbeer@teleport.com>
Re: Performance Question (William R. Ward)
Re: perl newbie needs help (brian d foy)
Perl Suffix (Was: Can perl be maken to Compiler instead <seay@absyss.fr>
Re: Perl Suffix (Was: Can perl be maken to Compiler ins <ajohnson@gpu.srv.ualberta.ca>
Re: Perl Suffix (brian d foy)
pod2html Problems <robert.hughes@amarest.com>
Reference to class method (\&{$foo->you}) <thomson@zinger.adp.wisc.edu>
Re: Reference to class method (\&{$foo->you}) (brian d foy)
Re: Reference to class method (\&{$foo->you}) (Toutatis)
Re: To get perl running on my system... <seay@absyss.fr>
Re: Using .forward file to trigger Perl script <trachier@crrel.usace.army.mil>
Re: Year2000 problem with localtime(); <trachier@crrel.usace.army.mil>
Re: Year2000 problem with localtime(); <trachier@crrel.usace.army.mil>
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 27 Oct 1997 16:08:38 +0800
From: jf5102 <jf5102@ms18.hinet.net>
Subject: 'A$#%i$#*>*:071d*>CQ
Message-Id: <34544C05.322F6DE6@ms18.hinet.net>
%;$e:K&[$K$Q$;&~$K$k$T$Q$@$iAp&X1_3x2D"6*)!y071d$H!z=g
$p$@BI 5u$@BI 7S<K0m.<
!=&?8U+E
!@!@$Q$U(k$H3LCv$_*:)J(F%u&3(b%s!A$@,O'F1f&[$v*:)R.Z*x$@(G!A$j$@(G!A$@,O057R
.I6!3L&n&b$G!B$T$Q$@%H$W!C'{6!,y6G5[+\&h(O)R.Z)T*x!B2J$j*:''6'*k!AAY&389:Y/`
(O+k0_)R.Z0m.<$@-S$p.I%H$W*:!y$[0m$#0I3N!z!C
!@!@&]&9+\&h$H(C$Q<v$_&a)T312t!A%N&U:X/sCD!B<v%,%];q)R.Z!A&}'V$O$F<F&~!A+o%u
/`(O%]%VE\*x$@(G!C&S:c3y:k1K!B(O312t/`+k0_*:.|:xJ^.Z%;$#E\'s!C%i)H*:,O!A&3.I
$O&S$H6K.`.|:xJ^!A(O1o+k0_;YC*!C
!@!@$@/k$H%i/`$#)M9D!A1`,](l*:$j312t!y<P%;,[$y!z!A(d9j,O1w&e57BN*L*:312t%]%V
6H%V/g!A,O$$,]$#$$%N!C'Z0j2M%N$p;!.a'u2A/N5[!y&W;Z9N!z$$!A%D($%<%!%M-+*w=P.v
3E0J$b3N'b*/*:)R.Z2>4S(l&[$v*:(-$W!A,](S,O+\&3=l!C&},O(l$F2{%N'Y(O(d%L$H*:)R
.Z$]AY5L*k2>4S&(%\!A&\)s2>4S*/.Z!A's,O'9%~/n-p5L=]*:*E7Q!C
!@!@9o(:(G&3)J>9&[(u/g*:$H!A'Z-n1j=U%t&s(k$H*:)J>9)x&J$@$'$E$Q$E3#.t$#&h$j$p
*x5u!A'Y(O$p$@BI!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@!@!@!@!]%;$e'@*L,O%x$jBe>G0|%x%_Be>G0|&WEA1P1B!^
$5:K%N&9=g$e39;P'@*L5LCv/S&9An)z
1}AA8Q!y$[0m$#0I3N!z=m*k=Pe-mail 59'Z
------------------------------
Date: 27 Oct 1997 21:02:27 GMT
From: toutatis@_SPAMTRAP_toutatis.net (Toutatis)
Subject: Re: Class vars and "exists": Error in book
Message-Id: <toutatis-ya023180002710972202280001@news.euro.net>
tph@rmi.net wrote:
> my %fields = {
^
> name => undef,
> age => undef,
> peers => undef,
> };
^
--
Toutatis
------------------------------
Date: Mon, 27 Oct 1997 22:24:37 GMT
From: mail@net-workshop.demon.co.uk
Subject: Controlling Decimal Point
Message-Id: <34551325.4351875@news.demon.co.uk>
Controlling Decimal Point
Hi,
I'm writing a Perl script that adds the prices of goods that have been
ordered using a on-line form. How do I control the number of digits
after the decimal point (eg, I'm getting such figures as
139.6999999997 but only want 139.70).
Hope someone can help,
Regards
Richard.
------------------------------
Date: Mon, 27 Oct 1997 18:42:04 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: Controlling Decimal Point
Message-Id: <comdog-ya02408000R2710971842040001@news.panix.com>
In article <34551325.4351875@news.demon.co.uk>, mail@net-workshop.demon.co.uk wrote:
>I'm writing a Perl script that adds the prices of goods that have been
>ordered using a on-line form. How do I control the number of digits
>after the decimal point (eg, I'm getting such figures as
>139.6999999997 but only want 139.70).
the Perl FAQ [1] has examples for your edification.
good luck. :)
[1] The Perl FAQ
find one near you at <URL:http://www.perl.com>
--
brian d foy <comdog@computerdog.com>
NY.pm - New York Perl M((o|u)ngers|aniacs)* <URL:http://ny.pm.org/>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
------------------------------
Date: Mon, 27 Oct 1997 11:22:31 +0100
From: Doug Seay <seay@absyss.fr>
To: stevee@moon.jic.com
Subject: Re: DBM (hashes of arrays)
Message-Id: <34546B67.5F2677AD@absyss.fr>
[posted and mailed]
stevee@moon.jic.com wrote:
>
> I have setup a database whit the dbm module with the following code
>
> I only get the $request (the keys) but not the indexed values.
>
> Is it not possible to set up a database with dbm with a hash of arrays?
Try the MLDBM.pm module from your local CPAN site. If that doesn't do
the trick, let us know.
- doug
PS - To use this module, you'll need to change from dbmopen()/dbmclose()
to tie().
------------------------------
Date: 27 Oct 1997 23:10:11 GMT
From: c.c.eiftj@33.usenet.us.com (Rahul Dhesi)
Subject: Re: eval 'use Socket' vs. 'use socket'
Message-Id: <63370j$j72$1@samba.rahul.net>
In <62r3po$ou$1@newsreader.jvnc.net> vikas@newsreader.jvnc.net (Vikas
Aggarwal) writes:
> eval 'use Socket';
vs
> use Socket;
The eval version has the effect of delaying the load of the Socket
module until run time. Most of the time you want to just say 'use
Socket' so the module is loaded at compile time. This has the advantage
that symbols defined within the module are immediately available *during
compile time* to the rest of your perl code. This is helpful in
suppressing warnings about undefined symbols.
I know of two examples where I find the eval alternative useful.
1. If I have some error-handling code that is only rarely executed.
Then I can save some load and compile time by loading any modules needed
by that code only when that code is executed. E.g.:
if (rare and serious error) {
eval 'use Big_and_slow_module';
$@ && die $@;
.. rest of code ..
}
2. When I have a perl script that loads many slow modules, and I want
it to quickly exit with a usage message if incorrectly invoked.
... parse argument ..
if (bad argument) {
... print nice usage message ...
exit(1);
}
eval 'use Big_and_slow_module1';
$@ && die $@;
eval 'use Big_and_slow_module2';
$@ && die $@;
eval 'use Big_and_slow_module3';
$@ && die $@;
--
Rahul Dhesi <dhesi@spams.r.us.com>
------------------------------
Date: 27 Oct 1997 23:18:42 GMT
From: macintsh@cs.bu.edu (John Siracusa)
Subject: File name available in -n loops?
Message-Id: <6337gi$a60$1@news1.bu.edu>
Is the name of the current file available in commands like this?
perl -ne 'print if(/foo/)' file1
It's not in @ARGV, apparently. I ask because find is so horrible at
finding files that contain a string. Yes, I know about find2perl,
and yes I know I should just write a script called pfind or
something, but I don't want to lug around custom scripts if I can do
the same thing with just find and perl. Trying to get "{}" to
interpolate inside the perl part of a "find . -exec perl ..." command
is a nightmare in most shells.
-----------------+----------------------------------------
John Siracusa | If you only have a hammer, you tend to
macintsh@bu.edu | see every problem as a nail. -- Maslow
------------------------------
Date: Tue, 28 Oct 1997 09:45:54 +1000
From: Ron Savage <rpsavage@ozemail.com.au>
Subject: Re: Fortran to Perl Converter
Message-Id: <345527B2.6720@ozemail.com.au>
Proclamation of the Lateral Thinking Department:
There's another way to do it...
a) Write C wrappers for your Fortran routines. That's what I do, and somebody even pays me... Output: *.h
b) Use SWIG. Output: *.pm
c) Proceed in Perl
1) Get SWIG from http://www.cs.utah.edu/~beazley/SWIG.
2) I have not been able to get SWIG running under Win95 [mega ;-(] but I could get some examples running under
IRIX. It was developed under IRIX.
3) Swear profusely.
Jack LaVigne wrote:
>
> I have a fairly large library
> of fortran routines (about 200).
> [snip]
--
Cheers,
Ron Savage
Office: savage.ron.rs@bhp.com.au
Home (preferred): rpsavage@ozemail.com.au
------------------------------
Date: Mon, 27 Oct 1997 11:16:29 +0100
From: Doug Seay <seay@absyss.fr>
Subject: Re: hashes of arrays in dbm
Message-Id: <345469FD.7B0B8B91@absyss.fr>
Steven Sajous wrote:
>
> I have setup a database whit the dbm module with the following code
> #!/usr/bin/perl5
> $home=$ENV{"HOME"} if $home eq "";
> $data = "$home/proshop/allshop.daf";
> open(ALL,"newshop") or die("could not open file:$!");
> dbmopen(%SHOP,"proshop",0600);
> open(ALL,"newshop") or die("could not open file:$!");
> while(<ALL>) {
> ($itemnum,$rest) = split(/::/,$_);
> @field = split(/::/,$rest);
> $subcat="Miscellaneous" if $subcat =~ /^\s*$/;
> $SHOP{$itemnum} = [@field];
> }
> dbmclose(%SHOP);
>
> .
> .
> .
>
> [To save space in this confirmation email we have abbreviated your
> article,
> however the entire article will be posted].
It looks like your newsservice thinks you were too verbose.
First of all, dbmopen() is ancient history. It still runs, but if you
are changing code, change this to use tie(). Read "perldoc perltie" for
all the details.
Your posting was truncated, so I'm not sure what question you were
asking, but from your subject this is your problem.
> $SHOP{$itemnum} = [@field];
All this does is store a reference, not the data of @field. Using it
later will give you a reference that doesn't have what you think it
should have. Hashs store KEY=>VALUE pairs, but both have to be scalars
(or scalar look-alikes). Use the MLDBM module for multi-level stores.
Dunno how well it works as I've never needed it, but it looks to do what
you want. It is in CPAN (of course).
- doug
------------------------------
Date: Mon, 27 Oct 1997 10:16:47 +0100
From: Doug Seay <seay@absyss.fr>
To: Chenyang Xu <chenyang@mashie.ece.jhu.edu>
Subject: Re: How do I find out whether my script is running first time since login?
Message-Id: <34545BFF.5D427DE7@absyss.fr>
[posted and mailed]
Chenyang Xu wrote:
>
> How do I find out whether my perl script is running first time since my
> recent login?
> Any help is appreciated.
There isn't anything automatic that I'm aware of. The easiest way would
be to have a timestamp file that your script creates. If the file is
already there, this isn't the first time. You may or may not need to
check for multiple instances of this script at the same time (look at
file locking if you need to do this). You'll need for your .login or
.logout to delete this file so that it won't be there when you start.
- doug
PS - lose the .sig, it is too long
------------------------------
Date: Mon, 27 Oct 1997 23:49:38 GMT
From: gerlach@netcom.com (Matthew H. Gerlach)
Subject: Re: How to send keystrokes from Perl to Win95 app
Message-Id: <gerlachEIqI6r.Dq9@netcom.com>
In article <Pine.GSO.3.96.971027093557.15628K-100000@usertest.teleport.com> Tom Phoenix <rootbeer@teleport.com> writes:
>On 27 Oct 1997, L. Dwynn Lafleur wrote:
>
>> Is it possible to send keystrokes from a running Perl script to a Win95
>> application that the script has opened? For example, from a Perl
>> script, can I open Notepad and then issue a command in the script to
>> insert a text string into the Notepad document?
>
>
>If it can be done in any Win95 scripting language it can be done in Perl -
>although the module to make it possible may not yet be written. Good luck!
>
I do this sort of thing all the time under UNIX with Comm.pl. Comm.pl
will not run under win95, but the Expect extension to TCL is ported to
winNT.
Matthew
------------------------------
Date: Mon, 27 Oct 1997 20:52:45 GMT
From: Aklank Shah <aklank@twisto.compaq.com>
Subject: Looking for perlTk
Message-Id: <3454FF1D.41C67EA6@twisto.compaq.com>
Hi
I am looking for perlTk library for
WindowsNT.
Is it available now?
and Where?
------------------------------
Date: Mon, 27 Oct 1997 16:28:34 -0600
From: paul1@interaccess.com (Paul Weinstein)
Subject: oraperl
Message-Id: <paul1-2710971628340001@d187.nhe.interaccess.com>
When ever I try to run the make file for Oraperl I get the follwoing error:
make: fatal error: don't know how to make /usr6/p/paul1533/oraperl/uperl.o
(bu42).
Everthing is set correctly and the directory & permissions are
correct...any ideas?
I'm running on a Nighthawk with CX/UX Version 6.2
-Paul
------------------------------
Date: 27 Oct 1997 23:06:47 GMT
From: kshapiro@julian.uwo.ca (J. Kivi Shapiro)
Subject: Re: Passing HTML Forms to IMAP4/POP3
Message-Id: <6336q7$e6j@falcon.ccs.uwo.ca>
In article <wkoh4bkwlx.fsf@ifi.uio.no>,
Lars Marius Garshol <larsga@ifi.uio.no> wrote:
>Use <FORM ACTION="mailto:address"> (note that this
>will URL-encode the form data, which does not make for readability) or
>submit it to a CGI program that can forward it via SMTP.
The second alternative has the added benefit that it will work for
everyone. "Mailto: forms" are in the HTML 3.2 specification as an
option, but many browsers in use do not implement the option.
- Kivi, with a caveat that ciwah people will recognize
(note followups)
--
kshapiro@julian.uwo.ca or kivi@pobox.com (Kivi Shapiro)
PGP
-----END PGP SIGNATURE-----
------------------------------
Date: 27 Oct 1997 17:11:00 -0500
From: thayer@mediabridge.com (Charles Thayer)
Subject: PDF
Message-Id: <199710272210.RAA07119@astor.mediabridge.com>
Any PDF generators or readers in Perl around? /charles
------------------------------
Date: Mon, 27 Oct 1997 15:38:27 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: thayer@astor.mediabridge.com
Subject: Re: PDF
Message-Id: <Pine.GSO.3.96.971027153808.25805C-100000@usertest.teleport.com>
On 27 Oct 1997, Charles Thayer wrote:
> Any PDF generators or readers in Perl around? /charles
If there's a module which does what you want, it should be listed in
the module list on CPAN. If you don't find one to your liking, you're
welcome and encouraged to submit one! :-) 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.rahul.net/jeffrey/ovs/
Ask me about Perl trainings!
------------------------------
Date: 27 Oct 1997 13:15:39 -0800
From: hermit@cats.ucsc.edu (William R. Ward)
Subject: Re: Performance Question
Message-Id: <waan2juaow0.fsf@ese.UCSC.EDU>
Phillip Lenhardt <philen@ans.net> writes:
> Which is cheaper, to pass a string to a subroutine which then splits it
> into characters or to split the string into an array and then pass it to
> the subroutine. I will be doing this thousands of times and recursively to
> boot (it is part of an object packing/unpacking set of methods).
First, the standard answer to any Perl question: "That Depends"...
Is it the same string each time? If so you might want to split it
into an array and pass a reference to that array. The split operation
is slow enough that it should be done as few times as possible, which
means doing it at the calling level (outside as many loops as
possible). Passing a whole array is more expensive than just passing
a reference to it. Assuming your subroutine either does not modify
the array, or that modifying the array doesn't hurt anything in the
calling environment, then passing a reference to the array is better.
In other words, this:
my @array = split(/regexp/, $string);
&func(\@array);
is probably better than this:
&func($string); # &func will do the split()
or this:
my @array = split(/regexp/, $string);
&func(@array);
Hope this helps(tm).
--Bill.
[posted and mailed]
--
William R Ward Bay View Consulting http://www.bayview.com/~hermit/
hermit@bayview.com 1803 Mission St. #339 voicemail +1 408/479-4072
hermit@cats.ucsc.edu Santa Cruz CA 95060 USA pager +1 408/458-8862
------------------------------
Date: Mon, 27 Oct 1997 18:20:51 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: perl newbie needs help
Message-Id: <comdog-ya02408000R2710971820510001@news.panix.com>
In article <3455005F.A61F111D@solution4u.com>, Andy Sutorius <andy@solution4u.com> wrote:
>I need to download a "freeware" editor so that I may write and compile
>and debug Perl. I have Perl 4 and 5 but nothing is making sense in how
>to get the program up and running.
>How can I go about getting a program to code Perl for CGI?
Perl is text. so any text editor will do: ed, vi, nvi, emacs, SimpleText,
Notepad, BBEdit, or anything else that allows you to type stuff and
save the result :)
--
brian d foy <comdog@computerdog.com>
NY.pm - New York Perl M((o|u)ngers|aniacs)* <URL:http://ny.pm.org/>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
------------------------------
Date: Mon, 27 Oct 1997 10:11:14 +0100
From: Doug Seay <seay@absyss.fr>
Subject: Perl Suffix (Was: Can perl be maken to Compiler instead of interpreter?)
Message-Id: <34545AB2.4FD8BF45@absyss.fr>
Chris Russo wrote:
>
> >> Also, I note that ask for something with a .pl suffix. .pl is, for the
> >> most part, ancient history. .pl was for perl library files which have
> >> been replaced by perl module (.pm) files. Are you using perl4 perhaps?
> >> Use "perl -v" to find out what version you use.
>
> Perl scripts normally in end ".pl". Modules (libraries) normally end in ".pm".
Do they? Mine surely don't, but then again I don't put .sh of Bourne
shell scripts, nor .csh nor .ksh nor whatever for files that are
directly executable. Suffixes tell you what you need to do to use a
file. No suffix implies that it is directly usable as-is (often called
"binary", but that isn't the best possible name). "perldoc" runs as-is,
so I don't see a need to call it "perldoc.pl".
Do most people put .pl at the end of perl filenames? Am I the odd man
out here? I'd understand that for folks trapped in a 8.3 filename
system or filetype baseed OS, but do people do that who use modern OSes?
- doug
------------------------------
Date: Mon, 27 Oct 1997 17:15:12 -0600
From: Andrew Johnson <ajohnson@gpu.srv.ualberta.ca>
Subject: Re: Perl Suffix (Was: Can perl be maken to Compiler instead of interpreter?)
Message-Id: <34552080.5AD0BB1@gpu.srv.ualberta.ca>
Doug Seay wrote:
>
[snip]
> so I don't see a need to call it "perldoc.pl".
>
> Do most people put .pl at the end of perl filenames? Am I the odd man
> out here? I'd understand that for folks trapped in a 8.3 filename
> system or filetype baseed OS, but do people do that who use modern OSes?
I generally use a .pl extension on my perl scripts so my editor
(which recognizes extensions) is in perl-mode when I open them.
regards
andrew
------------------------------
Date: Mon, 27 Oct 1997 18:40:05 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: Perl Suffix
Message-Id: <comdog-ya02408000R2710971840050001@news.panix.com>
In article <34545AB2.4FD8BF45@absyss.fr>, Doug Seay <seay@absyss.fr> wrote:
>Do most people put .pl at the end of perl filenames? Am I the odd man
>out here? I'd understand that for folks trapped in a 8.3 filename
>system or filetype baseed OS, but do people do that who use modern OSes?
i usually use some sort of suffix so i can tell what things are by
looking at the directory listing. it makes it much easier to get all
the Perl scripts in a directory with
ls -l *.pl
for instance. it's also a nice way to easily find all of the perl
scripts of your programming team.
but i also have a symbolic link with no suffix to each script
that is in production. :)
--
brian d foy <comdog@computerdog.com>
NY.pm - New York Perl M((o|u)ngers|aniacs)* <URL:http://ny.pm.org/>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
------------------------------
Date: Mon, 27 Oct 1997 13:13:28 -0800
From: Robert Hughes <robert.hughes@amarest.com>
Subject: pod2html Problems
Message-Id: <345503F8.6F578B1F@amarest.com>
This is a cryptographically signed message in MIME format.
--------------ms90474CF9B2D19903917251A3
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
I'm just starting to use the POD format for documenting but am having a
few annoying problems with the html converter. I was hoping someone
could shed some light.
The fist is that links such as 'L<FDM::Queue::Entry>' attempt to link to
'/FDM/Queue_Entry.html' instead of 'FDM/Queue/Entry.html' as would seem
more consistent.
Secondly I can not seem to get the links to items in other pages to work
as advertised in perlpod. If I understand it correctly I should be able
to do 'L<FDM::Queue::Entry/"new">' to link to the '=item new' section.
Thanks for any help,
Robert
--------------ms90474CF9B2D19903917251A3
Content-Type: application/x-pkcs7-signature; name="smime.p7s"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="smime.p7s"
Content-Description: S/MIME Cryptographic Signature
MIIKYgYJKoZIhvcNAQcCoIIKUzCCCk8CAQExCzAJBgUrDgMCGgUAMAsGCSqGSIb3DQEHAaCC
CNAwggQaMIIDg6ADAgECAhAmqCV4jaWSJo/xSZ7/73UkMA0GCSqGSIb3DQEBBAUAMGIxETAP
BgNVBAcTCEludGVybmV0MRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE0MDIGA1UECxMrVmVy
aVNpZ24gQ2xhc3MgMSBDQSAtIE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b3
DQMCAgEoMCMGCSqGSIb3DQEJBDEWBBSO0fhdh5dWhiuDm5zcv5c8kF56VzANBgkqhkiG9w0B
AQEFAARALE8qNBWH5ZceEZQxVfFzjPmc9vKuQAT7mtp4C3PLIF1cMcwyZ4FFnXMLx1JXmxW9
IcO5bJNOWVXjzMFdLypmkA==
--------------ms90474CF9B2D19903917251A3--
------------------------------
Date: 27 Oct 1997 14:59:34 -0600
From: Don Thomson <thomson@zinger.adp.wisc.edu>
Subject: Reference to class method (\&{$foo->you})
Message-Id: <tziuui9b2h.fsf@zinger.adp.wisc.edu>
Hmmmm..... I'm trying to create a reference to a class method, as in
'\&{$foo->you}' in the following code snippet. This works, but it also
calls the method while setting the code ref (which it doesn't do for &bar).
I've tried '$coderef = \&{Foo::you}' instead, and that may be the correct
way to go, but is there any syntax that will work with the $foo-> approach?
I'd like to understand a bit better why the behavior is different in each
case.
package Foo;
sub new
{
bless {};
}
sub you
{
my $self = shift;
print "I'm you!\n";
}
package main;
$foo = new Foo;
$coderef = \&bar;
$coderef = \&{$foo->you};
exit;
sub bar
{
print "I'm bar!\n";
}
--
----- Don Thomson ----- DoIT (Division of Information Technology) -------
thomson@doit.wisc.edu (608) 262-0007 1210 W. Dayton, Madison, WI 53706
------------------------------
Date: Mon, 27 Oct 1997 18:22:42 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: Reference to class method (\&{$foo->you})
Message-Id: <comdog-ya02408000R2710971822420001@news.panix.com>
In article <tziuui9b2h.fsf@zinger.adp.wisc.edu>, Don Thomson <thomson@zinger.adp.wisc.edu> wrote:
>Hmmmm..... I'm trying to create a reference to a class method, as in
>'\&{$foo->you}' in the following code snippet.
why would you want to do such a thing? just curious...
--
brian d foy <comdog@computerdog.com>
NY.pm - New York Perl M((o|u)ngers|aniacs)* <URL:http://ny.pm.org/>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
------------------------------
Date: 27 Oct 1997 23:33:32 GMT
From: toutatis@_SPAMTRAP_toutatis.net (Toutatis)
Subject: Re: Reference to class method (\&{$foo->you})
Message-Id: <toutatis-ya023180002810970033070001@news.euro.net>
Don Thomson <thomson@zinger.adp.wisc.edu> wrote:
> Hmmmm..... I'm trying to create a reference to a class method, as in
> '\&{$foo->you}' in the following code snippet. This works, but it also
> calls the method while setting the code ref (which it doesn't do for &bar).
That's because you're telling perl:
"return a reference to subroutine; I don't know which one, but $foo->you()
will tell you."
> sub you
> {
> my $self = shift;
>
> print "I'm you!\n";
> }
But foo doesn't tell anything else than '1', which is the return value of
the print in $foo->you, when succesfully executed. And you don't have a
subroutine &1, have you? Perl would have told you this if you'd have put -w
on in your script...
> I've tried '$coderef = \&{Foo::you}' instead, and that may be the correct
> way to go,
Even \&Foo::you would do, but it is certainly deprecated if you want to
write object orientated code. Post an outline of what you are trying to do,
and maybe someone will give you a basic outline how to implement this, in
'obect-style'.
--
Toutatis
------------------------------
Date: Mon, 27 Oct 1997 11:26:37 +0100
From: Doug Seay <seay@absyss.fr>
To: Scott Geller <gellergrant@mindspring.com>
Subject: Re: To get perl running on my system...
Message-Id: <34546C5D.73E42FAB@absyss.fr>
[posted and mailed]
Scott Geller wrote:
>
> ... I think I need to compile it with Visual C++ ... correct? Is there a
> pre-compiled version of perl available to download?
>
> If my only option is to compile it with V C++, anyone know where I can get a
> copy?
>
> Your help is appreciated... learning perl is turning out to be more
> difficult than I thought it would be.
Usually you need to download and compile to build a binary that is well
configured for the local environment. But since you mention Visual C++,
I'll assume that you are using MS-DOS or one of its offspring.
Pre-compiled, ready-to-install versions (yes, plural) do exist. Go look
around your local CPAN mirror for one. I do not know if there is a list
of strengths and weaknesses of the various ports.
- doug
------------------------------
Date: 27 Oct 97 16:53:34 -0500
From: "Gary Trachier" <trachier@crrel.usace.army.mil>
Subject: Re: Using .forward file to trigger Perl script
Message-Id: <B07A7797-CEA32@144.3.128.40>
Followup on my test program...
Well folks, it really does work correctly. I was running the test
program under the debugger, and looked at @tm after executing the time
with localtime()... The problem is that after executing that line,
the debugger is now outside the scope of my local variables therefore
they are unknown. I added a print statement after the last line. Low
and behold the year is 105 as expected. Question answered.
-Gary
------------------------------
Date: 27 Oct 97 16:32:28 -0500
From: "Gary Trachier" <trachier@crrel.usace.army.mil>
Subject: Re: Year2000 problem with localtime();
Message-Id: <B07A72A6-BC12A@144.3.128.40>
>Hi y'all,
> Of the values returned by localtime, the $year value is coming
out
>as '97'. Is there a plan to change this to `1997`? It's something
that
>could cause *major* problems, don't you think?
I have the same question, so decided to try an experiment. Here is my
test program:
#! /usr/crrel/bin/perl -w -d
use Time::Local;
MAIN: {
my $time;
my @tm;
$time =3D timelocal (0, 0, 12, 3, 5, 2005 - 1900);
# return from Time::Local::timelocal: 1117814400
@tm =3D localtime ($time);
}
timelocal returns 1117814400 seconds which by quick calculation seems
reasonable for 3 June 2005 at 1200. The array returned by localtime
is uninitialized. Hmmm. Any comments?
This is running on a UNIX machine.
-Gary
------------------------------
Date: 27 Oct 97 16:56:25 -0500
From: "Gary Trachier" <trachier@crrel.usace.army.mil>
Subject: Re: Year2000 problem with localtime();
Message-Id: <B07A7842-D1286@144.3.128.40>
Followup on my test program...
Well folks, it really does work correctly. I was running the test
program under the debugger, and looked at @tm after executing the time
with localtime()... The problem is that after executing that line,
the debugger is now outside the scope of my local variables therefore
they are unknown. I added a print statement after the last line. Low
and behold the year is 105 as expected. Question answered.
-Gary
------------------------------
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 1235
**************************************