[30693] in Perl-Users-Digest
Perl-Users Digest, Issue: 1938 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Oct 22 00:09:43 2008
Date: Tue, 21 Oct 2008 21:09:10 -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 Tue, 21 Oct 2008 Volume: 11 Number: 1938
Today's topics:
Re: accessing single characters of strings <jurgenex@hotmail.com>
Apache2 mod_perl, missing File.pm, cant use Compress <h.banko@gmail.com>
Re: Help: How to install a *.pm module <hansmu@xs4all.nl>
Re: Help: How to install a *.pm module <joost@zeekat.nl>
Re: Help: How to install a *.pm module <tadmc@seesig.invalid>
IDE with Class Browser for Perl <saragwyn@yahoo.com>
Re: Need help on AoH or array or any other think that m <hansmu@xs4all.nl>
Re: Need help on AoH or array or any other think that m <tim@burlyhost.com>
Re: Need help on AoH or array or any other think that m <jurgenex@hotmail.com>
Re: Need help on AoH or array or any other think that m <tadmc@seesig.invalid>
Re: Need help on AoH or array or any other think that m <tim@burlyhost.com>
Re: Need help on AoH or array or any other think that m <tadmc@seesig.invalid>
Re: Need help on AoH or array or any other think that m <tim@burlyhost.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 21 Oct 2008 17:18:16 -0700
From: Jürgen Exner <jurgenex@hotmail.com>
Subject: Re: accessing single characters of strings
Message-Id: <j4ssf4llbrf2sml9r6p1aqp1ctuab74ec9@4ax.com>
Marten Lehmann <lehmannmapson@cnm.de> wrote:
>how can I access a single character of a string in Perl like I can do it
>in C with text[10]? I don't want to split it up and work on an array.
>How can I work directly in place?
substr() is the function you are looking for.
However I very strongly recommend that you change your mental model.
Perl strings are _NOT_ arrays of characters. That primitive model is
adaquate for C. Perl strings are much more powerful and if you use them
like you would use arrays of characters in C, then you are missing most
of their functionality.
jue
------------------------------
Date: Tue, 21 Oct 2008 19:49:30 -0700 (PDT)
From: Holger Banko <h.banko@gmail.com>
Subject: Apache2 mod_perl, missing File.pm, cant use Compress
Message-Id: <332a5d4b-c70a-442b-97cb-f979962d509b@r38g2000prr.googlegroups.com>
I am trying to migrate a website from mod_perl1.0 to mod_perl2.0 and I
am a complete noob when it comes to Perl. I got already stuck with pre-
loading of the Compress Module. In my Apache configuration it looks
like this
PerlModule Apache::DBI
PerlModule Apache2::Filter
PerlModule Apache::Compress
The DBI and Filter module are not complaining, but the Compress.pm is
missing File.pm
Wed Oct 22 01:49:54 2008] [error] Can't locate Apache/File.pm in @INC
(@INC contains: /etc/perl /usr/local/lib/perl/5.8.8 /usr/local/share/
perl/5.8.8 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/
share/perl/5.8 /usr/local/lib/site_perl . /etc/apache2) at /usr/local/
share/perl/5.8.8/Apache/Compress.pm line 5.\nBEGIN failed--compilation
aborted at /usr/local/share/perl/5.8.8/Apache/Compress.pm line
5.\nCompilation failed in require at (eval 6) line 3.\n
[Wed Oct 22 01:49:54 2008] [error] Can't load Perl module
Apache::Compress for server holgerdev2:0, exiting...
Trying to be smart, I used cpan:
install Apache::File
But it fails, because File.pm is looking for Apache 1.3 source, so not
really helpful for Apache2. An Apache2::File is not available.
I checked the migration guide and found this
Apache::File
"The methods from mod_perl 1.0's module Apache::File have been either
moved to other packages or removed."
Yes? To which packages? How can I get Compress to work or is there a
set of Apache2 perl modules?
Help :-)
Holger
------------------------------
Date: Tue, 21 Oct 2008 23:27:15 +0200
From: Hans Mulder <hansmu@xs4all.nl>
Subject: Re: Help: How to install a *.pm module
Message-Id: <48fe49f8$0$198$e4fe514c@news.xs4all.nl>
Amy Lee wrote:
> Anyway, how can I know @INC contents?
One technique is to type on the command line:
perl -Mxxxxx -e0
Perl will tell you that it cannot find a module named xxxxx in @INC;
it will also tell you the contents of @INC.
Hope this helps,
-- HansM
------------------------------
Date: Wed, 22 Oct 2008 00:22:14 +0200
From: Joost Diepenmaat <joost@zeekat.nl>
Subject: Re: Help: How to install a *.pm module
Message-Id: <87iqrlfv1l.fsf@zeekat.nl>
Hans Mulder <hansmu@xs4all.nl> writes:
> Amy Lee wrote:
>
>> Anyway, how can I know @INC contents?
>
> One technique is to type on the command line:
>
> perl -Mxxxxx -e0
>
> Perl will tell you that it cannot find a module named xxxxx in @INC;
> it will also tell you the contents of @INC.
I really prefer
perl -le 'print for @INC'
--
Joost Diepenmaat | blog: http://joost.zeekat.nl/ | work: http://zeekat.nl/
------------------------------
Date: Tue, 21 Oct 2008 19:58:41 -0500
From: Tad J McClellan <tadmc@seesig.invalid>
Subject: Re: Help: How to install a *.pm module
Message-Id: <slrngfsum1.eep.tadmc@tadmc30.sbcglobal.net>
Joost Diepenmaat <joost@zeekat.nl> wrote:
> Hans Mulder <hansmu@xs4all.nl> writes:
>
>> Amy Lee wrote:
>>
>>> Anyway, how can I know @INC contents?
>>
>> One technique is to type on the command line:
>>
>> perl -Mxxxxx -e0
>>
>> Perl will tell you that it cannot find a module named xxxxx in @INC;
>> it will also tell you the contents of @INC.
>
> I really prefer
>
> perl -le 'print for @INC'
I prefer:
perl -V
--
Tad McClellan
email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"
------------------------------
Date: Tue, 21 Oct 2008 18:12:38 -0700 (PDT)
From: saragwyn <saragwyn@yahoo.com>
Subject: IDE with Class Browser for Perl
Message-Id: <82675cc6-8b41-4b63-b4f4-b46c2ebfc6b1@v16g2000prc.googlegroups.com>
Hi all -
Our group is getting ready to dive into a massive refactor of our Perl
app and were hoping to find a tool to more easily move up and down the
class hierarchy (especially to find all the matching functions within
base classes and subclasses).
Does anyone know of a Perl IDE that has any of that functionality?
Komodo 4.4 does not seem to do any class browsing for Perl.
Thanks
-Sara
------------------------------
Date: Wed, 22 Oct 2008 01:02:43 +0200
From: Hans Mulder <hansmu@xs4all.nl>
Subject: Re: Need help on AoH or array or any other think that might help!
Message-Id: <48fe6057$0$201$e4fe514c@news.xs4all.nl>
Jürgen Exner wrote:
> "J. Gleixner" <glex_no-spam@qwest-spam-no.invalid> wrote:
>> Tim Greer wrote:
>
>>>> foreach my $el (<FILE)>) {
>>> ^^^ You should always copy and paste your actual code you're using. The
>>> above is broken: (<FILE)>)
>> Define 'broken'. It's not good code (OP use 'while' instead
>> of foreach), but it will run.
>
> It doesn't even parse (Tim pointed it out verbatim). I guess that
> qualifies as broken by any sensible definition of broken.
It does parse: it's a file name glob. It doesn't contain any globbing
metacharacters, so it would be more efficient to write it as ('FILE)').
(Assuming you really want to loop over an array containing a single
constant string.)
I think a pragma disabling this meaning of the <> operator would be a
very good idea.
Hope this helps,
-- HansM
------------------------------
Date: Tue, 21 Oct 2008 16:59:01 -0700
From: Tim Greer <tim@burlyhost.com>
Subject: Re: Need help on AoH or array or any other think that might help!
Message-Id: <f1uLk.12825$Ai5.8011@newsfe13.iad>
Hans Mulder wrote:
> Jürgen Exner wrote:
>> "J. Gleixner" <glex_no-spam@qwest-spam-no.invalid> wrote:
>>> Tim Greer wrote:
>>
>>>>> foreach my $el (<FILE)>) {
>>>> ^^^ You should always copy and paste your actual code you're using.
>>>> The
>>>> above is broken: (<FILE)>)
>>> Define 'broken'. It's not good code (OP use 'while' instead
>>> of foreach), but it will run.
>>
>> It doesn't even parse (Tim pointed it out verbatim). I guess that
>> qualifies as broken by any sensible definition of broken.
>
> It does parse:
It does not (it might without warnings, but it shouldn't otherwise, and
I seriously doubt this is what the OP wanted regarding results it would
have if you did run it). Yes, it will run (if you technically call it
running) assuming you don't have warnings enabled, and it will spit out
"FILE)" and end if you were just to output it (by the looks of it, as I
have no reason to run broken code to prove what it'll do). Either way,
it certainly wouldn't have the data it expected or to split on an
actual pipe (assuming that portion of the code is fixed, too).
> it's a file name glob.
No, it's not. They opened a file with open(), and then did a loop on the
filehandle (FILE) and you assume it's a file name glob? I doubt it and
I doubt that's what the OP was intending. I can only assume you didn't
see the original post this was in response to, so I'll not go further
into this.
> It doesn't contain any globbing
> metacharacters,
Because it's not a glob.
> so it would be more efficient to write it as
> ('FILE)'). (Assuming you really want to loop over an array containing
> a single constant string.)
>
> I think a pragma disabling this meaning of the <> operator would be a
> very good idea.
>
Yikes... anyway...
Okay, so to end this discussion (I'm sorry I said anything at all), here
was the full (relevant) code piece they had posted (I'm copying and
pasting it below):
open (FILE, $file) || die ("Could not open file. $!");
foreach my $el (<FILE)>) {
  ($name, $category, $item, $price) = split ("|", $el);
   my %s = (
          'name'=>$name,
          'product'=>$category,
          'item'=>$item,
          'price'=>$$price,
       );
...
 }
...
You surely see the problem with (<FILE)>) now, right? As well as
split ("|", $el), I'm sure. I'll end that here, since I believe you
understand the issue now that you've seen the code this was in response
to.
--
Tim Greer, CEO/Founder/CTO, BurlyHost.com, Inc.
Shared Hosting, Reseller Hosting, Dedicated & Semi-Dedicated servers
and Custom Hosting. 24/7 support, 30 day guarantee, secure servers.
Industry's most experienced staff! -- Web Hosting With Muscle!
------------------------------
Date: Tue, 21 Oct 2008 17:22:24 -0700
From: Jürgen Exner <jurgenex@hotmail.com>
Subject: Re: Need help on AoH or array or any other think that might help!
Message-Id: <7gssf45g3bndfpggkfsar51rtrrobth5h2@4ax.com>
Hans Mulder <hansmu@xs4all.nl> wrote:
>Jürgen Exner wrote:
>> "J. Gleixner" <glex_no-spam@qwest-spam-no.invalid> wrote:
>>> Tim Greer wrote:
>>
>>>>> foreach my $el (<FILE)>) {
>> It doesn't even parse (Tim pointed it out verbatim). I guess that
>> qualifies as broken by any sensible definition of broken.
>
>It does parse: it's a file name glob. It doesn't contain any globbing
I'll be damned, you are right!
jue
------------------------------
Date: Tue, 21 Oct 2008 20:11:35 -0500
From: Tad J McClellan <tadmc@seesig.invalid>
Subject: Re: Need help on AoH or array or any other think that might help!
Message-Id: <slrngfsve7.eep.tadmc@tadmc30.sbcglobal.net>
Tim Greer <tim@burlyhost.com> wrote:
> Hans Mulder wrote:
>
>> Jürgen Exner wrote:
>>> "J. Gleixner" <glex_no-spam@qwest-spam-no.invalid> wrote:
>>>> Tim Greer wrote:
>>>
>>>>>> foreach my $el (<FILE)>) {
>>>>> ^^^ You should always copy and paste your actual code you're using.
>>>>> The
>>>>> above is broken: (<FILE)>)
>>>> Define 'broken'. It's not good code (OP use 'while' instead
>>>> of foreach), but it will run.
>>>
>>> It doesn't even parse (Tim pointed it out verbatim). I guess that
>>> qualifies as broken by any sensible definition of broken.
>>
>> It does parse:
>
> It does not
It does:
perl -MO=Deparse -e '(<FILE)>)'
use File::Glob ();
glob('FILE)');
-e syntax OK
> I seriously doubt this is what the OP wanted
That part is probably correct though.
>> it's a file name glob.
>
> No, it's not.
Yes it is.
It was not *meant* to be a file name glob, but the typo it contains
just happens to result in a valid syntax.
> They opened a file with open(), and then did a loop on the
> filehandle (FILE) and you assume it's a file name glob?
There is no need to assume. We can simply ask perl, as above.
> I doubt it and
Everybody gets to be wrong once in a while, now is your turn, I guess.
> I doubt that's what the OP was intending. I can only assume you didn't
> see the original post this was in response to, so I'll not go further
> into this.
Thank heavens!
>> It doesn't contain any globbing
>> metacharacters,
>
> Because it's not a glob.
Yes it is.
> You surely see the problem with (<FILE)>) now, right?
He was not commenting on the problem with (<FILE)>), so
that is not relevant.
He was commenting on the "doesn't even parse" statement, as it
clearly *does* parse.
--
Tad McClellan
email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"
------------------------------
Date: Tue, 21 Oct 2008 18:55:04 -0700
From: Tim Greer <tim@burlyhost.com>
Subject: Re: Need help on AoH or array or any other think that might help!
Message-Id: <_JvLk.2052$I8.1954@newsfe03.iad>
Tad J McClellan wrote:
> Tim Greer <tim@burlyhost.com> wrote:
>> Hans Mulder wrote:
>>
>>> Jürgen Exner wrote:
>>>> "J. Gleixner" <glex_no-spam@qwest-spam-no.invalid> wrote:
>>>>> Tim Greer wrote:
>>>>
>>>>>>> foreach my $el (<FILE)>) {
>>>>>> ^^^ You should always copy and paste your actual code you're
>>>>>> using.
>>>>>> The
>>>>>> above is broken: (<FILE)>)
>>>>> Define 'broken'. It's not good code (OP use 'while' instead
>>>>> of foreach), but it will run.
>>>>
>>>> It doesn't even parse (Tim pointed it out verbatim). I guess that
>>>> qualifies as broken by any sensible definition of broken.
>>>
>>> It does parse:
>>
>> It does not
>
>
> It does:
>
> perl -MO=Deparse -e '(<FILE)>)'
>
> use File::Glob ();
> glob('FILE)');
> -e syntax OK
It does not parse, with warnings enabled, in the code the OP posted.
Yes, of course it _parses_ when you take it out of context. And yes,
when you take it out of context, it *is* a glob. Of course, I was
saying it was invalid and broken in regard to their own code they
posted. Replying and taking that out of context saying that one single
part of code does parse, is kind of a weak argument (and I don't see
the reason for an argument).
>
>> I seriously doubt this is what the OP wanted
>
>
> That part is probably correct though.
You think?
>
>>> it's a file name glob.
>>
>> No, it's not.
>
>
> Yes it is.
Yeah, but not _intentionally_ and _not_ in the code the OP posted. Yes,
it _is_ an unintentional glob in their code, which (when in their code)
doesn't parse.
> It was not *meant* to be a file name glob,
Exactly, and just saying it is not incorrect code and parses, all
because that's how it reads from a typo in the OP's code, is hardly
reason to call it what it _could_ be if taken out of context. If you
want to sarcastically say "but it is" for that reason, then so be it,
but I don't see the point and it absolutely doesn't apply to what I
said in direct response to their posted code.
> but the typo it contains
> just happens to result in a valid syntax.
Right. And, like I said, in their code it's broken and their intention
was not to have a glob. Why do you feel the need to argue about it?
>
>> They opened a file with open(), and then did a loop on the
>> filehandle (FILE) and you assume it's a file name glob?
>
>
> There is no need to assume. We can simply ask perl, as above.
Yeah, so "ask perl" by using their originally posted code, as is. Then,
for to endless sake of making a point about a portion of code taken out
of context to prove a trivial and irrlevant point, please post and tell
me I'm wrong and that it does parse. Yeah, no kidding, when you take
it out of the broken code and apply it in a manner which you can
rightfully call it a glob and make it parse. Are you bored?
>
>> I doubt it and
>
>
> Everybody gets to be wrong once in a while, now is your turn, I guess.
Everyone has someone attack them and accuse them of being wrong on this
newsgroup without provocation once in a while, now it is my turn, I
guess.
>
>> I doubt that's what the OP was intending. I can only assume you
>> didn't see the original post this was in response to, so I'll not go
>> further into this.
>
>
> Thank heavens!
Indeed, we can't have someone make a relevant point about the actual
reply they made, else you might not be able to find a reason to mock
someone here for no reason. It's not that I don't appreciate your
efforts, and please excuse me for trying to be a part of this newgroup
by showing respect and posting relevant replies, only to have a regular
rip into me for it, all for the sake of what, exactly? What explains
this attitude? Once again, my reply was correct and relevant to the
OPs code, I didn't say that the same code (taken out of context)
couldn't be technically something else or parse, now did I? Have I
done something to offend you?
>
>>> It doesn't contain any globbing
>>> metacharacters,
>>
>> Because it's not a glob.
>
>
> Yes it is.
Due to a typo and that was the _point_ of asking the OP to post the
actual code used, because none of this is relevant other than egoism
and nitpicking about a matter that is nothing more than a typo. Big
deal if it turned out to be a glob because of a typo, it wouldn't have
worked in their code, and it wouldn't parse. Talk about circular
logic! There's really just no way out of this, because it's easier to
just dismiss the historical and logical path the thread here took.
Fine.
>
>> You surely see the problem with (<FILE)>) now, right?
>
>
> He was not commenting on the problem with (<FILE)>), so
> that is not relevant.
He was commenting in response to my statement that the code was broken
(which it is), and regardless of what you want to take out of context
to argue a trivial point, I reiterated to him how it actually would
_not_ parse. I never argued that, if taken out of context, that it
couldn't be a glob (or wasn't), I said it wasn't in what the user
intended.
> He was commenting on the "doesn't even parse" statement, as it
> clearly *does* parse.
But, it _doesn't_ parse -- not in the code the OP posted. Twist it
anyway you want, but that's all I said (because the reply was in regard
to that and that is what my follow-up was about). If you want to take
it out of context or find a way to make it fit, fine, but for the code
the OP posted, it _does not_ parse
That's all I said (in regard to that, not him taking a portition of code
out of context to say it's not broken, when it clearly is). If someone
can't point out the obvious brokenness in the code someone posts and
ask them to please post the actual code without this sort of nonsense,
then why even pretend you have any respect for anyone else here?
--
Tim Greer, CEO/Founder/CTO, BurlyHost.com, Inc.
Shared Hosting, Reseller Hosting, Dedicated & Semi-Dedicated servers
and Custom Hosting. 24/7 support, 30 day guarantee, secure servers.
Industry's most experienced staff! -- Web Hosting With Muscle!
------------------------------
Date: Tue, 21 Oct 2008 21:28:33 -0500
From: Tad J McClellan <tadmc@seesig.invalid>
Subject: Re: Need help on AoH or array or any other think that might help!
Message-Id: <slrngft3uh.eng.tadmc@tadmc30.sbcglobal.net>
Tim Greer <tim@burlyhost.com> wrote:
> Tad J McClellan wrote:
>
>> Tim Greer <tim@burlyhost.com> wrote:
>>> Hans Mulder wrote:
>>>
>>>> Jürgen Exner wrote:
>>>>> "J. Gleixner" <glex_no-spam@qwest-spam-no.invalid> wrote:
>>>>>> Tim Greer wrote:
>>>>>
>>>>>>>> foreach my $el (<FILE)>) {
>>>>>>> ^^^ You should always copy and paste your actual code you're
>>>>>>> using.
>>>>>>> The
>>>>>>> above is broken: (<FILE)>)
>>>>>> Define 'broken'. It's not good code (OP use 'while' instead
>>>>>> of foreach), but it will run.
>>>>>
>>>>> It doesn't even parse (Tim pointed it out verbatim). I guess that
>>>>> qualifies as broken by any sensible definition of broken.
>>>>
>>>> It does parse:
>>>
>>> It does not
>>
>>
>> It does:
>>
>> perl -MO=Deparse -e '(<FILE)>)'
>>
>> use File::Glob ();
>> glob('FILE)');
>> -e syntax OK
>
> It does not parse, with warnings enabled, in the code the OP posted.
warnings have no effect on compilation.
If it parses with warnings enabled, it will parse without warnings enabled.
If it does not parse with warnings enabled, it will not parse without
warnings enabled.
> Yes, of course it _parses_ when you take it out of context.
It (the 1st foreach loop) parses even when in context.
--------------------------
temp> perl -MO=Deparse <<'ENDCODE'
> my %inventory;
> open (FILE, $file) || die ("Could not open file. $!");
> foreach my $el (<FILE)>) {
> ($name, $category, $item, $price) = split ("|", $el);
> my %s = (
> 'name'=>$name,
> 'product'=>$category,
> 'item'=>$item,
> 'price'=>$$price,
> );
> push @arr, \%s;
> }
> ENDCODE
my %inventory;
die "Could not open file. $!" unless open FILE, $file;
use File::Glob ();
foreach my $el (glob('FILE)')) {
($name, $category, $item, $price) = split(/|/, $el, 5);
my(%s) = ('name', $name, 'product', $category, 'item', $item, 'price', $$price);
push @arr, \%s;
}
- syntax OK
--------------------------
"syntax OK" means it did parse successfully.
[ There is a syntax error in the 2nd foreach loop that the OP posted
(an "=>" instead of an "->").
]
> Yes,
> it _is_ an unintentional glob in their code,
We are all in agreement then. Good.
> If you
> want to sarcastically say "but it is" for that reason, then so be it,
I meant no sarcasm. Honestly.
Whether it parses or not is not a matter of opinion, you submit
the tokens to the parser, if the parser accepts it, then it
has been parsed successfully.
>> but the typo it contains
>> just happens to result in a valid syntax.
>
> Right. And, like I said, in their code it's broken and their intention
> was not to have a glob. Why do you feel the need to argue about it?
You said:
Invalid syntax, as shown above -> (<FILE)>)
but that _is_ valid syntax.
I am not arguing about it.
I am trying to repair an incorrect statement.
> Yeah, so "ask perl" by using their originally posted code, as is.
See above.
> Everyone has someone attack them and accuse them of being wrong on this
> newsgroup without provocation once in a while, now it is my turn, I
> guess.
I am not attacking you.
I am attacking the incorrect statement that you made.
> Once again, my reply was correct
The one I've quoted above was not correct.
I corrected it.
--
Tad McClellan
email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"
------------------------------
Date: Tue, 21 Oct 2008 20:06:22 -0700
From: Tim Greer <tim@burlyhost.com>
Subject: Re: Need help on AoH or array or any other think that might help!
Message-Id: <PMwLk.12529$YN3.11062@newsfe12.iad>
Tad J McClellan wrote:
> Tim Greer <tim@burlyhost.com> wrote:
>> Tad J McClellan wrote:
>>
>>> Tim Greer <tim@burlyhost.com> wrote:
>>>> Hans Mulder wrote:
>>>>
>>>>> Jürgen Exner wrote:
>>>>>> "J. Gleixner" <glex_no-spam@qwest-spam-no.invalid> wrote:
>>>>>>> Tim Greer wrote:
>>>>>>
>>>>>>>>> foreach my $el (<FILE)>) {
>>>>>>>> ^^^ You should always copy and paste your actual code you're
>>>>>>>> using.
>>>>>>>> The
>>>>>>>> above is broken: (<FILE)>)
>>>>>>> Define 'broken'. It's not good code (OP use 'while' instead
>>>>>>> of foreach), but it will run.
>>>>>>
>>>>>> It doesn't even parse (Tim pointed it out verbatim). I guess that
>>>>>> qualifies as broken by any sensible definition of broken.
>>>>>
>>>>> It does parse:
>>>>
>>>> It does not
>>>
>>>
>>> It does:
>>>
>>> perl -MO=Deparse -e '(<FILE)>)'
>>>
>>> use File::Glob ();
>>> glob('FILE)');
>>> -e syntax OK
>>
>> It does not parse, with warnings enabled, in the code the OP posted.
>
>
> warnings have no effect on compilation.
Right, okay, so then his code wasn't broken in your view. I don't
really know how to respond to that, but whatever means you wish to use
to make your point...
> If it parses with warnings enabled, it will parse without warnings
> enabled.
>
> If it does not parse with warnings enabled, it will not parse without
> warnings enabled.
Okay, poor choice of words. Yeah, it'll "parse". Still, broken is
broken.
>
>> Yes,
>> it _is_ an unintentional glob in their code,
>
>
> We are all in agreement then. Good.
>
>
>> If you
>> want to sarcastically say "but it is" for that reason, then so be it,
>
>
> I meant no sarcasm. Honestly.
>
> Whether it parses or not is not a matter of opinion, you submit
> the tokens to the parser, if the parser accepts it, then it
> has been parsed successfully.
I fully understand that Perl doesn't know what the user wants. All I
said was his code was broken, and you're right, it will parse.
>
>>> but the typo it contains
>>> just happens to result in a valid syntax.
>>
>> Right. And, like I said, in their code it's broken and their
>> intention
>> was not to have a glob. Why do you feel the need to argue about it?
>
>
> You said:
>
> Invalid syntax, as shown above -> (<FILE)>)
>
> but that _is_ valid syntax.
>
> I am not arguing about it.
>
> I am trying to repair an incorrect statement.
Fair enough.
>
>> Yeah, so "ask perl" by using their originally posted code, as is.
>
>
> See above.
>
>
>> Everyone has someone attack them and accuse them of being wrong on
>> this newsgroup without provocation once in a while, now it is my
>> turn, I guess.
>
>
> I am not attacking you.
>
> I am attacking the incorrect statement that you made.
Fine. My point was that it was broken code. The word I used later to
describe in what way it was broken was not an accurate statement.
>
>> Once again, my reply was correct
>
>
> The one I've quoted above was not correct.
>
> I corrected it.
>
Some people need a better sense of humor.
--
Tim Greer, CEO/Founder/CTO, BurlyHost.com, Inc.
Shared Hosting, Reseller Hosting, Dedicated & Semi-Dedicated servers
and Custom Hosting. 24/7 support, 30 day guarantee, secure servers.
Industry's most experienced staff! -- Web Hosting With Muscle!
------------------------------
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 V11 Issue 1938
***************************************