Perl Grep Videos

p6apclps #47 Perl 6 Apocalypse
www.perlfoundation.org - - label, but that doesn't help if you have two nested constructs with the same name. In Perl 5, labels are restricted to being at the beginning of the statement, but then how do you label a "grep"? Should there be some way of specifying a label on a keyword rather than on a statement? We could end up with something like this: my $found = grep: NUM { $_ == 1 and last NUM: $_ } (1..1_000_000); On the other hand, considering how often this feature is (not) going to used, I
p6apclps #37 Perl 6 Apocalypse
www.perlfoundation.org - - Since "for" and "given" work by passing arguments to a closure, it's a small step to generalize that in the other direction. Any method definition is a topicalizer within the body of the method, and will assume a "given" of its $self object (or whatever you have named it). Bare closures topicalize their first argument, implicitly aliasing it to $_ unless $^a or some such is used. That is, if you say this: grep { $_ eq 3 } @list it's equivalent to this more explicit use
Linux No Screens Found Error Fix
Installed Ubuntu or perhaps a different distribution of Linux only to find that after installing nvidia drivers you can't load startx anymore? It says something about it can't find any screens? Here is my solution to this crap nvidia writes for their driver installer. Update: I believe you can replace busid "PCI:x:x:x" with busid "x:x:x" and it will still work. LSPCI gives the address in hexadecimal which needs to be converted to decimal. Here is a perl script that can do that. #!/usr/bin/perl `
p6apclps #42 Perl 6 Apocalypse
www.perlfoundation.org - - declaration of the parameter).] Note that the "next" within the "CATCH" refers to the loop, not the "CATCH" block. It is legal to "next" out of "CATCH" blocks, since we won't use "next" to fall through switch cases. However, "X::Control" exceptions (such as "X: :NEXT") are a subset of "Exceptions", so CATCH { when Exception { ... } # catch any exception } will stop returns and loop exits. This could be construed as a feature. When it's considered a bug, you could maybe
Andy Lester: OSCON 2007 Lightning Talks
Andy Lester talks about a grep-replacement called "ack" and why Perl scripts should be called programs. Taped at OSCON 2007 in Portland, OR.
p6apclps #46 Perl 6 Apocalypse
www.perlfoundation.org - - *Authors of modules who wish to provide a public API that respects the current state of "use fatal;" if such a mechanism is available, can do so as follows.* *Internal to their modules, authors can use lexically scoped "use fatal;" to explicitly control whether or not they want builtins to raise exceptions to signal errors.* *Then, if and only if they want to support the other style, and only for public API subroutines, they do something like one of these:* * *Use retu
p6apclps #27 Perl 6 Apocalypse
www.perlfoundation.org - - would be equivalent to for ($a, $b) { s/foo/bar/ } But then maybe it's redundant, except that you could say @foo =~ s/foo/bar/ in the middle of an expression. But by and large, I think I'd rather see: @foo.grep {!m/\s/} instead of using "=~" for what is essentially a method call. In line with what we discussed before, the list version could be a hyperoperator: @foo . ^s/foo/bar/; or possibly: @foo ^. s/foo/bar/; Note that in the general case this all implies that there
The First Search Engine
Archie is a tool for indexing FTP archives, allowing people to find specific files. It is considered to be the first Internet search engine.[1] The original implementation was written in 1990 by Alan Emtage, Bill Heelan, and J. Peter Deutsch, then students at mcgill University in Montreal. "Emtage conceived and implemented the original version of the Archie search engine, the world's first Internet search engine and the start of a line which leads directly to today's Altavista, Yahoo!, and Googl