Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: map and regexp. An newbie question

by ikegami (Pope)
on Oct 19, 2011 at 07:42 UTC ( #932317=note: print w/replies, xml ) Need Help??


in reply to map and regexp. An newbie question

You might be interested in learning about List::MoreUtils's apply and Algorithm::Loops's Filter.

my @a = apply { s/a/X/g } qw( arriba abajo ); # XrribX XbXjo

They're not particularly useful in addressing your specific example, though.

Replies are listed 'Best First'.
Re^2: map and regexp. An newbie question
by anneli (Pilgrim) on Oct 19, 2011 at 08:26 UTC

    Wow; I started digging into L::MU to find out what trickery was required to let the anonymous subroutine sit there unadorned, then found myself reading perlsub for half an hour! Thanks!

Re^2: map and regexp. An newbie question
by nando (Acolyte) on Oct 19, 2011 at 15:44 UTC

    Ikegami Thanks!, I will put it in the "todo's" stack.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://932317]
help
Chatterbox?
[Discipulus]: get them all printed on screen
Discipulus ;=)
[shmem]: silly question, silly answer:
[Discipulus]: i know, i know..
[shmem]: man perlfunc |perl -nle '$ok++ if /Alphabetical Listing of Perl Functions/;if($ok ){$s{$1}++if /^ (\w+)/}}{for(keys %s){$f="prototype \\\&CORE::$_"; eval"$f"||delete $CORE::{$_}}print for sort keys%CORE::'
[shmem]: well, there are some builtins which don't have a prototype...
[Discipulus]: eh eh.. i was looking in toke.c but dunno if is already used
[shmem]: oh the whitespace in the regex got condensed, meh
[shmem]: should be /^ {7}(\w+)/ or such

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (9)
As of 2017-05-23 10:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?