[15489] in Perl-Users-Digest
Perl-Users Digest, Issue: 2899 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Apr 28 21:05:23 2000
Date: Fri, 28 Apr 2000 18:05:12 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <956970312-v9-i2899@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Fri, 28 Apr 2000 Volume: 9 Number: 2899
Today's topics:
A can't find the beauty REGEXP juhaszjani@my-deja.com
Re: A can't find the beauty REGEXP <dimitrio@perlnow.com>
Re: A can't find the beauty REGEXP <uri@sysarch.com>
Re: A can't find the beauty REGEXP <lr@hpl.hp.com>
Re: A can't find the beauty REGEXP <lr@hpl.hp.com>
Re: Co (Tad McClellan)
control-backslash in a literal string <jrw32982@my-deja.com>
Re: DLL attributes <john.alderson@fmr.com>
Re: Errors Installing CGI.pm <rootbeer@redcat.com>
Re: HOW CAN I TELL IF A FILE IS OPEN BEFORE I READ IT O (Craig Berry)
Re: how do you find perl? (Clinton A. Pierce)
Re: If slices are so great... <dimitrio@perlnow.com>
Re: If slices are so great... <aqumsieh@hyperchip.com>
Re: If slices are so great... <uri@sysarch.com>
Re: If slices are so great... <skuo@mtwhitney.nsc.com>
Re: If slices are so great... <sariq@texas.net>
mod-rewrite redirect using regexp <dimitrio@perlnow.com>
Re: Net:FTP module not working for me on perl win32... <marc.pauwels@skynet.be>
Perl modules for AFS <akil1@mindspring.com>
Re: PerlScript error with IIS or Win2000 <aahz@gol.com>
Re: purpose of use vars () ? msouth@fulcrum.org
Re: reading .ost files <rootbeer@redcat.com>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 28 Apr 2000 22:08:51 GMT
From: juhaszjani@my-deja.com
Subject: A can't find the beauty REGEXP
Message-Id: <8ed259$t7l$1@nnrp1.deja.com>
In my C files i had to change all the /WriteIt/ to /WriteThat/, but i
had to leave the /SolidWriteIt/.
I made it like :
s/([^S][^o][^l][^i][^d])WriteIt/$1WriteThat/g
I am sure, there is some much simpler regexp to fence out that 'Solid'.
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Fri, 28 Apr 2000 22:26:45 GMT
From: "Dimitri Ostapenko" <dimitrio@perlnow.com>
Subject: Re: A can't find the beauty REGEXP
Message-Id: <FeoO4.154317$1C2.3886668@news20.bellglobal.com>
<juhaszjani@my-deja.com> wrote in message
news:8ed259$t7l$1@nnrp1.deja.com...
> In my C files i had to change all the /WriteIt/ to /WriteThat/, but i
> had to leave the /SolidWriteIt/.
> I made it like :
> s/([^S][^o][^l][^i][^d])WriteIt/$1WriteThat/g
>
> I am sure, there is some much simpler regexp to fence out that 'Solid'.
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
why not just s/\bWritelt/$1WriteThat/g
------------------------------
Date: Fri, 28 Apr 2000 22:39:18 GMT
From: Uri Guttman <uri@sysarch.com>
Subject: Re: A can't find the beauty REGEXP
Message-Id: <x7d7n926lm.fsf@home.sysarch.com>
>>>>> "DO" == Dimitri Ostapenko <dimitrio@perlnow.com> writes:
DO> <juhaszjani@my-deja.com> wrote in message
>> In my C files i had to change all the /WriteIt/ to /WriteThat/, but i
>> had to leave the /SolidWriteIt/.
>> I made it like :
>> s/([^S][^o][^l][^i][^d])WriteIt/$1WriteThat/g
>>
DO> why not just s/\bWritelt/$1WriteThat/g
well, because that won't work? you grabbed nothing to put into $1 and you
spelled 'WriteIt' wrong. and he never said there was a word boundary
before the word. maybe he wants FOOWriteIt to become FOOWriteThat.
this is where lookbehind will work (i had posted earlier a case where it
was overkill)
s/(?<!Solid)WriteIt/WriteThat/g
uri
--
Uri Guttman --------- uri@sysarch.com ---------- http://www.sysarch.com
SYStems ARCHitecture, Software Engineering, Perl, Internet, UNIX Consulting
The Perl Books Page ----------- http://www.sysarch.com/cgi-bin/perl_books
The Best Search Engine on the Net ---------- http://www.northernlight.com
------------------------------
Date: Fri, 28 Apr 2000 15:36:02 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: A can't find the beauty REGEXP
Message-Id: <MPG.1373b22f9a626e7898a9b1@nntp.hpl.hp.com>
In article <8ed259$t7l$1@nnrp1.deja.com> on Fri, 28 Apr 2000 22:08:51
GMT, juhaszjani@my-deja.com <juhaszjani@my-deja.com> says...
> In my C files i had to change all the /WriteIt/ to /WriteThat/, but i
> had to leave the /SolidWriteIt/.
> I made it like :
> s/([^S][^o][^l][^i][^d])WriteIt/$1WriteThat/g
>
> I am sure, there is some much simpler regexp to fence out that 'Solid'.
Modern versions of Perl support fixed-length negative look-behind.
s/(?<!Solid)WriteIt/WriteThat/g;
or, to save a keystroke :-):
s/(?<!Solid)(Write)It/$1That/g;
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Fri, 28 Apr 2000 15:46:53 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: A can't find the beauty REGEXP
Message-Id: <MPG.1373b4b0b61ec67898a9b3@nntp.hpl.hp.com>
In article <FeoO4.154317$1C2.3886668@news20.bellglobal.com> on Fri, 28
Apr 2000 22:26:45 GMT, Dimitri Ostapenko <dimitrio@perlnow.com> says...
>
> <juhaszjani@my-deja.com> wrote in message
> news:8ed259$t7l$1@nnrp1.deja.com...
> > In my C files i had to change all the /WriteIt/ to /WriteThat/, but i
> > had to leave the /SolidWriteIt/.
> > I made it like :
> > s/([^S][^o][^l][^i][^d])WriteIt/$1WriteThat/g
> >
> > I am sure, there is some much simpler regexp to fence out that 'Solid'.
...
> why not just s/\bWritelt/$1WriteThat/g
Because $1 has some unpredictable value?
More to your point, he didn't say not to change 'fooWriteIt' to
'fooWriteThat'. The only specific exclusion was 'SolidWriteIt', as he
showed in his attempt. So a negative lookbehind is called for.
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Fri, 28 Apr 2000 17:43:30 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Co
Message-Id: <slrn8gk1g2.3gf.tadmc@magna.metronet.com>
Please put the subject of your article in the Subject header
provided for that purpose.
On Fri, 28 Apr 2000 14:10:19 -0400, Drew Simonis <care227@attglobal.net> wrote:
>OK, I have a quick question about getting the count of an array
>reference, as contrasted to a normal array.
>Im used to doing something like:
>for ($i = 0; $i <=$#array; $i++){
>
^^^^^^^
That is NOT "getting the count of an array".
That is "getting the last index of an array".
Those two quantities often differ by one.
>But I have a reference that im using, and not the actual
>array. My question. How would I get the last number, using
>the method above, of a reference? is it like this:
>
>for ($i = 0; $i <=$$#array; $i++){}
>
>or is there some other syntax?
>
>I checked the archives via Deja and re-read the perlref documents,
>but didn't find the information. Any help would be appreciated.
^^^^^^^^^^^^^^^^^^^^^^^^^^^
It appears that you just missed it then. It is in there:
----------------
Anywhere you'd put an identifier (or chain of identifiers) as part
of a variable or subroutine name, you can replace the identifier with
a simple scalar variable containing a reference of the correct type:
----------------
So for your "normal array" example,
>for ($i = 0; $i <=$#array; $i++){
^^^^^
^^^^^ There is the "identifier"
you replace the identifier with the scalar containing the reference:
for ($i = 0; $i <=$#$arrayref; $i++){
You were Oh So Close (but that only counts in hand grenades and dancing).
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Fri, 28 Apr 2000 13:46:45 GMT
From: John Wiersba <jrw32982@my-deja.com>
Subject: control-backslash in a literal string
Message-Id: <8ec4o0$qoo$1@nnrp1.deja.com>
How do I specify ^\ (control-backslash), using \c notation? When I try
just "\c\", I get a syntax error. When I specify "\c\\" I get two
characters (^\ and \).
print "weird\n" if "\c\\" eq "\x1C\x5C";
--
John Wiersba
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Fri, 28 Apr 2000 14:49:43 -0400
From: "John Alderson - LTS" <john.alderson@fmr.com>
Subject: Re: DLL attributes
Message-Id: <i3lO4.7$s65.23@news-srv1.fmr.com>
"David Stiff" <dstiff@delanotech.com> wrote in message
news:v2HN4.1159$pb6.1392@client...
> Is there a way in Perl I can get the Company Name of a DLL? (The
equivalent
> of checking the Properties of the DLL in Windows).
>
> Thanks.
>
See Win32::AdminMisc for the GetFileInfo function.
John Alderson
------------------------------
Date: Fri, 28 Apr 2000 16:18:43 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Errors Installing CGI.pm
Message-Id: <Pine.GSO.4.10.10004281615320.21722-100000@user2.teleport.com>
On Fri, 28 Apr 2000, Gabe wrote:
> Subject: Errors Installing CGI.pm
I'm not sure, but you may be installing a new CGI module in an old Perl,
and maybe they aren't compatible. But if you have a version of Perl no
older than 5.004, it should have come with the CGI module. And any new
version of the module should insist upon having some minimum version of
Perl to run, rather than give you troubles upon installation.
But, just to be sure, are you able to install other modules without
difficulties? What versions of perl and of CGI.pm are you working with?
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Fri, 28 Apr 2000 22:09:28 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: HOW CAN I TELL IF A FILE IS OPEN BEFORE I READ IT OR WRITE TO IT ?
Message-Id: <sgk30ota7qo113@corp.supernews.com>
Larry Rosler (lr@hpl.hp.com) wrote:
: On 'most' operating systems (i.e., on the operating systems that run 90%
: or more of the world's computers), the system imposes a mandatory lock
: on a file that is opened for writing, so no other process can read it
: until the writing process closes the file.
Okay, okay. Would you go for 'most OSs on which perl is commonly used'?
(Bracing myself to be told about the huge underground JCL-Perl crowd...)
--
| Craig Berry - cberry@cinenet.net
--*-- http://www.cinenet.net/users/cberry/home.html
| "The road of Excess leads to the Palace
of Wisdom" - William Blake
------------------------------
Date: Fri, 28 Apr 2000 22:37:06 GMT
From: clintp@geeksalad.org (Clinton A. Pierce)
Subject: Re: how do you find perl?
Message-Id: <mooO4.51501$h01.367578@news1.rdc1.mi.home.com>
[Posted and mailed]
In article <sgjr3iie7qo45@corp.supernews.com>,
"Brian Smith" <mrsparkle@gamerzuniverse.com> writes:
> Ok, I built a linut box running latest version of RedHat to run and test
> perl that I write. How do I find where perl is located? I think its
> /usr/bin/perl but I keep getting internal server errors when I try to run my
> scripts. And I know they work fine.
At a shell prompt ($ in this case):
$ which perl
/usr/bin/perl <-- Shell replies
And always test your CGI stuff out at the command prompt FIRST. At least
until you get the preliminary stuff working. Like the #! line. And
permissions. And Content-Type replies. And warnings. And ... a myriad
of other things you don't want to debug through the web server.
> Perl Coder / Webmaster
Wannabe on both counts, I'm afraid. Keep practicing!
--
Clinton A. Pierce Teach Yourself Perl in 24 Hours!
clintp@geeksalad.org for details see http://www.geeksalad.org
"If you rush a Miracle Man,
you get rotten Miracles." --Miracle Max, The Princess Bride
------------------------------
Date: Fri, 28 Apr 2000 22:07:18 GMT
From: "Dimitri Ostapenko" <dimitrio@perlnow.com>
Subject: Re: If slices are so great...
Message-Id: <qYnO4.154310$1C2.3886099@news20.bellglobal.com>
Ala Qumsieh <aqumsieh@hyperchip.com> wrote in message
news:7ad7n9sywy.fsf@Merlin.i-did-not-set--mail-host-address--so-shoot-me...
>
> Quantum Mechanic <quantum_mechanic@my-deja.com> writes:
>
> > I discovered this while trying to find an elegant solution using slices
> > equivalent to the following:
> >
> > (undef, undef, @keep) = split( /,/, $string );
> >
> > I wanted something like:
> >
> > @keep = split( /,/, $string )[2..-1]
> >
> > but this of course doesn't DWYW. Is there another way besides a
> > temporary variable?
>
> I don't see any temporary variables in your first snippet! And, you
> can't do it the second way without using temporary variables. Here are
> a couple of variations, none of which I would use :-)
>
> @keep = (split /,/ => $string)[2 .. $string =~ tr/,//];
>
> @keep = $string =~ s/^[^,]*,[^,]*,// && split /,/ => $string;
>
> In fact, I would stick to your first attempt, although it is not the
> "coolest".
>
> Benchmarks, anyone?
>
> --Ala
>
> PS. To LarryR: cool != fast :-)
it is cool but it doesn't work:
> @keep = (split /,/ => $string)[2 .. $string =~ tr/,//];
------------------------------
Date: Fri, 28 Apr 2000 22:14:41 GMT
From: Ala Qumsieh <aqumsieh@hyperchip.com>
Subject: Re: If slices are so great...
Message-Id: <7a8zxxswj2.fsf@Merlin.i-did-not-set--mail-host-address--so-shoot-me>
"Dimitri Ostapenko" <dimitrio@perlnow.com> writes:
> Ala Qumsieh <aqumsieh@hyperchip.com> wrote in message
> news:7ad7n9sywy.fsf@Merlin.i-did-not-set--mail-host-address--so-shoot-me...
>
> it is cool but it doesn't work:
>
> > @keep = (split /,/ => $string)[2 .. $string =~ tr/,//];
Hmmm ... did you try it?
% perl -wl
$string = 'a,long,string,with,some,commas';
@keep = (split /,/ => $string)[2 .. $string =~ tr/,//];
print "@keep";
__END__
string with some commas
Seems to be working to me.
--Ala
------------------------------
Date: Fri, 28 Apr 2000 22:18:31 GMT
From: Uri Guttman <uri@sysarch.com>
Subject: Re: If slices are so great...
Message-Id: <x7n1md27k9.fsf@home.sysarch.com>
>>>>> "QM" == Quantum Mechanic <quantum_mechanic@my-deja.com> writes:
QM> If slices are so great, why aren't there more references to them in
QM> the indices of the basic Perl books?
QM> (Teach Yourself) Perl in 21 Days ('97): 6 entries (and 11 pages!)
crappy book. stay away from it. the 24 hours book is good.
i wrote a hash slice tutorial that people seem to like. it is at:
http://www.sysarch.com/perl/tutorials/hash_slices.txt
QM> I discovered this while trying to find an elegant solution using slices
QM> equivalent to the following:
QM> (undef, undef, @keep) = split( /,/, $string );
QM> I wanted something like:
QM> @keep = split( /,/, $string )[2..-1]
use splice or shift on @keep
@keep = split( /,/, $string ) ;
shift @keep ; shift @keep ;
or
splice( @keep, 0, 2 ) ;
or this cool and ugly splice trick:
@keep = splice( @{[ split( /,/, $string )]}, 2 ) ;
uri
--
Uri Guttman --------- uri@sysarch.com ---------- http://www.sysarch.com
SYStems ARCHitecture, Software Engineering, Perl, Internet, UNIX Consulting
The Perl Books Page ----------- http://www.sysarch.com/cgi-bin/perl_books
The Best Search Engine on the Net ---------- http://www.northernlight.com
------------------------------
Date: Fri, 28 Apr 2000 15:23:05 -0700
From: Steven Kuo x7914 <skuo@mtwhitney.nsc.com>
To: Quantum Mechanic <quantum_mechanic@my-deja.com>
Subject: Re: If slices are so great...
Message-Id: <Pine.GSO.4.21.0004281519080.16404-100000@mtwhitney.nsc.com>
On Fri, 28 Apr 2000, Quantum Mechanic wrote:
...
>
> I wanted something like:
>
> @keep = split( /,/, $string )[2..-1]
>
> but this of course doesn't DWYW. Is there another way besides a
> temporary variable?
Does an anonymous array count as a temporary var?
splice?
Probably slow...
my $string = 'Zero,one,two,three,four';
my @keep = splice(@{[split (/,/,$string)]},2);
print "@keep", "\n";
--
Steven Kuo
------------------------------
Date: Fri, 28 Apr 2000 17:42:27 -0500
From: Tom Briles <sariq@texas.net>
Subject: Re: If slices are so great...
Message-Id: <390A13D3.EFE6810E@texas.net>
Quantum Mechanic wrote:
>
> If slices are so great, why aren't there more references to them in
> the indices of the basic Perl books?
I agree that slices are under-documented. That's why the first (and so
far, only) contribution I've made to Perlfaq Prime is:
http://www.perlfaq.com/faqs/id/157
"How do I access a range of elements in an array?"
(Any criticism is welcome.)
Uri Guttman has a nice little introduction to hash slices at:
http://www.sysarch.com/perl/tutorials/hash_slices.txt
- Tom
------------------------------
Date: Fri, 28 Apr 2000 23:40:43 GMT
From: "Dimitri Ostapenko" <dimitrio@perlnow.com>
Subject: mod-rewrite redirect using regexp
Message-Id: <%jpO4.88046$2D6.2249732@news20.bellglobal.com>
I'm sorry to post this here, but I already tried com.infosystems.www.servers
and couldn't get an answer.
I need to redirect to perl script based on substring in URL:
http://www.xyz.com/q.phtml?client=AAA
to
http://www.xyz.com/redir.pl?file=q.phtml&client=AAA
RewriteEngine On
RewriteBase /
RewriteRule ^([^?&]+)[?&]client=([^/?&]+)redir.pl?file=$1&client=$2 [NC]
Now '&' works just fine, but '?' does not, even prepended with '\' (which it
shouldn't be in char class anyway). I also can't match ? before client with
'.', \?, \S
Would really appreciate if somebody could point me in right direction (yes I
did send email to Ralf S. Engelschall, but I'm sure he's got a lot of email
to answer.)
thanks,
Dimitri
------------------------------
Date: Fri, 28 Apr 2000 22:30:14 GMT
From: <marc.pauwels@skynet.be>
Subject: Re: Net:FTP module not working for me on perl win32...
Message-Id: <sgk47mga7qo39@corp.supernews.com>
Hi,
Why aren't you using the Wininet.dll module, which is quite simple to use
in perl. Here's is an example :
Bye
# Use WININET predefinded modules as from PERL statements
ftp_wininet();
# Make the connection to the webserver
ftp_connect("$servermachine","$logonkey","$paswordcombi");
# Set the FTP transfert mode
ftp_transfertmode("Ascii");
# Set the website remote directorypath
ftp_changedirectory("$remotedirectorypath");
$remotepath = $FTP->Pwd();
###########################################################################
##################
# Function : use wininet.DLL predefined
modules #
###########################################################################
##################
sub ftp_wininet {
use Win32::Internet;
$INET = new Win32::Internet();
return;
}
###########################################################################
##################
# Function : Rename van een remote
file #
###########################################################################
##################
sub ftp_connect {
local($ftpserver) = shift;
local($loginkey) = shift;
local($passwordkey) = shift;
$INET->Pasv(0);
#$result = $INET->FTP$FTP,"192.168.20.13","xxxxxx\@yyyyyyy\@192.168.20.13",
# "???????\@???????") ;
$result = $INET->FTP($FTP, $ftpserver, $loginkey, $passwordkey) ;
log_msg("$result") ;
return;
}
###########################################################################
##################
# Function : Set transfert mode voor een
transfert #
###########################################################################
##################
sub ftp_transfertmode {
local($transfertmodus) = shift;
if ($transfertmodus eq 'Ascii')
{
$FTP->Ascii();
# Setten van de transfert modus in ascii
};
if ($transfertmodus eq 'Binary')
{
$FTP->Binary();
# Setten van de transfert modus in ascii
};
# Setten van de transfert modus in binary
print "Current mode is : ", $FTP->Mode() . "\n";
log_msg("$result");
return;
}
###########################################################################
##################
# Function : Change directory on remote
server #
###########################################################################
##################
sub ftp_changedirectory {
local($changeworkingdir) = shift;
$FTP->Cd($changeworkingdir);
print "Getresponse changedir is : \n", $FTP->GetResponse();
$remotepath = $FTP->Pwd();
log_msg("$remotepath") ;
print "Getresponse remotepath is : \n", $FTP->GetResponse();
log_msg("$remotepath") ;
return;
}
###########################################################################
##################
# Function : get file from remote server to
local #
###########################################################################
##################
#
#
# syntax1 : Rename
file #
# syntax2 : Ren
file #
#
#
###########################################################################
##################
sub ftp_getfiles {
local($sourcefile) = shift;
local($destinationfile) = shift;
$FTP->Get($sourcefile, $destinationfile, "0");
print "Getresponse getfile is : \n", $FTP->GetResponse();
return;
}
Dimitri Gunsing wrote:
>
>
> Have you tried installing the libnet module from www.activestate.com (the
> one for WIN32)?
>
> Kourosh A Mojar <kmojar@bmjgroup.com> wrote in message
> news:3906F24F.A6727BB7@bmjgroup.com...
> > Dear all,
> >
> > I am an fairly experienced novice user of perl. I am using perl win32
> > (ActivePerl 633) on win nt4 srvpck 5. Previously I used ftp oriented
> > scripts to automate some file transfers (while I was using cross
> > platform perl). Now I have upgraded/changed to perl win32 this no
longer
> > works. I have installed (I hope I set everything correctly) and updated
> > the the latest libnet module (using ppm.bat) which includes the ftp
> > Net::FTP module. Since I changed I cant use the FTP modules. I get this
> > syntax error:
> >
> > syntax error at C:/Perl/site/lib/Net/Config.pm line 86, near ">"
> > Compilation failed in require at C:/Perl/site/lib/Net/FTP.pm line 21.
> > BEGIN failed--compilation aborted at C:/Perl/site/lib/Net/FTP.pm line
> > 21.
> > Compilation failed in require at D:\ce\is3_prnt\support\copy_ftptest.pl
> > line 3.
> > BEGIN failed--compilation aborted at
> > D:\ce\is3_prnt\support\copy_ftptest.pl line 3.
> >
> > I have looked at the modules but I don't think I can decide or
> > understand where I am going wrong.
> >
> > Can any one help me? Thanking you in advance and for your kind
> > attention,
> >
> > Kourosh A Mojar
> > kmojar@bmjgroup.com
--
Posted via CNET Help.com
http://www.help.com/
------------------------------
Date: Fri, 28 Apr 2000 20:43:33 -0400
From: "Kevin Bass" <akil1@mindspring.com>
Subject: Perl modules for AFS
Message-Id: <8edbef$r6i$1@slb6.atl.mindspring.net>
Does anyone know of the existence of Perl modules that consist of AFS
commands?
Kevin
------------------------------
Date: Fri, 28 Apr 2000 22:44:51 GMT
From: "Chris Williams" <aahz@gol.com>
Subject: Re: PerlScript error with IIS or Win2000
Message-Id: <DvoO4.1161$uL2.91572@nnrp.gol.com>
It worked, thank you.
"Ron Grabowski" <ronnie@catlover.com> wrote in message
news:39098F18.3A398D46@catlover.com...
> ActivePerl build 613 doesn't work under Windows2000.
>
> http://www.activestate.com/ActivePerl/docs/RELEASE.html#known issues
>
> ---
> PerlScript currently does not function correctly when being run in an
> ASP environment under IIS 5. This appears to be an issue in the
> `MSVCRT.DLL' that ships with Windows 2000. We are working to resolve the
> problem for a future release.
> ---
>
> I would suggest using build 522.
>
> - Ron
------------------------------
Date: 29 Apr 2000 00:21:11 GMT
From: msouth@fulcrum.org
Subject: Re: purpose of use vars () ?
Message-Id: <8ed9tn$5h9$1@inxs.ncren.net>
jlamport@calarts.edu wrote:
> In article <39036B34.AF3B56C4@geocities.com>,
> steve <schan_ca@geocities.com> wrote:
>> I think I have it now, but it introduce another question.
>> Since you "use vars qw($yo) " to be visible outside
>> " package aaa ", does that " $yo " variable pollute the
>> calling script's namespace?
>>
>> Thanks
>> Steve
> Basically, the practical difference between 'use vars' and 'my' is that
> 'use vars' pre-declares PACKAGE-scoped variables, whereas 'my' pre-
> declares FILE-scoped variables.
> say you have a file 'aaa.pm':
> package aaa;
> use strict;
> use vars '$package_var';
> my $file_var;
> If your main script loads aaa.pm (using either use or require), then your
> main script will be able to access $package_var as $aaa::package_var (but
> not as just $package_var, unless the main script explicitly imports it
> into its namespace or the package aaa explicitly exports it into package
> main's namespace, see the perlmod docs for details on how to do those
> things), but the main script will *not* be able to access $file_var *at
> all* -- $file_var is strictly local to the file aaa.pm.
Also note that not every my() variable is visible to the _entire_
file. If it's in a block, it's only visible in that block. (This
is not a correction to what has been said--just a further explanation
of my().)
#!/usr/bin/perl -w
use strict;
my $foo; #visible everywhere in the file
# a block with no name (suitable for desert coding)
{
my $bar; #only in this block
&baz;
}
sub baz {
# baz() can see $foo, but the $bar
# up there doesn't exist here
}
[snip]
--
Michael South | http://fulcrum.org
Head Mathophile, | 101 Canyon Run
fulcrum.org | Cary NC 27513 USA
(msouth@fulcrum.org) | (919) 465-9074
------------------------------
Date: Fri, 28 Apr 2000 16:37:33 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: reading .ost files
Message-Id: <Pine.GSO.4.10.10004281623160.21722-100000@user2.teleport.com>
On Fri, 28 Apr 2000 amarodeeps@my-deja.com wrote:
> Tom,
> You make assumptions without being too helpful.
>
> Like this:
>
> > Maybe this is the time to go Open Source. :-)
Now, I don't want this to sound condescending, but I honestly don't know
any other way to say this. (Anyone who can express the thought of the
following sentence without a reasonable chance of seeming to be
condescending should please inform me at once.) The three odd punctuation
marks at the end of that line are a "smiley", intending to show that the
nearby comments are being delivered in a way which, if you could see my
face, would be accompanied by a smile: in short, it's a joke!
> Also there was this, which had an implicit assumption:
>
> > Well, you can search CPAN.
I said that in response to your comment, "I am at a loss as to what
category this type of module would fall under."
> I have searched CPAN.
I hope you can see now that I was merely pointing out that failing to
know the category doesn't keep you from searching CPAN.
> I guess I should have said so in the first place: '.ost' brings up
> nothing. 'outlook' brings up nothing. 'proprietary format' brings up
> nothing. 'windows file format' brings up nothing. 'file format'
> brings up nothing!! 'specification' brings up nothing!!!
Perhaps there is nothing to be found, or perhaps you weren't looking
properly. I suspect the former.
> Any suggestions? Look through every category step by step? I don't
> have the time. I DON'T WANT TO. That is why I posted to a newsgroup.
> I thought, maybe someone has had experience with this would be
> gracious enough to share their knowledge.
And someone was, sure enough. If anyone had created a module called
Read::Microsoft::Outlook::Proprietary_Format::Files and put it on CPAN, I
think you would have found it by now.
> If you have no idea, then just say so. Or rather, don't
> post. Let someone who does have an idea post.
You sound frustrated. But there are also those who post here, wait a few
hours, then post again and complain that no one has answered. I'd rather
give you some answer than have you feel the need to post twice. In your
case, perhaps I made the wrong choice.
> Don't mean to be so pissy, but I hate it when someone talks to me as
> if I were an idiot,
I apologize if it has seemed that I was treating you that way. It was
never my intention. Could I have phrased something differently to avoid
that misconception?
> especially when they haven't helped me a lick.
Well, it's not through a lack of trying.
Good luck with your project!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 16 Sep 99)
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.
| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.
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.
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 V9 Issue 2899
**************************************