On Mon May 14 14:07:44 2012, uri@stemsystems.com wrote:
> On 05/14/2012 04:46 PM, Father Chrysostomos via RT wrote:
>
> <offlist>
>
> >
> > Donât tell anyone I said this (oops! is this list public? :-), but
> you
> > can omit the qw if you use angle brackets as the delimeter, if you
> think
> > qw is too ugly:
> >
> > $hash{<foo bar baz>}
> >
> > Itâs actually using the glob operator, which splits the pattern on
> > spaces, and returns each segment that contains no metacharacters
> unchanged.
>
> wouldn't that be really slow as glob has to read the dir to see if
> there
> are files with those names? maybe it won't as there are no metachars
Your latter statement is correct. In fact, in 5.16, once File::Glob is
loaded, glob should be about the same speed as split.
> (i
> never use glob - read_dir from file::slurp is my friend). also i think
> that would trigger pseudo multilevel hashes (using $; as the token
> separator) and i doubt that is wanted.
I meant @hash{...}, not $hash{...}.
>
> besides all this, linda w seems to be wacko. not understanding => and
> wanting multiple token quoting? and how hard is qw() to type? jeez.
Well @hash{<foo bar>} looks prettier than @hash{qw<foo bar>}, doesnât it?
--
Father Chrysostomos
---
via perlbug: queue: perl5 status: rejected
https://rt.perl.org:443/rt3/Ticket/Display.html?id=112914
Thread Previous
|
Thread Next