[17122] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4534 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Oct 5 21:10:32 2000

Date: Thu, 5 Oct 2000 18:10:13 -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: <970794613-v9-i4534@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Thu, 5 Oct 2000     Volume: 9 Number: 4534

Today's topics:
    Re: Reverse by paragraphs - NOT! (David H. Adler)
    Re: Reverse by paragraphs - NOT! ollie_spencer@my-deja.com
    Re: Reverse by paragraphs - NOT! <flavell@mail.cern.ch>
    Re: Reverse by paragraphs - NOT! ollie_spencer@my-deja.com
    Re: Second Script (Gwyn Judd)
    Re: splitting an array into a hash of sub-arrays <already_seen@my-deja.com>
        Variable names enclosed within curly braces evanharrington@my-deja.com
    Re: Variable names enclosed within curly braces <lr@hpl.hp.com>
        Win32 Widgets? <noamt@yahoo.com>
    Re: Win32 Widgets? <carvdawg@patriot.net>
        Win32::ChangeNotify <carvdawg@patriot.net>
    Re: Win32::SerialPort Tutorial? <mc@backwoods.org>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: 5 Oct 2000 23:14:21 GMT
From: dha@panix.com (David H. Adler)
Subject: Re: Reverse by paragraphs - NOT!
Message-Id: <slrn8tq2qd.r4c.dha@panix2.panix.com>

On Thu, 05 Oct 2000 03:33:10 GMT, Uri Guttman <uri@sysarch.com> wrote:

>(see i do know wher the shift key is. he yelled, so i yelled back)

I only saw indication of caps-lock awareness... ;-)

dha

-- 
David H. Adler - <dha@panix.com> - http://www.panix.com/~dha/
Mysticism has no place in programming.
	  - Larry Rosler


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

Date: Thu, 05 Oct 2000 23:36:11 GMT
From: ollie_spencer@my-deja.com
Subject: Re: Reverse by paragraphs - NOT!
Message-Id: <8rj39b$1da$1@nnrp1.deja.com>

You aree right. I missed some.

Even if you were Larry Wall himself, though I don't know that you are
justified in acting as usenet policeman. Others seemed not so offended.

I pointedly tried to respond  -politely- to every responder, even those
who felt they were justified in belittling me and my question  (forget
Godzilla, who posts ONLY to annoy). Had I understood my subject better,
I wouldn't nave posted in the first place. As it was, I wrote the
original post to a word97 file and studied it at length before I pasted
it to what I thought was the correct forum. On reading my post in
"my-deja", I unwisely decided to paste my code directly from my
emacs-winnt editor, and that botched some lines, probably due to only a
\x0a line terminator in the emacs. The first few responses wanted more
info.  I unfortunately repeated the error on a second post.

Well I tried. I'll try again. I'll print out every post in the thread
this evening and compare it to your list and see if I can set straight
anyone I may have slighted, and try to see where this mysterious(to me,
at least) explanation is hidden. I know full well that when I read to
an array with {local S/=''; ...etc...} I gather an entire paragraph
under one component of the array (ex. @ROF[3] may contain several of
what we nomally consider "\n" separated lines). I worked that many
times in experimenting. Maybe I really am so stupid that I should never
post again. I hope not.

I am still working some experimental threads with other, less touchy
responders. Did you see that?

I note I am not the only person to complain about crude treatment given
anyone who tries to do a "yes, but.." type of dialog in perl.misc.
Perhaps I would have been better off to say "Oh yes sir, thank you sir,
may I kiss your ring, sir" to initial responses ( except to mr./ms.
Godzilla ) rather than say "I tried that but.." and I'd not brought
such a firestorm.

I will try diligently to annoy you again. You could spare yourself by
not reading my posts, but *I* would be the worse for that.

ollie spencer
In article <8ri75d$dcv$1@lublin.zrz.tu-berlin.de>,
  anno4000@lublin.zrz.tu-berlin.de (Anno Siegel) wrote:
> <ollie_spencer@my-deja.com> wrote in comp.lang.perl.misc
>
> [de-jeopardized]
>
> > In article <8rhkbf$aul$1@lublin.zrz.tu-berlin.de>,
> >   anno4000@lublin.zrz.tu-berlin.de (Anno Siegel) wrote:
> > >  <ollie_spencer@my-deja.com> wrote in comp.lang.perl.misc, still
> > stubbornly
> > > posting jeopardy style:
> > >
> > > >Thanks for the reply. I believe you might actually have read my
> > original
> > > >posting! Many seem to have not.
> > >
> > > Did you read the replies you got?
> > >
> > > >Thanks again! I'll post my results-I never thought to slurp a
para
> > at a
> > > >time!
> > >
> > > How about the half-dozen or so postings that suggested just that?
> > >
> > > Anno
> > Thanks for the posting. I think.
> >
> > Yes, I read each made to me, reserving first priority to those that
> > were are on subject.
>
> Well, if you get a noticeable number of replies that you judge "off
> subject", chances are that you didn't make your subject very clear
> in the first place.  Do you really think people are replying to
> messages they haven't read just for the heck of it?  Exceptions
granted,
> a poster who replies to you has made a serious effort to understand
> what you are up to.  One or the other may have given up in
frustration,
> leading to what you perceive to be "person(al) attacks".  Others may
> have honestly failed to get what you want, but if that happens a
number
> of times, who, do you think, is to blame?
>
> >                       Second priority went to those that prefer
person
> > attacks to technical input ( like this one) and after that, I don't
> > even read Godzilla's works of fiction.
>
> [...]
>
> > I can only post in mornings and evenings- sometimes at lunch or
breaks-
> > since my I have committments to my employer.
>
> Whatever your posting habits and restrictions, it is up to you to
> make sure you know the thread you are commenting on.
>
> [...]
>
> > If you feel I have overlooked someone, or a point made by some
previous
> > poster, please be specific - I will reread it and see if I agree.
>
> Okay, here goes.  These have all suggested processing the file as a
list
> of paragraphs:
>
>    From: nvp@spamnothanks.speakeasy.org (NP)
>    Date: Mon Oct 02 18:50:57 MEST 2000
>    $/ = '';
>
>    From: amonotod <amonotod@netscape.net>
>    Date: Mon Oct 02 19:23:31 MEST 2000
>    @paras = split(/\n\n/, $article);
>
>    From: Ren Maddox <ren.maddox@tivoli.com>
>    Date: Tue Oct 03 07:09:51 MEST 2000
>    $/ = "";   # or "\n\n" if you don't want to ignore extra blank
lines
>
>    From: michel.dalle@usa.net (Michel Dalle)
>    Date: Wed Oct 04 16:59:42 MEST 2000
>    So if your original array contains paragraphs as elements and you
>    reverse the array, you will get the paragraphs in reverse.
>
>    From: Uri Guttman <uri@sysarch.com>
>    Date: Wed Oct 04 17:21:42 MEST 2000
>    try File::ReadBackwards and set the input record separator to
"\n\n".
>
>    From: michel.dalle@usa.net (Michel Dalle)
>    Date: Thu Oct 05 12:28:11 MEST 2000
>    A better approach would be to make sure you fill your
>    original array directly with paragraphs instead of lines.
>
>    From: Bart Lateur <bart.lateur@skynet.be>
>    Date: Wed Oct 04 21:12:56 MEST 2000
>    I feel the same whay too. So, let's try to turn the array of lines
into
>    an array of paragraphs.
>
>    From: Bart Lateur <bart.lateur@skynet.be>
>    Date: Mon Oct 02 23:10:50 MEST 2000
>    local $/ = '';
>
>    From: Brad Baxter <bmb@ginger.libs.uga.edu>
>    Date: Mon Oct 02 23:25:32 MEST 2000
>    You say that the paragraphs are stored in @OF, but it looks to me
like
>    you're storing lines there.  Take a look at the $/ variable
(perldoc
>    perlvar).  Setting it to "" will let you read your file paragraph
by
>    paragraph.
>
>    From: "Andrew N. McGuire " <anmcguire@ce.mediaone.net>
>    Date: Thu Oct 05 01:34:46 MEST 2000
>    $/ = q++;
>
>    From: stdenton@my-deja.com
>    Date: Wed Oct 04 19:56:17 MEST 2000
>    $/ = '';  # slurp in a para at a time
>
> This is what I gather from a cursory overview of the thread.  So you
> managed not to get the hint in at least 10 cases.  *You* complain
> about people not reading your posts?
>
> > A personal note ( since this reply is to an attack on me):
> > I have been using interpretive languages in my engineering work
since
>
> [more "credentials" snipped]
>
> > Whoops, I'm getting technical. Perhaps you aren't ready for that. I
> > don't exactly have your credentials.
>
> ...and I'm not going to list them for you.  Check some of my postings
> and judge yourself the level of my expertise.  Since you're posting
> from deja, that shouldn't be so hard.
>
> I advise you to go back to lurking.  With your attitude you're not
> going to find much joy in active posting.
>
> Anno
>


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Fri, 6 Oct 2000 02:05:17 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: Reverse by paragraphs - NOT!
Message-Id: <Pine.GHP.4.21.0010060159030.6562-100000@hpplus03.cern.ch>

On Thu, 5 Oct 2000 ollie_spencer@my-deja.com wrote:

> Even if you were Larry Wall himself, though I don't know that you are
> justified in acting as usenet policeman. Others seemed not so offended.

I can assure you, I wasn't offended.  I merely added you to the
ever-growing list of people who were incapable of using appropriate
advice.

[entire history of usenet deleted]

I never really understood thermodynamics in undergraduate lectures all
those years ago, but this is helping me to fill the gaps about what
entropy meant.



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

Date: Fri, 06 Oct 2000 00:07:07 GMT
From: ollie_spencer@my-deja.com
Subject: Re: Reverse by paragraphs - NOT!
Message-Id: <8rj538$2pk$1@nnrp1.deja.com>

Hi - and a note to you for the 2nd time tonight.

You are right! You are Right! *You are right*! And I'm happy to
acknowledge it!

I printed all the messages in  this string (except those in the
Godzilla catfight, which I never posted to) and you are stunningly
correct- many posts are there that I never saw before. I assumed that a
once a message received a number, it held that number forever. A
renumbering seems to occur on each access, and many responses were
inserted BEFORE the Godzilla substring well after it was initiated.

It mystified me how I seemed to offend without meaning to. I'll try to
undo any damage that was done by my misunderstanding.  My previous
newsreader(OS/2) presented messages chronologically order and I assumed
- oh, you know.

I'm truly sorry. I thought I was being unjustly attacked and responded
poorly. Please forgive me, I'll try not to offend again.

And now to do penance.

ollie spencer

In article <8ri75d$dcv$1@lublin.zrz.tu-berlin.de>,
  anno4000@lublin.zrz.tu-berlin.de (Anno Siegel) wrote:
> <ollie_spencer@my-deja.com> wrote in comp.lang.perl.misc
>
> [de-jeopardized]
>
> > In article <8rhkbf$aul$1@lublin.zrz.tu-berlin.de>,
> >   anno4000@lublin.zrz.tu-berlin.de (Anno Siegel) wrote:
> > >  <ollie_spencer@my-deja.com> wrote in comp.lang.perl.misc, still
> > stubbornly
> > > posting jeopardy style:
> > >
> > > >Thanks for the reply. I believe you might actually have read my
> > original
> > > >posting! Many seem to have not.
> > >
> > > Did you read the replies you got?
> > >
> > > >Thanks again! I'll post my results-I never thought to slurp a
para
> > at a
> > > >time!
> > >
> > > How about the half-dozen or so postings that suggested just that?
> > >
> > > Anno
> > Thanks for the posting. I think.
> >
> > Yes, I read each made to me, reserving first priority to those that
> > were are on subject.
>
> Well, if you get a noticeable number of replies that you judge "off
> subject", chances are that you didn't make your subject very clear
> in the first place.  Do you really think people are replying to
> messages they haven't read just for the heck of it?  Exceptions
granted,
> a poster who replies to you has made a serious effort to understand
> what you are up to.  One or the other may have given up in
frustration,
> leading to what you perceive to be "person(al) attacks".  Others may
> have honestly failed to get what you want, but if that happens a
number
> of times, who, do you think, is to blame?
>
> >                       Second priority went to those that prefer
person
> > attacks to technical input ( like this one) and after that, I don't
> > even read Godzilla's works of fiction.
>
> [...]
>
> > I can only post in mornings and evenings- sometimes at lunch or
breaks-
> > since my I have committments to my employer.
>
> Whatever your posting habits and restrictions, it is up to you to
> make sure you know the thread you are commenting on.
>
> [...]
>
> > If you feel I have overlooked someone, or a point made by some
previous
> > poster, please be specific - I will reread it and see if I agree.
>
> Okay, here goes.  These have all suggested processing the file as a
list
> of paragraphs:
>
>    From: nvp@spamnothanks.speakeasy.org (NP)
>    Date: Mon Oct 02 18:50:57 MEST 2000
>    $/ = '';
>
>    From: amonotod <amonotod@netscape.net>
>    Date: Mon Oct 02 19:23:31 MEST 2000
>    @paras = split(/\n\n/, $article);
>
>    From: Ren Maddox <ren.maddox@tivoli.com>
>    Date: Tue Oct 03 07:09:51 MEST 2000
>    $/ = "";   # or "\n\n" if you don't want to ignore extra blank
lines
>
>    From: michel.dalle@usa.net (Michel Dalle)
>    Date: Wed Oct 04 16:59:42 MEST 2000
>    So if your original array contains paragraphs as elements and you
>    reverse the array, you will get the paragraphs in reverse.
>
>    From: Uri Guttman <uri@sysarch.com>
>    Date: Wed Oct 04 17:21:42 MEST 2000
>    try File::ReadBackwards and set the input record separator to
"\n\n".
>
>    From: michel.dalle@usa.net (Michel Dalle)
>    Date: Thu Oct 05 12:28:11 MEST 2000
>    A better approach would be to make sure you fill your
>    original array directly with paragraphs instead of lines.
>
>    From: Bart Lateur <bart.lateur@skynet.be>
>    Date: Wed Oct 04 21:12:56 MEST 2000
>    I feel the same whay too. So, let's try to turn the array of lines
into
>    an array of paragraphs.
>
>    From: Bart Lateur <bart.lateur@skynet.be>
>    Date: Mon Oct 02 23:10:50 MEST 2000
>    local $/ = '';
>
>    From: Brad Baxter <bmb@ginger.libs.uga.edu>
>    Date: Mon Oct 02 23:25:32 MEST 2000
>    You say that the paragraphs are stored in @OF, but it looks to me
like
>    you're storing lines there.  Take a look at the $/ variable
(perldoc
>    perlvar).  Setting it to "" will let you read your file paragraph
by
>    paragraph.
>
>    From: "Andrew N. McGuire " <anmcguire@ce.mediaone.net>
>    Date: Thu Oct 05 01:34:46 MEST 2000
>    $/ = q++;
>
>    From: stdenton@my-deja.com
>    Date: Wed Oct 04 19:56:17 MEST 2000
>    $/ = '';  # slurp in a para at a time
>
> This is what I gather from a cursory overview of the thread.  So you
> managed not to get the hint in at least 10 cases.  *You* complain
> about people not reading your posts?
>
> > A personal note ( since this reply is to an attack on me):
> > I have been using interpretive languages in my engineering work
since
>
> [more "credentials" snipped]
>
> > Whoops, I'm getting technical. Perhaps you aren't ready for that. I
> > don't exactly have your credentials.
>
> ...and I'm not going to list them for you.  Check some of my postings
> and judge yourself the level of my expertise.  Since you're posting
> from deja, that shouldn't be so hard.
>
> I advise you to go back to lurking.  With your attitude you're not
> going to find much joy in active posting.
>
> Anno
>


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Thu, 05 Oct 2000 23:23:45 GMT
From: tjla@guvfybir.qlaqaf.bet (Gwyn Judd)
Subject: Re: Second Script
Message-Id: <slrn8tq3bv.sv.tjla@thislove.dyndns.org>

I was shocked! How could Jim <jaedma@yahoo.com>
say such a terrible thing:
>pass me
>
>
>I have a form that when filled out, and submit is pressed, info goes to a
>CGI script(has it should).
>My question is -  I have 1 text box, that I want to go to a separate script,
>can this be done.
>In other words I want  6 text box's info to go to Script1, text box 7 should
>go to script2.

The CGI newsgroup is that way --> comp.infosystems.www.authoring.cgi

-- 
Gwyn Judd (print `echo 'tjla@guvfybir.qlaqaf.bet' | rot13`)
I went to the eye doctor and found out I needed glasses for reading.  So,
I got some flip-up contact lenses.
						-- Stephen Wright


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

Date: Thu, 05 Oct 2000 23:03:13 GMT
From: post_to_group <already_seen@my-deja.com>
Subject: Re: splitting an array into a hash of sub-arrays
Message-Id: <8rj1be$vsd$1@nnrp1.deja.com>

In article <m3vgv8f9q2.fsf@dhcp11-177.support.tivoli.com>,
  Ren Maddox <ren.maddox@tivoli.com> wrote:
> post_to_group <already_seen@my-deja.com> writes:
>
> #!/usr/local/bin/perl -w
> use strict;
> my @hosts=qw(one two three four five six seven eight nine ten eleven);
> print "Hosts: @hosts\n";
> for my $hosts_per_group (3..6) {  # Demonstrate at various sizes
>   my @hosts = @hosts;             # make a copy to destroy
>   my @hostgroups;
>   # This is it:
>   push @hostgroups, [ splice(@hosts, 0, $hosts_per_group) ] while
@hosts;
>   # Show that it worked:
>   print "\nWith a group size of $hosts_per_group:\n";
>   print "@$_\n" for @hostgroups;
> }
> __END__
>
> Note that most of this code is just to demonstrate that it works.  The
> actual code that does what you want is just the:
>
>   push @hostgroups, [ splice(@hosts, 0, $hosts_per_group) ] while
@hosts;
>
> (Well, it doesn't do exactly what you asked for as it doesn't use a
> hash, but I believe it should meet your needs.  If not, let me
> know....)
>
> --
> Ren Maddox
> ren@tivoli.com

What can I say, except THANKS!  It does exactly what my code does but
much, much more efficiently.  It took me a while of playing around with
your code to even understand what is going on with that one nifty line
but now I can adapt it into my foreach loop and use it instead!

While I now see how it works, I am still not sure of the
correct terminology.  Are you storing scalar references to each spliced
array set in @hostgroups?  When I try to print a segment of @hostgroups,
I get the ARRAY address, but when prepend it with @, as you have in @$_,
then it works.  Just curious as to the proper terminology/description of
what is going on so I can go look this up as I am not clearly
understanding the fundamentals.

However for the nuts and bolts, you have definitely posted a helpful
answer.  Also thanks to the other gent who suggested Data::Dumper.  What
I prefer about the above is it uses direct code instead of some black
box module and as a beginner I prefer to "code the stuff by hand."

thanks to both of you,

Adam


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Thu, 05 Oct 2000 22:12:17 GMT
From: evanharrington@my-deja.com
Subject: Variable names enclosed within curly braces
Message-Id: <8riubs$td3$1@nnrp1.deja.com>

My company has many perl job driver scripts.  In fact, it has become
the language for jobs run by our scheduling software.  Some years ago,
I encountered problems with variable substitutions in perl and found
that the one sure way of coping with the issue was to always refer to
variable names between curly braces.  So, wherever a variable name was
used (whether a list, hash, or scalar) I would refer to it as follows:

	${scalar}
	@{list}
	%{hash}

This is because it seemed a clear way to avoid confusion about where
the beginning of the name started and ended.  But, then, lots of people
became vocal about my divergence from "established perl style".  I grew
tired of explaining and defending my syntax.  A few months ago, I gave
up the battle and reverted to using names like:

	$scalar
	@list
	%hash

This worked fine for most programs.  However, I recently edited a perl
program where there was a line like this:

	$cmd = "ctmcontb -add $ctmFileName_FILE-OK $odat";

This was constructing a command string to set a condition for our
scheduler.  Even though there was a non-null value for $ctmFileName in
the program, $cmd became 'ctmcontb -add -OK 1004'.  That is because
perl substituted the value of ${ctmFileName_FILE} (a null value, as it
was a scalar never created within the program) in the double-quoted
assignment.  Clearly, it would have been better to have stuck with my
old technique and code the line:

	$cmd = "ctmcontb -add ${ctmFileName}_FILE-OK $odat";

or, to be more consistent:

	${cmd} = "ctmcontb -add ${ctmFileName}_FILE-OK ${odat}";
        # Now in use

Now, I wonder what is the best way for programmers to avoid this
problem?  We could decide to avoid substitution altogether:

	$cmd = 'ctmcontb -add ' . $ctmFileName . '_FILE-OK ' . $odat;

However, the moment someone decides it would be 'prettier' to pull all
this back into a double-quoted string, we would have the error again.
For now, I have decided to leave the line as the version above -- the
one with the comment 'Now in use'.  But, this conflicts with the style
used elsewhere in this program and almost everywhere else.  I also had
to put a comment near that line to warn programmers against removing
the curly braces.

Surely this is a problem for other people?  How do they cope with it, I
wonder?  Apparently, many feel that my preference for enclosing
variable names within curly braces is excessive.  But is it?  Is it not
the only way to make clear what is happening?  If I edit someone else's
code, should I have to search through it to look for every potential
problem that might result from the variable's use?  It is so easy to
forget or overlook the issues.

On the other hand, if I always enclose the name in curly braces -- and
if everyone else does, too -- the dilemma is solved.  I can be sure
that there will be no problem with variable substitution.

HOWEVER, I have found that variable names enclosed in curlies are not
always safe.  For instance, one cannot open a filehandle for reading
and process the lines as follows:

        use FileHandle;
        my ${fh} = new FileHandle( "somefile.txt" );

	while ( <${fh}> )   # WRONG!
	{
		...
	}

The incorrect line above is repaired byh expressing it thus:

        while ( <$fh> )     # GOOD!

Also, there are probably other cases where this syntax clashes.

Does anyone have thoughts about this matter?  Do you know why the curly
braces do not work within the angled brackets, when reading from a file
handle?  Must it be this way?

Thanks,
Evan K. Harrington


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Thu, 5 Oct 2000 15:47:52 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: Variable names enclosed within curly braces
Message-Id: <MPG.1446a4f16fc0c3b98ae12@nntp.hpl.hp.com>

In article <8riubs$td3$1@nnrp1.deja.com> on Thu, 05 Oct 2000 22:12:17 
GMT, evanharrington@my-deja.com <evanharrington@my-deja.com> says...

 ...

> 	$cmd = "ctmcontb -add ${ctmFileName}_FILE-OK $odat";
> 
> or, to be more consistent:
> 
> 	${cmd} = "ctmcontb -add ${ctmFileName}_FILE-OK ${odat}";
>         # Now in use

"A foolish consistency is the hobgoblin of little minds, adored by 
little statesman and philosophers and divines." -- Ralph Waldo Emerson

This is truly a foolish consistency, though harmelss in this case.  As 
you note, it will cause Perl programmers to look at you askance.

 ...

> 	while ( <${fh}> )   # WRONG!
> 	{
> 		...
> 	}
> 
> The incorrect line above is repaired byh expressing it thus:
> 
>         while ( <$fh> )     # GOOD!
> 
> Also, there are probably other cases where this syntax clashes.
> 
> Does anyone have thoughts about this matter?  Do you know why the curly
> braces do not work within the angled brackets, when reading from a file
> handle?  Must it be this way?

It seems as though the implementation could recognize ${fh} as reducing 
to $fh, a simple scalar variable, but it doesn't.  It seems to work on a 
general syntactic principle, ignoring this special case.

From perlop:

If angle brackets contain is a simple scalar variable (e.g., <$foo>), 
then that variable contains the name of the filehandle to input from, or 
its typeglob, or a reference to the same. For example:

    $fh = \*STDIN;
    $line = <$fh>;

If what's within the angle brackets is neither a filehandle nor a simple 
scalar variable containing a filehandle name, typeglob, or typeglob 
reference, it is interpreted as a filename pattern to be globbed, and 
either a list of filenames or the next filename in the list is returned, 
depending on context. This distinction is determined on syntactic 
grounds alone. That means <$x> is always a readline() from an indirect 
handle, but <$hash{key}> is always a glob(). That's because $x is a 
simple scalar variable, but $hash{key} is not--it's a hash element.

-- 
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


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

Date: Fri, 6 Oct 2000 00:02:04 +0200
From: "Noam Tamim" <noamt@yahoo.com>
Subject: Win32 Widgets?
Message-Id: <8riq94$1hu$1@news.netvision.net.il>

Hi.

I'm using ActiveState's ActivePerl on my Windows'98 system. I want to use
various GUI widgets -
like input boxes, message-boxes, and even more complex dialog boxes.
How can I do it?

One option can be to use Tk - but I can't find the Tk/Perl components for
Win32. I've searched the
FAQ's (and the Web) and found nothing.
Another option can be an ActiveX component - but again, I don't know where
to find it. The standard
ActivePerl package Win32.pm supplies a basic message-box, but that's it
(AFAIK).

Am I missing anything?

Thanks,
 - Noam.







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

Date: Thu, 05 Oct 2000 20:01:29 -0400
From: H C <carvdawg@patriot.net>
Subject: Re: Win32 Widgets?
Message-Id: <39DD1659.B27931B@patriot.net>

> One option can be to use Tk - but I can't find the Tk/Perl components for
> Win32. I've searched the
> FAQ's (and the Web) and found nothing.

ppm install Tk



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

Date: Thu, 05 Oct 2000 20:03:46 -0400
From: H C <carvdawg@patriot.net>
Subject: Win32::ChangeNotify
Message-Id: <39DD16E2.551262BD@patriot.net>

NT 4.0 SP6a, ActiveState Perl build 618

Problem:  Code exits after first change....such as a file deleted or
added, or a
               file size change..

Code:
my $watch = new Win32::ChangeNotify($self->{monitor_dir}, 0,
      FILE_NOTIFY_CHANGE_FILE_NAME | FILE_NOTIFY_CHANGE_SIZE );

 if ($watch) {
  $change = $watch->wait(INFINITE);
  if ($change) {
   print "Change Occurred!\n";
   $watch->reset();
  }

 }
 else {
  $self->{error} = "Could not create ChangeNotify object for
$self->{monitor_dir}";
 }

Any thoughts?

And, yes, Dave, I did take a look at DirMon.pl....  ;-)



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

Date: Thu, 05 Oct 2000 20:33:01 -0400
From: MC <mc@backwoods.org>
Subject: Re: Win32::SerialPort Tutorial?
Message-Id: <39DD1DBD.73717168@backwoods.org>

Kent Orthner wrote:
> 
> After reading your post, I started stumbling around the Perl Website,
> and laded on the Author's web page.  If you go there, it has a .zip
> file with all the examples.
> 
> http://members.aol.com/Bbirthisel/alpha.html
> 
> HTH, -kent.

Many thanks!!!!!!

-- 
---------------------------------------------------------------------
I haven't lost my mind!!! It's backed up on disk.

"The world wont end with a bang, or even a whimper, but with an error
message." -- format C:


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

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


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