[24338] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 6527 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu May 6 00:05:50 2004

Date: Wed, 5 May 2004 21:05:09 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Wed, 5 May 2004     Volume: 10 Number: 6527

Today's topics:
    Re: Authen::NTLM and MS04-011 (Steve)
    Re: Books online???? <***************>
    Re: Books online???? <cwilbur@mithril.chromatico.net>
    Re: counting question. <null@example.net>
    Re: free source authentication script <webmaster @ infusedlight . net>
    Re: free source authentication script <matthew.garrish@sympatico.ca>
    Re: Help Needed Building Array Of Hashes From CSV <ebohlman@earthlink.net>
    Re: newbie regexp question <jtc@shell.dimensional.com>
    Re: read from comma delimited file <spamtrap@dot-app.org>
    Re: read from comma delimited file <spamtrap@dot-app.org>
    Re: read from comma delimited file <jtc@shell.dimensional.com>
    Re: read from comma delimited file <noreply@gunnar.cc>
    Re: read from comma delimited file <dwall@fastmail.fm>
        reading an active directory server? <mikee@mikee.ath.cx>
    Re: reading an active directory server? (Walter Roberson)
        Sort Hash o Hash accordint to two keys (Malik Yousef)
        Sort Hash o Hash accordint to two keys (Malik Yousef)
        Sort Hash o Hash accordint to two keys (Malik Yousef)
    Re: Sort Hash o Hash accordint to two keys <ebohlman@earthlink.net>
    Re: Sort Hash o Hash accordint to two keys <uri@stemsystems.com>
        Text repetition operator <zturner_NOSPAM_0826@hotmail.com>
    Re: Text repetition operator <tony_curtis32@_SPAMTRAP_yahoo.com>
    Re: win32::ole and excel VBA macro conversion: SmallScr <invalid-email@rochester.rr.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: 5 May 2004 18:52:56 -0700
From: teachw2k@yahoo.com (Steve)
Subject: Re: Authen::NTLM and MS04-011
Message-Id: <3eb4816e.0405051752.53313586@posting.google.com>

Hi Kevin,

I am one of those from Microsoft who was involved with Leroy\Kevin on
this. I am very interested in anyone else who had the same issues with
using LWP::Authen::Ntlm after application of MS04-011.

I have tried to reproduce this and am not able to in-house. This is
necessary to debug NTLM and determine what exactly went wrong here. If
anyone would like to provide exact repro steps or better yet a VM in
VMware or MS Virtual PC format, I would love to work with  you.

Obviously, the change in the module from Andrew was instrumental in
gettting up and running, thank you very much Andrew. I do not know
enough about Perl to determine exactly what was changed - (if someone
wanted to "dumb it down" to me - let me know and I can provide contact
information) this may help me determine where I need to begin looking.

As far as the post below- I am not as concerned about it as this also
failed Pre MS04-011.

> Your fix also addresses another issue: the 1.02 code would fail if you
> attempted to login across domains via a trust (e.g. the user was in
> domain A and the server was in domain B). The debug output of LWP and
> the security log look similar to the MS04-011 problem.


thanks!

Steve


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

Date: Wed, 05 May 2004 20:25:19 -0500
From: Henry Williams <***************>
Subject: Re: Books online????
Message-Id: <ju4j90d3cmrm76mp2m64600uto34hec8c6@4ax.com>

On 6 May 2004 00:48:58 GMT, "A. Sinan Unur" <1usa@llenroc.ude> wrote:

>>> They are out there and you should report them to O'Reilly.

To which, you responded:

>>I was hoping you were going to! I already have a fulltime job.

I was responding to what I thought was sarcasm. I was mistaken and
have since learned the *right* way to report copyright issues to the
publisher… I was unaware of that option.

"The simple implication being that the rest of us here are losers with
no 
jobs. That is pretty belittling IMNSHO. So, as I have a pretty good
idea 
what you should do with your oversized ego."

If that was correct you'd be right.

"The self-importance you feel, while impressive, is not necessary."

I see a lot of ego driven stuff here.

"What kind of narcissism does one need to possess to think that if you
reported a copyright infringement to O'Reilly, they would go after
you?"

I'm new to reporting copyright issues. I'm sorry. I just didn't want
the "attention" --  I have however now reported the matter to
O'Reilly.

"If you saw an accident on the highway, would you choose not to call
911 
lest they think you had caused it?"

I routinely report accidents I see to 911.

Henry








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

Date: Thu, 06 May 2004 03:29:25 GMT
From: Charlton Wilbur <cwilbur@mithril.chromatico.net>
Subject: Re: Books online????
Message-Id: <87k6zqgrss.fsf@mithril.chromatico.net>

>>>>> "HW" == Henry Williams <***************> writes:

    HW> If the "experts" want a forum, what's wrong
    HW> with a moderated NG?  That way, everything but the pristine
    HW> can be filtered out and not waste the time or bandwidth of the
    HW> experts. I mean, honestly.

The experts already have fora which are largely limited to experts.
The goal is not to create an experts-only atmosphere, but to keep the
level of accuracy high and the facts correct, and thus to help other
people become experts.

Suppose the experts relax, and don't put heat on people who
consistently answer things incorrectly, and an anything-goes
atmosphere (the sort you appear to be advocating) becomes the norm.
Does it increase or decrease the value of this forum for novices if
the answers they get are more likely to be incorrect than correct?
Consider especially that the newbies have *no way of distinguishing* a
correct answer from an incorrect answer.

What you want, in essence, is a newsgroup of little use to anybody
because there's no technical rigor and the experts have abandoned it
in disgust, frustration, and boredom.  Fortunately, you are in the
minority. 

    HW> Should it be about learning or a social protocol? I myself
    HW> have little use for the latter.

And apparently quite little use for the former as well.

The social protocol is here in support of learning.

Charlton





-- 
cwilbur at chromatico dot net
cwilbur at mac dot com


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

Date: Thu, 06 May 2004 02:16:43 GMT
From: "Rich Grise" <null@example.net>
Subject: Re: counting question.
Message-Id: <fehmc.89614$G_.39348@nwrddc02.gnilink.net>

"Truthless" <nospam@spamcop.org> wrote in message
news:YakLb.17$PK6.370@nnrp1.uunet.ca...
>
> I am (excitedly)trying to learn perl. The "(in the name of science)" was
> supposed to let everyone know that while I could use a perl/cgi wrapper
> and accomplish the task it would not help me learn how to sift through
> logs in perl, which is my main goal. The bash script does the job and is
> only about 6 lines of code. The perl version (incomplete) is up to
> around 40.
> Maybe I am going about it the wrong way. I did assume that it would take
> some work to rewrite a bash script that uses grep, awk, sort, uniq and
> cut in a perl script. I thought that maybe there was some built in
> functions or basic methods that I have over looked. It just seems that
> the script is getting clunky and complicated really quickly.
>
> Thanks,

Can't you just put the shell script in your cgi-bin and call it?

Cheers!
Rich




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

Date: Wed, 5 May 2004 13:34:09 -0800
From: "Robin" <webmaster @ infusedlight . net>
Subject: Re: free source authentication script
Message-Id: <c7c4k7$jbt$1@reader2.nmix.net>


"Paul Lalli" <ittyspam@yahoo.com> wrote in message
news:20040505143905.J25082@dishwasher.cs.rpi.edu...
> On Wed, 5 May 2004, Robin wrote:
> >
> > "Tassilo v. Parseval" <tassilo.parseval@rwth-aachen.de> wrote in message
> > news:c7a2jr$1bs0g$1@ID-231055.news.uni-berlin.de...
> > >
> > > Now I see that auth.pl does two other things: It creates a file
> > > "Loggedinfile.log" and sets a cookie. Would admin.pl use these two
> > > things to determine whether a user is logged in? I hope not.
> > > "Loggedinfile.log" only exists once which means that anybody could log
> > > in as long as at least one person is already authenticated. Doing
> > > authentication based on a cookie is a very bad idea as well, as
cookies
> > > reside on the client machine and anybody could create such a thing
> > > manually.
> >
> >
> > Your right, I didn't think of that at all, but still, who's gonna go
into
> > the temp internet folder and create a cookie? At least not most users.
>
> Of course *most* users aren't going to do that.  *Most* users aren't
> trying to hack your site!  You don't program securely for *most* users -
> you program securely for the few users who *are* trying to be malevolent.
> The fact that you keep taking these completely unnecessary risks with the
> security of anyone foolish enough to use your scripts continues to prove
> that you are NOT ready to be releasing code to the public.  It's
> irresponsible and rude, frankly.

maybe...www.infusedlight.net clearly states that my scripts might be
insecure.
-Robin




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

Date: Wed, 5 May 2004 21:50:55 -0400
From: "Matt Garrish" <matthew.garrish@sympatico.ca>
Subject: Re: free source authentication script
Message-Id: <%Rgmc.28167$3Q4.834111@news20.bellglobal.com>


"Jim Cochrane" <jtc@shell.dimensional.com> wrote in message
news:slrnc9ii0l.aii.jtc@shell.dimensional.com...
> In article <20040505144153.B25082@dishwasher.cs.rpi.edu>, Paul Lalli
wrote:
> >
> >
> > Do you honestly believe that's the only reason open() might fail?  If
> > so... damn, I don't even know what to say to that.   And even if it
*was*
>
> Perhaps he's operating on a different plane of reality, using a system
that
> never has file storage failures, files are always readable and writable by
> everyone, files are never locked, etc.
>
>

Want to get where you're going without the hassle and cost of a professional
pilot, or even someone who's read the manual? Then fly Air Robin! If we
can't get off the ground, we'll drive you there in our plane.

(I just had a thought of him reading that post and wondering which plane he
was supposed to have taken... ; )

Matt




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

Date: 6 May 2004 03:06:22 GMT
From: Eric Bohlman <ebohlman@earthlink.net>
Subject: Re: Help Needed Building Array Of Hashes From CSV
Message-Id: <Xns94E0E1803F5D8ebohlmanomsdevcom@130.133.1.4>

Tim Sheets <tsheetspublic@insightbb.com> wrote in
news:4e5mc.27146$IG1.1153180@attbi_s04: 

> You may have a point there regarding my ability to "properly" ask a 
> question, but reading the above text, I am completely confused.  Maybe
> I am just dense, but about all I can understand is you aren't happy
> with the presentation of my question/problem.
> 
> I thought I did a pretty good job explaining what I was trying to do, 
> and what was working, and what wasn't working (the latter two being 
> after the code I posted).  Maybe I was too verbose, I dunno.

Jim was describing what's commonly known in technical groups as an "XY 
problem."  Someone has a task (goal, end) that they want to accomplish.  
That's the "X."  They've also decided that they're going to accomplish the 
task in a particular fashion (implementation, means).  That's the "Y."  The 
problem occurs when that person comes to the group and describes Y without 
describing X.  It's a problem because in many cases there's a much better 
(often much simpler) way to accomplish X than Y.  And it's also a problem 
because without knowledge of X, people have a hard time following your Y.  
You won't notice this yourself, because you can take X for granted, but 
what seems obvious to you won't be at all obvious to your readers because 
they have no context.

So what really happened here was that you did a pretty good job of 
explaining the details of how you were going about trying to solve an 
unspecified problem.  That's simply not enough for most people to work 
with.  What Jim wants you to do (and I agree that it's a very important 
skill, albeit one that doesn't come easily; you really do have to work hard 
at developing it) is learn to describe your goal (i.e. the true problem 
you're trying to solve) in its own terms, rather than in terms of the way 
you've tried to solve it.  In other words, say *what* you're trying to do 
as well as *how* you're trying to do it.

This isn't only important when you're asking other people for help; it's 
also important when you're working by yourself.  If you start to dive into 
the implementation details before you've got a clear picture of the problem 
to solve (and believe me, it's *very* tempting to do so), you'll very 
easily find yourself on the wrong track, with the likely result that you'll 
spend a long time writing and debugging code that you'll eventually have to 
scrap and redo.  And even worse, at one point in the process you may wind 
up with a program that *seems* to work, to the point where you start 
relying on it, but winds up failing (often silently) for a few important 
special cases.


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

Date: 5 May 2004 19:22:12 -0600
From: Jim Cochrane <jtc@shell.dimensional.com>
Subject: Re: newbie regexp question
Message-Id: <slrnc9j4q4.8ug.jtc@shell.dimensional.com>

In article <Hafmc.67091$NR5.54148@fe1.texas.rr.com>, Zachary Turner wrote:
> Why doesn't this work like I expect it to?
> 
> if ($string =~ /$pattern/) {
>     ...
> }
> 
> Basically I built the pattern on the fly, so I can't hardcode it.  My guess
> is that it's not interpolating the variable.  So how do I get it to do this?
> 
> Thanks

Warning: system error: Not enough data (The ESP facility has not yet been
implemented - ETA is approx. July 2091).

-- 
Jim Cochrane; jtc@dimensional.com
[When responding by email, include the term non-spam in the subject line to
get through my spam filter.]


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

Date: Wed, 05 May 2004 21:11:07 -0400
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: Re: read from comma delimited file
Message-Id: <q5Kdnf-PmIs2DQTdRVn-gQ@adelphia.com>

David K. Wall wrote:

> I think whoever wrote the FAQ entry has been using the Concurrent Versions
> System too much. Text::CVS? Text::CVS_XS?  :-)
> 
> I'm still using 5.8.0 here at home, so possibly the FAQ has been corrected
> by now.

Just looked at 5.8.4 - nope, it's not been corrected.

sherm--

-- 
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org


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

Date: Wed, 05 May 2004 21:14:16 -0400
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: Re: read from comma delimited file
Message-Id: <q5Kdnf6PmIv1DATdRVn-gQ@adelphia.com>

Danny wrote:

> How can I read from a comma delimited text file and export to a tab
> delimited file using perl.

That's most commonly called CSV, for "Comma Separated Values." Search for it
on CPAN - there are several modules for dealing with it.

There's also the secondary question of *why* you need to convert it to a tab
delimited file. Most apps that can import a tab delimited file - Excel,
various databases, etc. - can just as easily import a CSV file.

sherm--

-- 
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org


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

Date: 5 May 2004 19:26:19 -0600
From: Jim Cochrane <jtc@shell.dimensional.com>
Subject: Re: read from comma delimited file
Message-Id: <slrnc9j51r.8ug.jtc@shell.dimensional.com>

In article <AKfmc.146319$Gd3.35709538@news4.srv.hcvlny.cv.net>, Danny wrote:
> 
> "Danny" <dannywork5@hotmail.com> wrote in message
> news:Fudmc.146062$Gd3.35177306@news4.srv.hcvlny.cv.net...
>> How can I read from a comma delimited text file and export to a tab
>> delimited file using perl.
>> the file has quotes around the fields when another comma is in the string,
>> but nothing if it is a regular string.
>> Like:
>> "this field has a comma, in it", but tihs field does not, good bye
>>
>> I have searched for this but most do not account for the "quotes" around
> the
>> fields
>>
>> THanks in advance
>>
>>
> 
> I tried using the split() function but that really does not work
> imagine cases like this:
> "the quotes need to be here because of a , in the field"
> so the split will not work for these fields
> 
> You can't remove the quotes before the split either
> 
> does anybody have a sample I can try?

I bet it's possible to come up with an RE for the split that would work,
but it will not be an easy task.

-- 
Jim Cochrane; jtc@dimensional.com
[When responding by email, include the term non-spam in the subject line to
get through my spam filter.]


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

Date: Thu, 06 May 2004 03:39:57 +0200
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: read from comma delimited file
Message-Id: <c7c5a2$2565c$1@ID-184292.news.uni-berlin.de>

Jim Cochrane wrote:
> I bet it's possible to come up with an RE for the split that would
> work, but it will not be an easy task.

It depends. Under certain circumstances you can do such things pretty
easily with a regex. This is an example of a similar (not identical)
problem:

http://groups.google.com/groups?selm=c4eojm%242idocb%241%40ID-184292.news.uni-berlin.de

-- 
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl



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

Date: Thu, 06 May 2004 02:17:55 -0000
From: "David K. Wall" <dwall@fastmail.fm>
Subject: Re: read from comma delimited file
Message-Id: <Xns94E0E2D66FA7Cdkwwashere@216.168.3.30>


[re 'perldoc -q delimited']

Sherm Pendley <spamtrap@dot-app.org> wrote:

> David K. Wall wrote:
> 
>> I think whoever wrote the FAQ entry has been using the Concurrent Versions
>> System too much. Text::CVS? Text::CVS_XS?  :-)
>> 
>> I'm still using 5.8.0 here at home, so possibly the FAQ has been corrected
>> by now.
> 
> Just looked at 5.8.4 - nope, it's not been corrected.

I sent in a bug report, and mentioned this thread.



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

Date: Thu, 06 May 2004 02:22:43 -0000
From: Mike <mikee@mikee.ath.cx>
Subject: reading an active directory server?
Message-Id: <109j8bj4mcelned@corp.supernews.com>

The company uses ADS to manage all user accounts and passwords. I want
to read the user ids and passwords from the ADS server from one of
my unix servers to then create an distribute password files as the
user passwords change.

Anyone have any ideas or ready-made solutions for this?

Mike


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

Date: 6 May 2004 03:34:05 GMT
From: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)
Subject: Re: reading an active directory server?
Message-Id: <c7cbnd$1ec$1@canopus.cc.umanitoba.ca>

In article <109j8bj4mcelned@corp.supernews.com>,
Mike  <mikee@mikee.ath.cx> wrote:
:The company uses ADS to manage all user accounts and passwords. I want
:to read the user ids and passwords from the ADS server from one of
:my unix servers to then create an distribute password files as the
:user passwords change.

:Anyone have any ideas or ready-made solutions for this?

Can you actually read the unencrypted passwords from the ADS server??
My guess is that you can only get at the encrypted passwords. Then
you run into the question of whether your unix systems use the -same-
password encryption mechanism; if they don't, then can your unix
servers be reconfigured to use the same password encryption mechanism?

For example, on some systems (SunOS perhaps?) you can use PAM
(which stands for something like 'pluggable authentication modules').
On SGI IRIX, you can configure the SITECHECK parameter in
/etc/default/login to name a program that will perform the
authentication [but you run into problems with rlogind which has
built-in limits on the length of the password string it will transport.]


I'd be someone surprised if AD allowed you access to the raw passwords.
It's LAPD based, isn't it? It's more likely to allow you to make a call
to authenticate a user/password pair, with the security provided
by the ability to encrypt the lapd transaction (via ssl I seem to
recall.)
-- 
Before responding, take into account the possibility that the Universe
was created just an instant ago, and that you have not actually read
anything, but were instead created intact with a memory of having read it.


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

Date: 5 May 2004 18:42:08 -0700
From: yousef@pcbi.upenn.edu (Malik Yousef)
Subject: Sort Hash o Hash accordint to two keys
Message-Id: <a70ad489.0405051742.309c9cb6@posting.google.com>

Hi
I have the fellwoing hash structure:
%allresults{hdrnam}{WinPosition}
                   

First i would like to sort the hash according to the key "hdrname" and
then to sort according to the WinPosition which is with numeric value.


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

Date: 5 May 2004 18:42:13 -0700
From: yousef@pcbi.upenn.edu (Malik Yousef)
Subject: Sort Hash o Hash accordint to two keys
Message-Id: <a70ad489.0405051742.8b4fc8c@posting.google.com>

Hi
I have the fellwoing hash structure:
%allresults{hdrnam}{WinPosition}
                   

First i would like to sort the hash according to the key "hdrname" and
then to sort according to the WinPosition which is with numeric value.


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

Date: 5 May 2004 18:42:21 -0700
From: yousef@pcbi.upenn.edu (Malik Yousef)
Subject: Sort Hash o Hash accordint to two keys
Message-Id: <a70ad489.0405051742.4b99f15f@posting.google.com>

Hi
I have the fellwoing hash structure:
%allresults{hdrnam}{WinPosition}
                   

First i would like to sort the hash according to the key "hdrname" and
then to sort according to the WinPosition which is with numeric value.


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

Date: 6 May 2004 03:32:36 GMT
From: Eric Bohlman <ebohlman@earthlink.net>
Subject: Re: Sort Hash o Hash accordint to two keys
Message-Id: <Xns94E0E5F2FB24ebohlmanomsdevcom@130.133.1.4>

yousef@pcbi.upenn.edu (Malik Yousef) wrote in 
news:a70ad489.0405051742.309c9cb6@posting.google.com:

> Hi
> I have the fellwoing hash structure:
> %allresults{hdrnam}{WinPosition}
>                    
> 
> First i would like to sort the hash according to the key "hdrname" and
> then to sort according to the WinPosition which is with numeric value.

"perldoc -q sort" will bring up a very helpful tutorial entitled "How do I 
sort an array by (anything)?"  Now of course you say you want to sort a 
*hash* rather than an array, but that's not really possible.  You probably 
want to build an array of indices into the hash and then sort that array; 
the code in the FAQ will help you with that.
 


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

Date: Thu, 06 May 2004 04:04:14 GMT
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: Sort Hash o Hash accordint to two keys
Message-Id: <x74qqu42x1.fsf@mail.sysarch.com>

>>>>> "EB" == Eric Bohlman <ebohlman@earthlink.net> writes:

  EB> yousef@pcbi.upenn.edu (Malik Yousef) wrote in 
  EB> news:a70ad489.0405051742.309c9cb6@posting.google.com:

  >> Hi
  >> I have the fellwoing hash structure:
  >> %allresults{hdrnam}{WinPosition}
  >> 
  >> 
  >> First i would like to sort the hash according to the key "hdrname" and
  >> then to sort according to the WinPosition which is with numeric value.

  EB> "perldoc -q sort" will bring up a very helpful tutorial entitled
  EB> "How do I sort an array by (anything)?"  Now of course you say you
  EB> want to sort a *hash* rather than an array, but that's not really
  EB> possible.  You probably want to build an array of indices into the
  EB> hash and then sort that array; the code in the FAQ will help you
  EB> with that.
 
huh?? there is even an faq on how to sort a hash (by key or value).

uri

-- 
Uri Guttman  ------  uri@stemsystems.com  -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs  ----------------------------  http://jobs.perl.org


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

Date: Thu, 06 May 2004 01:41:04 GMT
From: "Zachary Turner" <zturner_NOSPAM_0826@hotmail.com>
Subject: Text repetition operator
Message-Id: <QIgmc.67248$NR5.57031@fe1.texas.rr.com>

I was trying to draw a triangle using *'s, and while I did get a solution,
it wasn't as elegant as I had hoped due to the length of my for loop which
kept track of what line I was on, how many blank spaces to print, etc.  I
thought it would be really cool if there was some way to maintain/modify
state in between repetitions of the x operator.  For example.  Suppose I
write the line of code:

"a" x 5;

It prints aaaaa to the screen.  But what if I enter the line of code:

"$a" x 5;

It prints the value of the variable $a 5 times in a row.  To see what I'm
trying to do, imagine that each time Perl prints the value of $a to the
screen, you have a hook or something in there that changes the value.  So
maybe that line of code prints:

abcde

to the screen.  Is there any way to achieve this using the x operator?

Thanks




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

Date: Wed, 05 May 2004 20:49:26 -0500
From: Tony Curtis <tony_curtis32@_SPAMTRAP_yahoo.com>
Subject: Re: Text repetition operator
Message-Id: <874qqu5nq1.fsf@limey.hpcc.uh.edu>

>> On Thu, 06 May 2004 01:41:04 GMT,
>> "Zachary Turner" <zturner_NOSPAM_0826@hotmail.com> said:

> For example.  Suppose I write the line of code:
> "a" x 5;

> It prints aaaaa to the screen.  But what if I enter the line
> of code:
> "$a" x 5;

> It prints the value of the variable $a 5 times in a row.  To
> see what I'm trying to do, imagine that each time Perl
> prints the value of $a to the screen, you have a hook or
> something in there that changes the value.

"x" evaluates its LH operand only once initially (if I read
perlop right).

> So maybe that line of code prints:
> abcde

You could use a for loop to get re-evaluation, e.g.

    $a = 'a';

    print $a++ for 1..5;



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

Date: Thu, 06 May 2004 01:25:42 GMT
From: Bob Walton <invalid-email@rochester.rr.com>
Subject: Re: win32::ole and excel VBA macro conversion: SmallScroll
Message-Id: <4099940B.10103@rochester.rr.com>

Domenico Discepola wrote:

> Hello all.  I'm trying to write some code to scroll my window pane (in
> Microsoft Excel) & wish convert the following VBA macro to Perl format:
> ActiveWindow.SmallScroll ToRight:=-3
> 
> I have defined the following: $excel (excel object), $worksheet (worksheet
> object), $workbook (workbook object).
> 
> I tried:
> $excel->ActiveWindow->SmallScroll->{ToRight} = -3;
> $workbook->ActiveWindow->SmallScroll->{ToRight} = -3;
> $worksheet->ActiveWindow->SmallScroll->{ToRight} = -3;
> 
> all without success...  Any suggestions would be appreciated.


Try:

   $excel->ActiveWindow->SmallScroll({ToRight=>-3});

-- 
Bob Walton
Email: http://bwalton.com/cgi-bin/emailbob.pl



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

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
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: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice. 

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 V10 Issue 6527
***************************************


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