True. It could get hairy. Unicode is a pretty vast landscape, and I think
if you only want ASCII word characters to count as things that could be in
a filename, your original [A-Za-z0-9_] is your best bet. Thanks to the
others for their comments. As Ken says: there are probably more ways to
code th
*predefined
On Sat, Nov 5, 2016, 10:27 AM Aaron Wells wrote:
> Hi Jovan. \w is a presidents character classes that is equivalent to
> [A-Za-z0-9_], so this works also:
> m/^\w+$/
>
> On Sat, Nov 5, 2016, 10:24 AM Jovan Trujillo
> wrote:
>
> Ah, I figured it out.
>
Hi Jovan. \w is a presidents character classes that is equivalent to
[A-Za-z0-9_], so this works also:
m/^\w+$/
On Sat, Nov 5, 2016, 10:24 AM Jovan Trujillo
wrote:
> Ah, I figured it out.
> m/^[A-Za-z0-9_]+$/ works because it will only match if the entire string
> follows the pattern. Thanks!
>
Hi Klaus,
Have you tried this?
ref $some_obj; # should give your class name as a string
Doubtless Uri will find something wrong with this 😋
On Thu, Sep 29, 2016, 12:34 PM Klaus Jantzen
wrote:
> Hello,
>
> I have defined Moose-classes with various attributes.
>
> During the execution of a progr
@Jim,
That eval bit i think Nathalie got from me. I need to review my core Perl. I
think i’m in the habit of assuming Perl warns against any usage of undefined
values, even in boolean context. Not so. I’ve proven to myself that this is not
the case:
$ perl -E’
>my ($foo, $bar); # these aren’t
Hi there,
Me again. The sort function does NOT default to <=>. It defaults to string
comparison order. See the Perl doc for sort:
"If SUBNAME or BLOCK is omitted, sorts in standard string comparison
order. "
So assuming you want numbers sorting, 'sort { $a <=> $b } keys %{$nameref}'
would be the
Ha. Java has one... but it's not very pretty. Just like anything Java, it's
bloated, overly verbose, and clunky. Java just discovered "lambdas" a
couple years ago with jdk 8. But functional languages have had lambda
syntax for years.
Ocaml: List.map((*) 2)[1;2;3;4;5]
Haskell: map (2*)[1,2,3,4,5]
Thank you Lee. I had forgotten about that use case. I tried to do dibasic
query building once upon a time with JavaScript before discovering the
goodness of Perl. Ended up leaning on a library. It made things better, but
it didn't make them Perl.
On Thu, May 12, 2016, 5:06 PM lee wrote:
>
> ...
Hi Kenneth,
Welcome aboard (for the nth time)!
The replies on this thread have been helpful, but they haven’t really addressed
the underlying issue, which is that there’s subscripting, then there’s
dereferencing. I’ll try to keep my explanation brief, but first a solution:
$confused = [
bl