[17607] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 5027 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Dec 4 14:15:38 2000

Date: Mon, 4 Dec 2000 11:15:19 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <975957319-v9-i5027@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Mon, 4 Dec 2000     Volume: 9 Number: 5027

Today's topics:
    Re: Sorting the result of a function <jrw32982@my-deja.com>
    Re: Sorting the result of a function <W.Hielscher@mssys.com>
        Statistics for comp.lang.perl.misc <gbacon@cs.uah.edu>
    Re: Submitting a file via a form dtbaker_dejanews@my-deja.com
    Re: term ansi color <dsdf@sdfd.com>
        text comparisons -- a la 'diff', but char by char or wo <iowa8_song8.remove_eights@hotmail.com>
    Re: Using goto <bowman@montana.com>
    Re: Using goto (Abigail)
        which linux for Perl 5.6? <prlawrence@lehigh.edu>
    Re: which linux for Perl 5.6? (Flint Slacker)
        Why doesn't this work (file handles as strings) <dross@iders.ca>
    Re: Why doesn't this work (file handles as strings) (Rafael Garcia-Suarez)
        Win32::API and EnumChildWindows <neil@alaweb.com>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Mon, 04 Dec 2000 14:34:06 GMT
From: John Wiersba <jrw32982@my-deja.com>
Subject: Re: Sorting the result of a function
Message-Id: <90ga0u$v4g$1@nnrp1.deja.com>

garry@zvolve.com wrote:
> >How can I sort the (list) result of a function without assigning it
> >to a temporary variable?  ...
> >
> >   perl -e 'sub f { (3,2,1) } @a = sort   f() ; print "@a\n"'
>
>     perl -wle 'sub f { (3,2,1) } print join " ", sort +f()'
>
> >Why doesn't sort produce the expected result
>
> Because sort interprets `f()' as a compare function.

This is way counterintuitive since in virtually every other context, f()
is a function call, not a function name.

I understand why &f() might help disambiguate what my intentions are.
But, it makes no sense to me why +f() should work.  It looks like +f()
is calling the function f in scalar context and applying the unary plus
operator to the result, but that can't be right.

> See the sort() entry in the perlfunc manual page.

I don't see anything in there referring to this bizarre behavior.

--
John Wiersba


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


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

Date: Mon, 04 Dec 2000 19:09:32 +0100
From: Wolfgang Hielscher <W.Hielscher@mssys.com>
Subject: Re: Sorting the result of a function
Message-Id: <3A2BDDDC.E15E5BE@mssys.com>

John Wiersba wrote:
> garry@zvolve.com wrote:
> > Because sort interprets `f()' as a compare function.
> 
> This is way counterintuitive since in virtually every other context, f()
> is a function call, not a function name.

I think Garry was a litte unprecise here: 'sort' interprets 'f' as a
compare function and '()' as an empty list.

I do admit that the way perl interprets 'sort f ()' might seem
counterintuitive at first glance, but thinking about it how should perl
differentiate
   sort compare_fct        @data;	# want  sort USERSUB LIST
from
   sort data_modifying_fct @data;	# want  sort LIST

I think the way perl interprets the sort function arguments is a little
"price" to pay for the gain that no parentheses are needed around
function arguments.

To turn it the other way round: Be happy that you found a real-world
application for the unary plus. After having read nobull's posting
myself I thought that _this_ is an example that really illustrates the
use of the unary plus (and should go to the docs IMHO).


> But, it makes no sense to me why +f() should work.  It looks like +f()
> is calling the function f in scalar context and applying the unary plus
> operator to the result, but that can't be right.

Well, if you think that '+f()' look like f is called in a scalar
context, then you should read again about the unary plus. I haven't
found anything that relates unary plus with providing a certain context.


Cheers
   Wolfgang


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

Date: Mon, 04 Dec 2000 16:34:40 -0000
From: Greg Bacon <gbacon@cs.uah.edu>
Subject: Statistics for comp.lang.perl.misc
Message-Id: <t2nht0a3mghkca@corp.supernews.com>

Following is a summary of articles spanning a 7 day period,
beginning at 27 Nov 2000 16:50:04 GMT and ending at
04 Dec 2000 13:17:01 GMT.

Notes
=====

    - A line in the body of a post is considered to be original if it
      does *not* match the regular expression /^\s{0,3}(?:>|:|\S+>|\+\+)/.
    - All text after the last cut line (/^-- $/) in the body is
      considered to be the author's signature.
    - The scanner prefers the Reply-To: header over the From: header
      in determining the "real" email address and name.
    - Original Content Rating (OCR) is the ratio of the original content
      volume to the total body volume.
    - Find the News-Scan distribution on the CPAN!
      <URL:http://www.perl.com/CPAN/modules/by-module/News/>
    - Please send all comments to Greg Bacon <gbacon@cs.uah.edu>.
    - Copyright (c) 2000 Greg Bacon.
      Verbatim copying and redistribution is permitted without royalty;
      alteration is not permitted.  Redistribution and/or use for any
      commercial purpose is prohibited.

Excluded Posters
================

perlfaq-suggestions\@(?:.*\.)?perl\.com

Totals
======

Posters:  411
Articles: 1276 (530 with cutlined signatures)
Threads:  396
Volume generated: 2304.5 kb
    - headers:    998.9 kb (20,275 lines)
    - bodies:     1246.0 kb (42,263 lines)
    - original:   800.0 kb (29,434 lines)
    - signatures: 58.3 kb (1,518 lines)

Original Content Rating: 0.642

Averages
========

Posts per poster: 3.1
    median: 1 post
    mode:   1 post - 226 posters
    s:      6.0 posts
Posts per thread: 3.2
    median: 2.0 posts
    mode:   1 post - 137 threads
    s:      15.1 posts
Message size: 1849.4 bytes
    - header:     801.6 bytes (15.9 lines)
    - body:       999.9 bytes (33.1 lines)
    - original:   642.0 bytes (23.1 lines)
    - signature:  46.8 bytes (1.2 lines)

Top 10 Posters by Number of Posts
=================================

         (kb)   (kb)  (kb)  (kb)
Posts  Volume (  hdr/ body/ orig)  Address
-----  --------------------------  -------

   80   152.0 ( 59.8/ 81.1/ 49.7)  Tad McClellan <tadmc@metronet.com>
   47    74.1 ( 34.2/ 36.4/ 22.7)  nobull@mail.com
   33    45.1 ( 28.4/ 16.5/ 10.0)  Bart Lateur <bart.lateur@skynet.be>
   31    62.3 ( 29.0/ 33.3/  9.8)  "John Boy Walton" <johngros@Spam.bigpond.net.au>
   27    45.8 ( 22.6/ 22.8/ 12.5)  Joe Schaefer <joe+usenet@sunstarsys.com>
   27    45.4 ( 19.6/ 24.8/ 14.2)  Chris Fedde <cfedde@fedde.littleton.co.us>
   25    97.5 ( 18.7/ 77.9/ 77.9)  PerlFAQ Server <faq@denver.pm.org>
   17    27.3 ( 15.0/ 11.9/  5.5)  Ren Maddox <ren.maddox@tivoli.com>
   15    31.7 ( 11.1/ 20.6/ 12.8)  Michael Carman <mjcarman@home.com>
   15    21.8 ( 11.8/ 10.0/  6.7)  dtbaker_dejanews@my-deja.com

These posters accounted for 24.8% of all articles.

Top 10 Posters by Volume
========================

  (kb)   (kb)  (kb)  (kb)
Volume (  hdr/ body/ orig)  Posts  Address
--------------------------  -----  -------

 152.0 ( 59.8/ 81.1/ 49.7)     80  Tad McClellan <tadmc@metronet.com>
  97.5 ( 18.7/ 77.9/ 77.9)     25  PerlFAQ Server <faq@denver.pm.org>
  74.1 ( 34.2/ 36.4/ 22.7)     47  nobull@mail.com
  62.3 ( 29.0/ 33.3/  9.8)     31  "John Boy Walton" <johngros@Spam.bigpond.net.au>
  45.8 ( 22.6/ 22.8/ 12.5)     27  Joe Schaefer <joe+usenet@sunstarsys.com>
  45.4 ( 19.6/ 24.8/ 14.2)     27  Chris Fedde <cfedde@fedde.littleton.co.us>
  45.1 ( 28.4/ 16.5/ 10.0)     33  Bart Lateur <bart.lateur@skynet.be>
  36.7 ( 12.9/ 20.9/ 10.9)     15  mgjv@tradingpost.com.au
  31.7 ( 11.1/ 20.6/ 12.8)     15  Michael Carman <mjcarman@home.com>
  29.4 (  1.6/ 27.8/ 26.6)      2  "Kos" <kseterba@chello.no>

These posters accounted for 26.9% of the total volume.

Top 10 Posters by OCR (minimum of five posts)
==============================================

         (kb)    (kb)
OCR      orig /  body  Posts  Address
-----  --------------  -----  -------

1.000  ( 77.9 / 77.9)     25  PerlFAQ Server <faq@denver.pm.org>
1.000  (  1.4 /  1.4)      5  B Gannon <admin@kopnews.co.uk>
0.933  (  9.9 / 10.6)      5  Bernie Cosell <bernie@fantasyfarm.com>
0.853  (  7.9 /  9.3)     13  simbean@my-deja.com
0.789  (  1.7 /  2.1)      5  lightfoote@my-deja.com
0.760  (  8.5 / 11.2)      5  Chris Stith <mischief@velma.motion.net>
0.759  (  6.0 /  7.9)      6  Wyzelli <wyzelli@yahoo.com>
0.743  (  4.6 /  6.2)      5  Vinny Murphy <VincentMurphy@mediaone.net>
0.728  (  5.5 /  7.6)      8  fallenang3l@my-deja.com
0.720  (  3.8 /  5.3)      6  Logan Shaw <logan@cs.utexas.edu>

Bottom 10 Posters by OCR (minimum of five posts)
=================================================

         (kb)    (kb)
OCR      orig /  body  Posts  Address
-----  --------------  -----  -------

0.431  (  5.2 / 12.1)      8  OTR Comm <otrcomm***NO-SPAM***@wildapache**NO-SPAM***.net>
0.429  (  1.5 /  3.5)      6  "Philip 'Yes, that's my address' Newton" <nospam.newton@gmx.li>
0.412  (  6.9 / 16.7)      9  "Ed Grosvenor" <secursrver@hotmail.com>
0.410  (  5.2 / 12.6)     13  abigail@foad.org
0.401  (  3.4 /  8.5)      7  SPAM_loginprompt@yahoo.com
0.398  (  1.8 /  4.6)      7  Steven Lembark <lembark@wrkhors.com>
0.352  (  1.4 /  4.1)      7  "Geoff Winkless" <geoff-at-farmline-dot-com@127.0.0.1>
0.296  (  3.7 / 12.6)     12  flint@flintslacker.com
0.293  (  9.8 / 33.3)     31  "John Boy Walton" <johngros@Spam.bigpond.net.au>
0.273  (  1.8 /  6.6)      8  "Kiel Stirling" <taboo@comcen.com.au>

61 posters (14%) had at least five posts.

Top 10 Threads by Number of Posts
=================================

Posts  Subject
-----  -------

   30  Why?
   19  splitting a string into an array and preserving the "\n"
   19  reformatting a perl script
   18  checking if mail address is valid
   18  Reading a csv file
   15  how do i direct compiler errors to a file-newbie
   15  Using goto
   12  Does comp.lang.perl exist?
   11  array of unique random numbers
   10  Encrypting passwords

These threads accounted for 13.1% of all articles.

Top 10 Threads by Volume
========================

  (kb)   (kb)  (kb)  (kb)
Volume (  hdr/ body/ orig)  Posts  Subject
--------------------------  -----  -------

  64.9 ( 26.7/ 36.2/ 19.1)     30  Why?
  46.2 ( 17.6/ 26.8/ 16.6)     19  splitting a string into an array and preserving the "\n"
  33.8 ( 15.4/ 17.6/ 10.3)     18  Reading a csv file
  33.5 (  3.8/ 29.3/ 27.4)      5  Poll it
  32.4 ( 13.7/ 17.8/  9.1)     15  Using goto
  28.1 (  6.8/ 21.1/  9.1)      9  Anonymous Array Reference ??
  27.8 ( 14.5/ 13.2/  7.5)     18  checking if mail address is valid
  26.2 ( 14.6/ 10.5/  4.5)     19  reformatting a perl script
  25.8 (  7.5/ 17.8/  8.9)     10  Encrypting passwords
  24.1 (  0.6/ 23.5/ 17.2)      1  email

These threads accounted for 14.9% of the total volume.

Top 10 Threads by OCR (minimum of five posts)
==============================================

         (kb)    (kb)
OCR      orig /  body  Posts  Subject
-----  --------------  -----  -------

0.938  ( 27.4/  29.3)      5  Poll it
0.747  (  2.5/   3.3)      5  Manipulating File Modification Time
0.729  (  3.6/   5.0)      5  Hashes and printing values with CGI.pm
0.728  (  1.8/   2.4)      5  Dates in perl
0.722  (  3.1/   4.2)      5  for loop: brackets make any difference?
0.716  (  4.6/   6.4)      8  How to find what is between n'th and the next tab?
0.713  (  7.1/   9.9)      6  Recursively load all objects in an HTML page...
0.713  (  3.6/   5.1)      6  Substituting international characters
0.708  (  1.2/   1.6)      5  reading from <STDIN>
0.704  (  4.8/   6.9)      6  sorting a file...

Bottom 10 Threads by OCR (minimum of five posts)
=================================================

         (kb)    (kb)
OCR      orig /  body  Posts  Subject
-----  --------------  -----  -------

0.429  (  4.5 / 10.5)     19  reformatting a perl script
0.426  (  2.0 /  4.7)      5  Alias STDIN to a variable
0.419  (  2.4 /  5.8)      6  Grappling wth space
0.408  (  2.5 /  6.1)      7  Unmatched Single Quote
0.399  (  3.2 /  8.1)      5  activate
0.376  (  1.5 /  3.9)      8  why could't i do something like this?
0.372  (  1.7 /  4.5)      6  one question about perl return value
0.372  (  2.4 /  6.3)      5  Calling perl with input type hidden probs??????
0.369  (  3.0 /  8.1)      5  Pie Chart Font Size
0.349  (  3.6 / 10.2)      8  Perl string converter

89 threads (22%) had at least five posts.

Top 10 Targets for Crossposts
=============================

Articles  Newsgroup
--------  ---------

      23  comp.lang.perl.modules
      19  alt.perl
       6  comp.lang.perl
       5  de.comp.lang.perl.misc
       5  fr.comp.lang.perl
       5  pl.comp.lang.perl
       3  comp.protocols.snmp
       2  comp.answers
       2  microsoft.public.xml
       2  misc.books.technical

Top 10 Crossposters
===================

Articles  Address
--------  -------

      12  Randal L. Schwartz <merlyn@stonehenge.com>
       5  Uri Guttman <uri@sysarch.com>
       4  David <david_xia@yahoo.com>
       4  OTR Comm <otrcomm***NO-SPAM***@wildapache**NO-SPAM***.net>
       4  "Harley Green" <ep@w3dzine.net>
       4  Tore Nestenius <info@programmersheaven.com>
       3  Tom Phoenix <rootbeer&pfaq*finding*@redcat.com>
       3  mgjv@tradingpost.com.au
       3  dtbaker_dejanews@my-deja.com
       3  "Randy" <r_hao@hotmail.com>


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

Date: Mon, 04 Dec 2000 14:24:29 GMT
From: dtbaker_dejanews@my-deja.com
Subject: Re: Submitting a file via a form
Message-Id: <90g9em$uk5$1@nnrp1.deja.com>

In article <90g4q7$s1i$1@ucsnew1.ncl.ac.uk>,
  "M.I. Planchant" <M.I.Planchant@ncl.ac.uk> wrote:
> I wonder if anyone can help me with a problem that im having. Im
trying to
> create a web page that contains a form. The form has three fields. 2
text and
> one which is of type file.
>
> I have written a perl program which uses a text file such as the one
that would
> be submitted as the source of input. What I need to do, is to run the
cgi
> program when the submit button is clicked on and for the file which
has been submitted
> to be processed and results shown. How do I go about doing this? Ive
done the form post
> stuff for the text fields but how can I do it for the file input?
----------------

try searching perl FAQ pages and this newsgroup for the word "upload".

D


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


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

Date: Mon, 4 Dec 2000 18:36:29 +0100
From: "matteo" <dsdf@sdfd.com>
Subject: Re: term ansi color
Message-Id: <3a2bcfe6@post.usenet.com>

**** Post for FREE via your newsreader at post.usenet.com ****

thanks but it doesn't work

"eriky" <erik.ykema@usa.net> ha scritto nel messaggio
news:wOzW5.32771$lR2.1083581@afrodite.telenet-ops.be...
> should you use
>     device=c:\windows\command\ansi.sys
> in your config.sys?
> erik.ykema@usa.net
>
> "matteo" <dsdf@sdfd.com> wrote in message news:3a2abc25@post.usenet.com...
> > **** Post for FREE via your newsreader at post.usenet.com ****
> >
> > I've tried to usa an example from the perl documentation of
> >
> > term ansi color
> >
> > use Term::ANSIColor;
> >     print color 'bold blue';
> >     print "This text is bold blue.\n";
> >     print color 'reset';
> >     print "This text is normal.\n";
> >     print colored ("Yellow on magenta.\n", 'yellow on_magenta');
> >     print "This text is normal.\n";
> >     use Term::ANSIColor qw(:constants);
> >     print BOLD, BLUE, "This text is in bold blue.\n", RESET;
> >     use Term::ANSIColor qw(:constants);
> >     $Term::ANSIColor::AUTORESET = 1;
> >     print BOLD BLUE "This text is in bold blue.\n";
> >     print "This text is normal.\n";
> >
> >
> > in windows prompt I obtain this (no color, only bw)
> >
> > ?[1;34mThis text is bold blue.
> > ?[0mThis text is normal.
> > ?[33;45mYellow on magenta.
> > ?[0mThis text is normal.
> > ?[1m?[34mThis text is in bold blue.
> > ?[0m?[1m?[34mThis text is in bold blue.
> > ?[0m?[0mThis text is normal.
> >
> > what to do?
> > thanks
> >
> >
> >
> >
> > -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> >  *** Usenet.com - The #1 Usenet Newsgroup Service on The Planet! ***
> >                       http://www.usenet.com
> > -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>
>



-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 *** Usenet.com - The #1 Usenet Newsgroup Service on The Planet! ***
                      http://www.usenet.com
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


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

Date: Mon, 04 Dec 2000 17:57:03 GMT
From: Weston Cann <iowa8_song8.remove_eights@hotmail.com>
Subject: text comparisons -- a la 'diff', but char by char or word by word...
Message-Id: <021220001053037790%iowa8_song8.remove_eights@hotmail.com>

I'm interested in finding a way to do comparisons of two texts and come
up with a list of differences. Not just line by line differences (like
'diff'), but at least word-by-word, and possibly even character by
character. 

One possibility that I thought of was dumping both texts to a file,
but with all words and punctuation on their own lines, and then using
diff. This seems like a possibility, but it doesn't quite get me to the
char-by-char level yet, and besides, I'm thinking there's probably 
something more elegant.

In the end, I'll want to merge both texts, and do something like display
common text in black, and have different colors for text found
exclusively in one piece.

Tools? Tips? Books? URLs?

Thanks,

Weston


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

Date: Mon, 4 Dec 2000 07:22:07 -0700
From: "bowman" <bowman@montana.com>
Subject: Re: Using goto
Message-Id: <sHNW5.2484$NN6.13629@newsfeed.slurp.net>


Ilmari Karonen <iltzu@sci.invalid>
> >>Gotos are "bad" in any language.
> > That sure puts a crimp in assembly language programming....
>
> Well, assuming subroutine calls don't count as gotos, you could always
> write everything recursively..

And if you never branched:

    cmp ax,bx
    jnc foo
    inc bx
foo:

looks like a goto to me. We can dress it up as if...then, next, redo, and so
forth, but mutton dressed like lamb still tastes the same.





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

Date: 4 Dec 2000 14:36:58 GMT
From: abigail@foad.org (Abigail)
Subject: Re: Using goto
Message-Id: <slrn92nb0a.vnu.abigail@tsathoggua.rlyeh.net>

On Sat, 02 Dec 2000 07:26:25 GMT, Shawn Smith (SPAM_loginprompt@yahoo.com) wrote in comp.lang.perl.misc <URL: news:<3a2aa1d2.12800824@netnews.worldnet.att.net>>:
++ On 1 Dec 2000 11:03:12 GMT, abigail@foad.org (Abigail) wrote:
++ 
++ 
++ >Perl programs get compiled each time you run it. The fact there are gotos
++ >in it is irrelevant.
++ 
++ OK.
++ 
++ >If gotos are only used on rare occasions, they can't have much influence
++ >on efficiency, can they? 
++ 
++ True, and since you say gotos do not slow down a Perl script, then
++ even if the errors occurred a lot it would not matter.

I didn't say gotos won't slow down a Perl program. Just a goto won't.
But it all depends on how you use them.

++ >To increase the performance, one focusses on
++ >the bottlenecks, on one some error handling code that isn't called often.
++ 
++ Do you suggest using the profiler?


No, I suggest an analysis.



Abigail


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

Date: Mon, 4 Dec 2000 12:29:37 -0500
From: "Phil R Lawrence" <prlawrence@lehigh.edu>
Subject: which linux for Perl 5.6?
Message-Id: <90gka4$d7k@fidoii.CC.Lehigh.EDU>

I want to choose a linux dist for my desktop, and want one with the current perl
release.  I see the stable debian only has up to 5.004...

I'm concerned that making Perl myself would lead to problems...  I did this
recently on a RH7 laptop and the make seemed to put Perl in a different
directory than RH would have liked.  I'm sure you can customize the making of
Perl to integrate perfectly, but as I'm new to linux I don't think I know enough
to do this!

So, which is the best linux dist for me so I ca play with the latest and
greatest Perl?

Thanks,
Phil




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

Date: Mon, 04 Dec 2000 18:21:45 GMT
From: flint@flintslacker.com (Flint Slacker)
Subject: Re: which linux for Perl 5.6?
Message-Id: <3a2ce07b.12281111@news.tcn.net>


Slackware!

Flint


On Mon, 4 Dec 2000 12:29:37 -0500, "Phil R Lawrence"
<prlawrence@lehigh.edu> wrote:

>I want to choose a linux dist for my desktop, and want one with the current perl
>release.  I see the stable debian only has up to 5.004...
>
>I'm concerned that making Perl myself would lead to problems...  I did this
>recently on a RH7 laptop and the make seemed to put Perl in a different
>directory than RH would have liked.  I'm sure you can customize the making of
>Perl to integrate perfectly, but as I'm new to linux I don't think I know enough
>to do this!
>
>So, which is the best linux dist for me so I ca play with the latest and
>greatest Perl?
>
>Thanks,
>Phil
>



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

Date: Mon, 04 Dec 2000 16:02:47 GMT
From: Derek Ross <dross@iders.ca>
Subject: Why doesn't this work (file handles as strings)
Message-Id: <3A2BBF91.7F3@iders.ca>

Hello,

Can anyone tell my why this example doesn't work?

It's trying to access the filehandle DATA as a string in an
array. It works ok if its accessed directly as <DATA>, or as
as scalar, as <$b> where $b="DATA", but it fails if accessed
as <$c[0]> where $c[0]="DATA".

Any help would be appreciated.

Derek.

-----------------------------
$b="DATA";
@c=("DATA");

$a = <DATA>;
print "$a\n";
$a = <$b>;
print "$a\n";
$a = <$c[0]>;
print "$a\n";

__DATA__
10
20
30
40
-------------------------------

The output is:
10
20
DATA

Derek Ross


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

Date: Mon, 04 Dec 2000 16:55:55 GMT
From: rgarciasuarez@free.fr (Rafael Garcia-Suarez)
Subject: Re: Why doesn't this work (file handles as strings)
Message-Id: <slrn92nj6f.sq1.rgarciasuarez@rafael.kazibao.net>

Derek Ross wrote in comp.lang.perl.misc:
> Hello,
> 
> Can anyone tell my why this example doesn't work?
> 
> It's trying to access the filehandle DATA as a string in an
> array. It works ok if its accessed directly as <DATA>, or as
> as scalar, as <$b> where $b="DATA", but it fails if accessed
> as <$c[0]> where $c[0]="DATA".

The answer is given in perlop, section on I/O operators :

   ...
   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.
   ...

-- 
# Rafael Garcia-Suarez / http://rgarciasuarez.free.fr/


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

Date: Mon, 4 Dec 2000 11:11:16 -0600
From: "Neil Trenholm" <neil@alaweb.com>
Subject: Win32::API and EnumChildWindows
Message-Id: <t2njtd39trm175@corp.supernews.com>

I am wondering if anyone here has used EnumChildWindows with the Win32::API
module. I have been attempting to get it working for a few days now ...
reading FAQ's ... docs... MSDN .... etc etc...

I am using Win32::Setupsup;Win32::API::Prototype and Win32::API - depending
on how "low" in the API I need to go - no need to reinvent the wheel !

I can get the handle to the (parent) window that I need to access through
Win32::Setupsup::WaitForWindow() - but need access to the buttons (etc) in
this window.

My problems basically boil down to :

1.)How do I implement the callback proc in EnumChildWindows ? (ie- is it
just the same as a standard perl callback - a reference to the sub)

2.)When I send 3 parameters off to the EnumChildWindows - I get a msg saying
that it only expected 2. But he docs specifically call for 3. This is giving
me fits.....

3.)Trying to learn Win32API programming overnight - with coffee, nicotine
and sleeplessness as my supports :-)

I am not asking for a straight up solution .... if anyone can point me to a
GOOD perl-win reference - that would be wonderful ...

but ... if anyone has experience in this area and  can pass along pointers
that will shorten my learning curve - I won't turn em down either ;-)

Many thanks in advance,
Neil




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

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


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