Re: Syntax of using Perl5 modules?

2005-05-25 Thread Terrence Brannon
Autrijus Tang [EMAIL PROTECTED] writes: So, this now works in Pugs with (with a env PUGS_EMBED=perl5 build): use Digest--perl5; my $cxt = Digest.SHA1; $cxt.add('Pugs!'); # This prints: 66db83c4c3953949a30563141f08a848c4202f7f say $cxt.hexdigest; This includes the

Re: adverbial blocks: description and examples requested

2005-05-10 Thread Terrence Brannon
Luke Palmer [EMAIL PROTECTED] writes: On 5/5/05, Terrence Brannon [EMAIL PROTECTED] wrote: I was looking at a line in the hangman program: @letters == @solution.grep:{ $_ ne '' }; and was told that I was looking at an adverbial block. The adverbial block is what you're giving

Re: adverbial blocks: description and examples requested

2005-05-10 Thread Terrence Brannon
Ashley, this is a great post. I have included it almost verbatim in my p6 talk I'm giving tomorrow at our Perl Monger's meeting: http://www.metaperl.com/talks/p6/hangman-elucidated/slide6.html I hope you don't mind. On 5/5/05, Terrence Brannon [EMAIL PROTECTED] wrote: I was looking

adverbial blocks: description and examples requested

2005-05-05 Thread Terrence Brannon
I was looking at a line in the hangman program: @letters == @solution.grep:{ $_ ne '' }; and was told that I was looking at an adverbial block. But I don't understand what that is and could not find a description and examples in a reverse search on dev and nntp.perl.org. I would appreciate

Re: adverbial blocks: description and examples requested

2005-05-05 Thread Terrence Brannon
Luke Palmer [EMAIL PROTECTED] writes: Ugh, hit a in gmail when replying! On 5/5/05, Terrence Brannon [EMAIL PROTECTED] wrote: I was looking at a line in the hangman program: @letters == @solution.grep:{ $_ ne '' }; and was told that I was looking at an adverbial block. The adverbial

Re: trim() and words() functions?

2005-04-16 Thread Terrence Brannon
[EMAIL PROTECTED] (Larry Wall) writes: Of course, generations of Perl programmers have made do with various forms of s///, I have found String::Strip on CPAN to work well for my needs in this area.

is flattening the word to use when describing lazy lists?

2005-04-04 Thread Terrence Brannon
A Perl 5 user thinks of flattening a data structure as taking something which is nested and linearizing it. FOR EXAMPLE: use Data::Hash::Flatten; # NESTED DATA my $a = { bill = { '5/27/96' = { 'a.dat' = 1, 'b.txt' = 2, 'c.lsp' = 3 } }, jimm = { '6/22/98' = { 'x.prl' = 9,

Second use of flattening

2005-04-04 Thread Terrence Brannon
The first discussion of flattening had to do with a list of data being flattened into an array. Further down we see another different use of the word flattening : quote src=http://dev.perl.org/perl6/synopsis/S06.html section=Flattening lists The unary prefix operator *

Junctions - feedback and desires

2005-03-10 Thread Terrence Brannon
I gave a talk on Perl 6 Junctions at the Thousand Oaks Perl Mongers meeting last night http://www.hcoop.net/~terry/perl/talks/p6-junctions/index.html and two questions/desires came out of it: 1: will it be possible to know which element of a junction is currently being used? E.g.: