Re: Need help on AoH or array or any other think that might help!

Tim Greer <tim@xxxxxxxxxxxxx> wrote:
Hans Mulder wrote:

Jürgen Exner wrote:
"J. Gleixner" <glex_no-spam@xxxxxxxxxxxxxxxxxxxxx> wrote:
Tim Greer wrote:

foreach my $el (<FILE)>) {
^^^ You should always copy and paste your actual code you're using.
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 ();
-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

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/"