ust missing
the correct syntax, or if there is a bug in Rakudo.
Either way, there are docs and tests that need to be added.
EOUTOFTIME, this email stands alone, no bugs filed.
—
Bruce Gray (Util of PerlMonks)
roduced a point of confusion.
In Perl 5 and Perl 6, double-colons are a namespace separator.
The module Audio::Taglib::Simple is a single module, but can be thought of as
"the Simple module, of possibly-a-bunch-of Taglib modules, of the overall
family of Audio modules".
In the same way
6.org/routine/combinations
# --
# Hope this helps,
# Bruce Gray (Util of PerlMonks)
).map: -> \p2 { p1, p2 }
}
I mention it because I had not though to use .skip for this purpose until today.
> thank you very much.
You are very welcome.
—
Bruce Gray (Util of PerlMonks)
LES, which defaults
to $*IN in the absence of any filenames.
For example:
perl6 -e 'say .join("\t") for lines().rotor(4);' path/to/file.txt
Hmmm. I would expect that to be in the Perl 5 to Perl 6 Migration Guides, but I
do not see it there.
—
Hope this helps,
Bruce Gray (Util of PerlMonks)
d gobbling block
and when it tries to parse the block for the if-statement, it doesn't
find one:
Missing block (apparently claimed by 'random-choice')
—
Hope this helps,
Bruce Gray (Util of PerlMonks)
do not treat `.flat` the same way. E.g.:
$ perl6 -e 'say (, ).flat.elems'
3
$ perl6 -e 'say [, ].flat.elems'
2
Full answer coming when time allows. For such a small fix, it was surprisingly
effortful to figure out.
See https://docs.perl6.org/language/list#Itemization
—
Hope this helps,
Bruce Gray (Util of PerlMonks)
sted above, I get
this output:
A
2
3
B
2
3
The first key of each second level is missing, which differs from your sample
output above.
Have I corrupted your Awk code, or have I misunderstood something, or what?
--
Thank you,
Bruce Gray (Util of PerlMonks)
> On Nov 22, 2019, at 9:57 AM, Marc Chantreux wrote:
>
> On Fri, Nov 22, 2019 at 06:20:51AM -0800, William Michels via perl6-users
> wrote:
>> Hi Marc, I did a search for 'semicolon' on the following page and
>> found the interesting text below. Semicolons are used to create
>> multidimension
config.json
{
"baz": "quxx",
"foo": "bar”
}
$ perl6 -e 'use Config::JSON; my %c; %c{$_} = jconf($_) for ; say
%c{$_} for ;'
bar
quxx
$ cat b.dat
foo = bar
baz = quxx
$ perl6 -e 'use Config::Tiny:from; my $conf =
Config::Tiny.read("b.dat"); .say for $conf<_>'
bar
quxx
—
Hope this helps,
Bruce Gray (Util of PerlMonks)
oint of the result.
Exact code here:
https://rosettacode.org/wiki/Integer_roots#Raku
—
Hope this helps,
Bruce Gray (“Util” on RosettaCode, too)
> On May 14, 2020, at 4:36 PM, ToddAndMargo via perl6-users
> wrote:
>
> On 2020-05-14 08:13, Bruce Gray wrote:
>>> On May 14, 2020, at 7:27 AM, ToddAndMargo via perl6-users
>>> wrote:
>>>
>>> Hi All,
>>>
>>> 1) how do I g
#x27;;
time_it(2);
Output:
Bindata in 8.207297
Bindata in 8.12964
Bindata in 8.0798136
Bindata in 3.434386
Bindata in 3.4062148
Bindata in 3.35743893
—
Hope this helps,
Bruce Gray (Util of PerlMonks)
> On Jun 16, 2020, at 5:17 PM, David Santiago wrote:
>
l.so;
printf "%12s: level: %-2d origin: %3s\n", .key, .value for
%inner_joined_monsters.sort;
Produces:
godzilla => ${:level(9), :origin("jp")}
gremlin => ${:level(3), :origin(Any)}
hanuman => ${:level(5), :origin("il")}
tingler => ${:level(Any), :origin("us")}
godzilla: level: 9 origin: jp
hanuman: level: 5 origin: il
—
Hope this helps,
Bruce Gray (Util of PerlMonks)
pre-increment allows you to
specify the line numbers with the more natural numbering:
raku -ne '.say if ++$ == any(1,3,7);' Lines.txt
Line 1
Line 3
Line 7
--
Bruce Gray (Util of PerlMonks)
my $is_a_number = / ^ \d+ [ '.' \d* ]? $ /;
my $sum = @*ARGS.grep($is_a_number).sum;
say $sum;
—
Hope this helps,
Bruce Gray (Util of PerlMonks)
> On Aug 31, 2020, at 12:22 PM, William Michels via perl6-users
> wrote:
>
> I think it looks very good, Radhakrishnan! Pr
-line arguments, but only those arguments that are valid
numbers
—
Hope this helps,
Bruce Gray (Util of PerlMonks)
> On Aug 31, 2020, at 2:23 PM, dan...@codesections.com wrote:
>
> I like Bruce's Regex-based approach.
>
> Here's how I'd probably approach
readers who have not yet embraced the map/grep
mindset we have been showing off.
my @nums;
for @*ARGS -> $arg {
push @nums, $arg if $arg.Rat;
}
say @nums.sum;
--
Hope this helps,
Bruce Gray (Util of PerlMonks)
> On Aug 31, 2020, at 3:02 PM, William Michels wrote:
>
> Very
g/language/operators#index-entry-X_(cross_metaoperator)
https://docs.raku.org/language/operators#index-entry-cross_product_operator
If any part of this was lacking in clarity, please let me know where to focus,
and I will be glad to expound.
--
Hope this helps,
Bruce Gray (Util of Perlmonks)
; (since I do not use those packages myself); I am just trying to answer
the implied question.
--
Hope this helps,
Bruce Gray (Util of PerlMonks)
hoice of symbols and order
is only obvious (to we hexidecimal-trained humans) up to (Arabic numbers +
English Alphabet).
--
Hope this helps,
Bruce Gray (Util of PerlMonks)
` is no longer needed.
subset test-set of Str where *.&is-valid;
sub real-use-of-subsets ( test-set $var1 ) {
say "This is definitely a `test-set`: $var1";
}
sub real-use-of-subsets ( test-set $var1 ) {
say "Not a `test-set`: $var1";
}
# Test it.
real-use-of-subsets('abc');
real-use-of-subsets('^’);
—
Hope this helps,
Bruce Gray (Util of PerlMonks)
2
()
5
6
(1 2 1)
(1 1)
Str @z = "\n"
Str @z = "\\n"
Str @z = "\\n"
List @z = $( )
Str @z = "a \n b"
Str @z = "a \\n b"
List @z = $("a", "\\n", "b")
List @z = $("a", "b")
—
Hope this helps,
Bruce Gray (Util of PerlMonks)
4..4)).pick
For more detail on Raku Randomess, you might enjoy the first third of my 2018
talk:
https://www.youtube.com/watch?v=DJCp6k1ts3g
Perl 6 and the Emergent Program.*
3m22s - 13m33s
--
Hope this helps,
Bruce Gray (Util of PerlMonks)
ant:
say cos 45*π/180;
but also would be clearer with parens:
say cos( 45*π/180 );
For the whole precedence table, see:
https://docs.raku.org/language/operators#Operator_precedence
--
Hope this helps,
Bruce Gray (Util of PerlMonks)
me of
your choice , if that makes more sense in your code.
my Str $a = ’15';
my Str $b = '37';
say $b.cos;
Inside method `cos`, during the .cos call in the code above, “self” is an alias
to $b .
—
Hope this helps,
Bruce Gray (Util of PerlMonks)
ontextualizer
So, I recommend .list or @(…) as more intuitive, maybe even *sufficiently*
intuitive :^)
> thanks
> Brian
—
Hope this helps,
Bruce Gray (Util of PerlMonks)
eager "foo"=>1 }; say .raku ~ ' is a '
> ~ .WHAT.gist for @a;
$(:foo(1),) is a (List)
This does not address why `eager` is changing the pair constructor,
but it simplifies future discussion,
and also shows that while only #4 of the OP REPL samples was throwing the
error,
#3 is actually also not producing what was desired.
--
Hope this helps,
Bruce Gray (Util of PerlMonks)
_expression…by me”,
it sounds like you can’t/won't pursue this shortened form of the regex
because you don’t actually *know* the long form of the regex yet.
If so, since #1 is not available, I would do #4 until the full details
of all the operands becomes clear, then try to refactor to #2 or #3.
> rir
--
Hope this helps,
Bruce Gray (Util of PerlMonks)
2020.07True
2020.07.16.g.03.d.3.e.43.faTrue
2020.08True
2020.08True
2020.09True
2020.12False
2020.11True
2020.12False
2021.02False
2021.02False
2021.03False
2021.04False
2021.05False
2021.05False
2021.05False
In https://github.com/MoarVM/MoarVM/blob/master/docs/ChangeLog , I see nothing
in 2020.11 that looks like the culprit.
In https://github.com/rakudo/rakudo/blob/master/docs/ChangeLog , I see nothing
in 2020.11 that looks like the culprit, but that big change in coersion ("new
coertion semantics”) was big enough to make that a good candidate for proper
bisecting.
(but not by me; I am out of time for this week)
—
Hope this helps,
Bruce Gray (Util of PerlMonks)
my $CC = AA.new( I => @will_become_I_soon );
or
my $CC = AA.new( I => [ flat( Str xx 400, "four hundred", Str xx
2000-400-1, "two thousand" ) ] );
--
Hope this helps,
Bruce Gray (Util of PerlMonks)
> On Jul 11, 2021, at 1:13 AM, ToddAndMargo via perl6-users
> wrote:
—snip--
> $*PROGRAM.parent is just a silly dot.
—snip—
Todd,
That is true only when the program you are running happens to be in your
current directory
(as is very common, but not nearly universal, and not the case for
= do for lines()
> {(.words[3..*],.words[0..2])}; .put for @reordered;’ lat_lon.txt
I am sure that `-MXML` is leftover from other experiments.
Removing `@reordered` and switching to `-n` like my critiques above, this
becomes:
raku -ne 'put (.words[3..*],.words[0..2]);' lat_lon.txt
To “wow” the SO crowd, you might note that @array[N..*],@array[0..N-1] has a
shortcut in Raku (.rotate), making this the tightest of all the solutions I see
so far:
raku -ne 'put .words.rotate(3);' lat_lon.txt
--
Hope this helps,
Bruce Gray (Util of PerlMonks)
5PM
11-06-2014 - 10:51:21PM
11-06-2014 - 10:52:08PM
11-06-2014 - 10:53:30PM
11-06-2014 - 10:54:50PM
I do note that XML::Writer does not show up in the search at
https://modules.raku.org/t/XML ,
and is very under-documented, so that is an opportunity for someone to
contribute.
--
Hope this helps,
567890123456' x 100);
# Uncomment one of these two lines:
$NewRev ~~ s/ .*? ('Release Notes V') //; # Original
# $NewRev ~~ s/ ^ .*? ('Release Notes V') //; # Anchored
--
Hope this helps,
Bruce Gray (Util of PerlMonks)
> On Oct 23, 2021, at 7:48 PM, ToddAndMargo via perl6-users
> wrote:
>
> On 10/23/21 17:37, Bruce Gray wrote:
>>> On Oct 23, 2021, at 6:43 PM, ToddAndMargo via perl6-users
>>> wrote:
>>>
>>> Hi All,
>>>
>>> Wish I had a
part, with
something like this (only lightly tested) code:
@y .= head($wanted_decimal_places + $original_number.sqrt.floor.chars);
--
Hope this helps,
Bruce Gray (Util of PerlMonks)
27453459686201472851741864088919860955232923048430871432145083976260362799525140798968725339654633180882964062061525835239505474575028775996172983557522033753185701135437460340849884709
--
Hope this helps,
Bruce Gray (Util of PerlMonks)
( :$hexadecimal_precision_wanted, :$decimal_precision_via_log,
:$decimal_precision_via_chars );
Output:
hexadecimal_precision_wanted => 8192
decimal_precision_via_log => 9865
decimal_precision_via_chars => 9865
--
Hope this helps,
Bruce Gray (Util of PerlMonks) [who just learned of the BigRoot module]
AIN gets 'a.txt' in $file1 and 'b.txt' in $file2. If I call it badly:
./myscript.raku a.txt b.txt c.txt
, then I get an error, with a usage message auto-generated by Raku:
myscript.raku [--dry-run]
For full details, see:
https://docs.raku.org/language/create-cli#index-entry-MAIN
--
Hope this helps,
Bruce Gray (Util of PerlMonks)
;Str'. The 'decode' method should
> be used to convert a Buf to a Str.
> [10] > $y += 0xBB;
> Type check failed in assignment to $y; expected Buf but got Int (201)
--snip--
If all you want is to append 0xBB to $y, either of these will work:
$y ~= Buf.new(0xBB);
$y.append(0xBB);
--
Hope this helps,
Bruce Gray (Util of PerlMonks)
b} <=> $digraph{$a} || $a cmp $b }
keys %digraph
}
$_=lc; while (/([a-z]{2})/g) {++$digraph{$1}; --pos; }
' Camelia.svg
, when run against a downloaded copy of our mascot:
https://upload.wikimedia.org/wikipedia/commons/8/85/Camelia.svg
--
Hope this helps,
Bruce Gray (Util of PerlMonks)
utside the BEGIN block";
# say "b_var is still $b_var outside the BEGIN block"; # Commented out, because
illegal!
Output:
a_var is 42 within the BEGIN block
b_var is 11 within the BEGIN block
did something! By the way: a_var => 42 inside a sub called from the BEGIN
block, because
var/log/messages | raku -ne '.say for [\~] .comb: /\/<-[/]>+/;'
/var
/var/log
/var/log/messages
--
Hope this helps,
Bruce Gray (Util of PerlMonks)
rent ~~ "/") }'
--snip--
The use of `.parent` inspired me to think of this shorter solution, via the
Sequence Operator:
$ raku -e '.put for "/var/log/messages".IO, *.parent …^ "/";'
/var/log/messages
/var/log
/var
https://docs.raku.org/language/operators#infix_...
--
Hope this helps,
Bruce Gray (Util of PerlMonks)
cd ~/Junk
raku -e 'use lib "~/FakeDir"; use FakeModule;'
===SORRY!=== Error while compiling -e
Could not find FakeModule in:
file#/Users/bruce_pro/Junk/~/FakeDir
...
--
Hope this helps,
Bruce Gray (Util of PerlMonks)
say for lines().tail(3)' a.1
98
99
100
real0m2.155s
user0m1.727s
sys 0m0.249s
On Unix or Mac systems (and maybe Windows, UnxUtils or CygWin or GnuWin32 or
Microsoft's own "Windows Subsystem for Linux"), faster (and prettier) to pipe
to `tail -3`.
$ tail -3 a.1
(and I presume)
C:\> dir /s /A:-D /d /a | tail -3
--
Hope this helps,
Bruce Gray (Util of PerlMonks)
> On Oct 22, 2022, at 11:46 PM, ToddAndMargo via perl6-users
> wrote:
>
> On 10/22/22 21:11, Bruce Gray wrote:
>>> On Oct 22, 2022, at 10:28 PM, ToddAndMargo via perl6-users
>>> wrote:
>>>
>>> Hi All,
>>>
>>> Is there a
t;.>)».s.sum;"
--
Hope this helps,
Bruce Gray (Util of PerlMonks)
arameter list defines a default value. `$type` gets
assigned the undefined-but-still-useful type-object of `Buf` only if no `type`
argument is passed.
So, a real-life call might look like:
my $q = blob-from-pointer( $p, elems => 10, type => Blob[uint8] );
> :'(
>
> Yours in confusion,
> -T
--
Hope this helps,
Bruce Gray (Util of PerlMonks)
f your phone company considers them free.
In other words, you might get charged, but it is the phone company's charge,
not Jitsi's.
--
Hope this helps,
Bruce Gray (Util of PerlMonks)
se HTML
with regex; use a HTML parser".
(We all parse HTML with regex anyway, on occasion; regex are just so
easy to reach for.)
To encourge you to consider the "correct" approach, I have appended a
solution in just 6 SLOC.
--
Hope this helps,
Bruce Gray (Util of P
github.com/tony-o/raku-fez/issues/105
--
Hope this helps,
Bruce Gray (Util of PerlMonks)
> On Dec 8, 2023, at 00:00, Francis Grizzly Smit wrote:
>
> Ooops sorry my bad
>
> On 8/12/23 16:55, Francis Grizzly Smit wrote:
>> Hi
>>
>> keep getting this error email
nderscores.
>
> Your take?
--snip--
# Brave Browser temp directories: exactly 32 contiguous lowercase alpha
characters.
my $brave_junk_directories_re = / ^ <[a..z]> ** 32 $ /;
my %to_skip = @filenames.grep($brave_junk_directories_re).Set;
--
Hope this helps,
Bruce Gray (Util of PerlMonks)
ile check my modules if I
> import them to a program and -c the program.
>
> For example, the following program uses
> the above module:
>$ raku -c CobianWrapper.pl6
>Syntax OK
>
> I just want to do a syntax check on my modules
> at time without the program.
>
> :'(
The wrapper program can be a `-e` one-liner, like:
raku -c -e 'use NativeCall;'
Syntax OK
Does this work for you?
raku -c -e 'use WinMessageBox;'
--
Hope this helps,
Bruce Gray (Util of PerlMonks)
> On Feb 8, 2024, at 15:12, ToddAndMargo via perl6-users
> wrote:
>
> Hi All,
>
> Is there one of those fancy system variables that will
> tell me who called/started raku?
raku -e 'say $*USER'
bruce
--
Hope this helps,
Bruce Gray (Util of Perlmonks)
reads that `.sort`
needs would not play well with Seq. It does not matter whether you convert the
numbers to a Numeric type (which you did correctly in the `.map`), they are
still part of a Seq.
The .cache method turns the Seq into a List, and the sort behaves as you
intended.
https://docs.raku.org/routine/cache
--
Hope this helps,
Bruce Gray (Util of PerlMonks)
has $.expire;
has $.interval;
}
my class Output {
has $.csv;
has $.html;
has $.xml;
has $.logger;
}
# XXX This would import the `auto-cli` function.
# use Getopt::Attributes;
# These must run before MAIN.
my $t = auto-cli( Timer );
my $o = auto-cli( Output, :logger('localhost') ); # default if --logger not
specified on command-line
sub MAIN ( $filename ) {
say 'Timer object ', $t;
say 'Output object ', $o;
say 'Remaining ARGS ', @*ARGS;
say 'Filename ', $filename;
}
--
Hope this helps,
Bruce Gray (Util of PerlMonks)
https://www.enotes.com/shakespeare-quotes/by-pricking-my-thumbs
ts/1c5qglk/raku_science_and_speakers_for_tprconference/
--
Hope to see you there,
Bruce Gray (Util of PerlMonks)
cess.
Note: I don't use MacPorts, and am guessing.
--
Hope this helps,
Bruce Gray
specced to work differently than as I used it
here, and so may change in the future.
Buf.new should have a different API, and a Buf with size(1) should (I
think) autopack 8 bits into a byte on output.
--
Hope this helps,
Bruce Gray (Util of PerlMonks)
On Feb 16, 2011, at 4:14 PM, Bottoms, Christopher A wrote:
Hello all,
As soon as I add the MAIN sub to my module file, my test file
complains:
--snip--
In your module file, after the "use v6" line, add this line:
module MaizeDiversity::Impute;
--
Hope this helps,
Bruce Gra
tion of the rakudo.org site is taking up some
key people's tuits today.
Did I miss an announcement?
No; I think that the announcement is waiting on the release itself.
Preview: https://github.com/rakudo/star/tree/master/skel/docs/announce/
--
Hope this helps,
Bruce Gray (Util on IRC)
On Apr 29, 2011, at 11:02 PM, Jon Gentle wrote:
I'd like to take a minute and invite everyone to join us during
YAPC::NA
2011 for a joint Parrot and Perl6 Birds of a Feather meeting and
hackathon.
I plan to attend both the BoF and Hackathon.
Thanks for your efforts!
--
Bruce Gray
://raw.github.com/perl6/mu/master/misc/camelia.txt )
3. "Parrot speaks your language" is the obvious slogan to use for Parrot;
it is already in the logo.
Any recommendations on a slogan for the Perl 6 stickers? Just the text
"Perl 6" is my default.
--
Thank you,
Patrick,
Doh! They were right next to the ketchup in the fridge.
and Yes, if you would send me the .ai file of Parrot, it would be very helpful.
--
Much Thanks!
Bruce Gray (Util of PerlMonks)
On Oct 7, 2013, at 11:41 PM, "Patrick R. Michaud" wrote:
> https://github.com/
http://shop.oreilly.com/product/9780596100926.do
Perl Testing: A Developer's Notebook
by Ian Langworth and Chromatic
From 2005, but still a fantastic primer on testing in Perl.
—
Hope this helps,
Bruce Gray (Util of PerlMonks)
valid syntax,
and your "a" method was *outside* your original "foo" class.
—
Hope this helps,
Bruce Gray (Util of PerlMonks)
st meeting after YAPC::NA each year, those of us who attended
present a “Highlights from YAPC” talk.
By the way, I live in Auburn/Opelika, which is directly on the route from
Niceville to Atlanta.
We hope that you will come see us!
—
Hope this helps,
Bruce Gray (Util of PerlMonks)
l6 -e 'my $s = "abc"; substr-rw($s, 1,1) = "z"; say $s;'
azc
I also do not see substr-rw in doc.perl6.org.
It needs to be added.
In the meantime, you can find it here:
http://design.perl6.org/S32/Str.html
—
Hope this helps,
Bruce Gray (Util of PerlMonks)
l6 -e 'my $s = "abc"; substr-rw($s, 1,1) = "z"; say $s;'
azc
I also do not see substr-rw in doc.perl6.org.
It needs to be added.
In the meantime, you can find it here:
http://design.perl6.org/S32/Str.html
—
Hope this helps,
Bruce Gray (Util of PerlMonks)
-perlvar#Variables_related_to_regular_expressions
http://docs.perl6.org/type/Match
https://github.com/Util/Blue_Tiger/blob/master/translate_regex.pl
--
Hope this helps,
Bruce Gray (Util on IRC and PerlMonks)
> ;
my $dir_re = / ^ @dirs_to_skip $ /;
...
next if $line ~~ $dir_re;
If you know that your exclusion list is always literal,
you can leave the regex engine out of the process,
and just do a hash lookup
(which is even easier in Perl 6 with `set`, which sets the values all to
`True`):
my %dirs_to_skip = set <
/home/user/.cpan
/home/tbrowde/.emacs
> ;
...
next if %dirs_to_skip{$line};
--
Hope this helps,
Bruce Gray (Util of PerlMonks)
clone git://github.com/Util/Blue_Tiger.git
$ cd Blue_Tiger
$ bin/p526 ../example.pl
my @aaa = < a b c d e f g >;
for @aaa <-> $c {
print "$c$c$c\n";
}
--
Hope this helps,
Bruce Gray (Util on IRC)
s from both Perl 5 and Perl 6.
—
Hope this helps,
Bruce Gray (Past GSOC Admin)
ded, I offer this just-uploaded
video:
https://www.youtube.com/watch?v=D16wa-gnFwE
Brian Duggan - "Extending Perl 6 Command Line Argument Parsing using
Metaprogramming”
Brian covers the basics of “positional vs named parameters” around timemark
6m45s to 8m15s.
—
Hope this helps,
Bruce Gray (Util of PerlMonks)
raight translation:
ifconfig | perl6 -e 'say lines().grep({/flags/}).map({.words.[0].subst(/":"$/,
"")}).sort.[1]'
P6-ish version:
ifconfig | perl6 -e 'say lines.map({ ~$0 if /^(\S+) ": flags="/ }).sort[1]'
—
Hope this helps,
Bruce Gray (Util of PerlMonks)
p://www.jnthn.net/articles.shtml
—
Hope this helps,
Bruce Gray (Util of PerlMonks)
ith `.&` instead of `.` , like so:
say %h.keys.grep(*.so)».sqrt.sum.&MyWickedSub.abs.&MySumTwister;
This syntax is listed as "postfix .&", and can be found here:
https://docs.perl6.org/language/operators#postfix_.&;
So. `.` calls a method, and `.&` calls a sub as if the sub were a method.
--
Hope this helps,
Bruce Gray (Util)
$line {
my Str $temp = $line;
# if no <> surrounding $pattern it becomes literal.
if $temp ~~ s/ (<$pattern>) /$color_red$0$color_off/ {
say $temp;
}
}
}
—
Hope this helps,
Bruce Gray (Util of PerlMonks)
er Way to do it:
ls | perl6 -e '.say for lines().sort: {
( (/ (\d\d)"-"(\d\d)"-"(\d\d\d\d)"_"(\d\d)":"(\d\d)":"(\d\d) / ??
"$2$0$1$3$4$5" !! ""), $_ )
}'
—
Hope this helps,
Bruce Gray (Util of Perlmonks)
> Begin forwarded message:
>
> From: Matthew Musgrove via DFW-pm
> Subject: [DFW.pm] Sad News
> Date: January 7, 2019 at 3:03:16 PM CST
> To: corpuschristi...@pm.org, hous...@houston.pm.org, aus...@pm.org,
> dfw...@pm.org
> Cc: Matthew Musgrove
> Reply-To: Dallas/Ft Worth Perl Mongers
>
> T
an anonymous *hash* constructor, which is what the curly braces do (when they
are not doing their code-block-ish job).
You could have also used `Hash(…)` or `%(…)` instead of `{…}`, but `{…} is
shortest, and most traditional from Perl 5.
—
Hope this helps,
Bruce Gray (Util of PerlMonks)
acct, $cn ) = %Vendors{"acme"}{"AccountNo", "ContactName”};
my ( $acct, $cn ) = %Vendors;
say [:$acct, :$cn].perl;
--
Hope this helps,
Bruce Gray (Util of PerlMonks)
> On Jan 11, 2019, at 1:25 PM, ToddAndMargo via perl6-users
> wrote:
>
> On 1/1
> On Jan 11, 2019, at 1:39 PM, ToddAndMargo via perl6-users
> wrote:
>
> On 1/11/19 11:33 AM, JJ Merelo wrote:
>> I think you want $x, not $Ace.
>> Cheers
>
> Yup. I am on fire today! :'(
>
> Still can't get it figured out. :'( :'(
>
> $ p6 'my $x="Ace"; my %Vendors=("acme" => { "Conta
;< $x >>` is to take the shortcut intended for constant keys,
and bludgeon it to make it support variable keys, when the basic (and shorter)
syntax of `%Vendors{$x}` handles the variable key naturally.
—
Hope this helps,
Bruce Gray (Util of PerlMonks)
> On Jan 11, 2019, at 1:
> On Jan 11, 2019, at 2:07 PM, ToddAndMargo via perl6-users
> wrote:
>
> Hi All,
>
> Anyone know if someone has written a program like this
> in Perl that will run locally and not require the Internet?
>
> http://www.subnet-calculator.com/
>
>
> Many thanks,
> -T
I have not used it, but
the snag, but was really a new set of problems
that exists only in your example. FYI, every time that I have made this
mistake, it was always due to my creating an example from scratch, instead of
slowly massaging the real problem code down into a minimal form for public
discussion. YMMV.
I a
thing more that those two values; I see that just
after them, the source code says:
/* Brace thyselves */
To call those Windows APIs in Perl 6, you would use NativeCall.
--
Hope this helps,
Bruce Gray (Util of PerlMonks)
89 matches
Mail list logo