The map function

Discussion in 'Perl Misc' started by mynews, Apr 19, 2008.

  1. mynews

    mynews Guest

    Whis is difference between map and for-each?
    Why the map function is fast than for-each? <== is it for all case?
     
    mynews, Apr 19, 2008
    #1
    1. Advertising

  2. mynews

    Ben Bullock Guest

    On Sat, 19 Apr 2008 11:30:05 +0800, mynews wrote:

    > Whis is difference between map and for-each?


    perldoc -f map

    > Why the map function is
    > fast than for-each? <== is it for all case?


    Could you post an example piece of code where the map function is faster
    than foreach?
     
    Ben Bullock, Apr 19, 2008
    #2
    1. Advertising

  3. "mynews" <> wrote:
    >Whis is difference between map and for-each?


    They have very little in comon except that both loop over the elements
    of a list. map() is a function, foreach is a statement modifier or a
    compound (loop) statement.

    While sometimes map() can be used to achive similar results as a
    foreach, usually that's not a good idea because you create a return
    value only to throw it away.
    Vice-versa you can use map() to return a completely different list than
    its argument while modifying the list of a foreach loop is strongly
    discouraged and may lead to very unexpected results.
    Also closures are more natural with map().

    >Why the map function is fast than for-each? <== is it for all case?


    It is? That would surprise me, but I haven't run any benchmarks.

    jue
     
    Jürgen Exner, Apr 19, 2008
    #3
  4. Gerry Ford <> wrote:
    >
    > "Jürgen Exner" <> wrote in message
    > news:...
    >> "mynews" <> wrote:
    >>>Whis is difference between map and for-each?

    >>
    >> They have very little in comon except that both loop over the elements
    >> of a list. map() is a function, foreach is a statement modifier or a
    >> compound (loop) statement.
    >>
    >> While sometimes map() can be used to achive similar results as a
    >> foreach, usually that's not a good idea because you create a return
    >> value only to throw it away.
    >> Vice-versa you can use map() to return a completely different list than
    >> its argument while modifying the list of a foreach loop is strongly
    >> discouraged and may lead to very unexpected results.
    >> Also closures are more natural with map().
    >>
    >>>Why the map function is fast than for-each? <== is it for all case?

    >>
    >> It is? That would surprise me, but I haven't run any benchmarks.

    >
    > I think of foreach as a loop and map as a function like this:
    > map ($_->[$subject_offset].' from '.$_->[$from_offset], @xover)



    You didn't show where the return value from map() is going, I'll assume:

    @list = map ($_->[$subject_offset]...


    > They don't seem like comparables to me.



    @list = ();
    foreach ( @xover ) { # untested
    push @list, $_->[$subject_offset].' from '.$_->[$from_offset];
    }


    The contents of @list are the same either way.


    --
    Tad McClellan
    email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"
     
    Tad J McClellan, Apr 20, 2008
    #4
  5. On Apr 18, 11:49 pm, Jürgen Exner <> wrote:
    > "mynews" <> wrote:
    > >Whis is difference between map and for-each?

    >
    > They have very little in comon except that both loop over the elements
    > of a list.  map() is a function, foreach is a statement modifier or a
    > compound (loop) statement.
    >
    > While sometimes map() can be used to achive similar results as a
    > foreach, usually that's not a good idea because you create a return
    > value only to throw it away.

    Is this still true? I thought map in void context was optimized.
     
    nolo contendere, Apr 20, 2008
    #5
  6. mynews

    Uri Guttman Guest

    >>>>> "GF" == Gerry Ford <> writes:

    GF> Maybe we can use this script to compare and contrast:
    GF> sub read_killrc {
    GF> open(FILE, "<$killrc") and do {
    GF> @filter = ();

    not needed in the map version

    GF> foreach (<FILE>) {
    GF> chomp; length or next; /^#/o and next;
    GF> my $pat; eval '$pat = qr/$_/' or do {prompt $@; next};
    GF> push @filter, $pat;
    GF> }
    GF> close(FILE);

    GF> What would this syntax look like with a map function?

    untested:

    return unless open(my $file, "<$killrc") ;
    return map {
    /^([^#]+)#?$/ &&
    eval{ qr/$1/} || prompt $@, ()
    } <$file> ;

    maybe the return failure value should be grepped out but that is a minor
    style change.

    map makes tight loops like that much cleaner. they remove the collecting
    array and its push and uses less perl which generally makes it faster
    (in the right conditions, especially with shorter arrays)

    map is such a basic concept i wonder why it seems to be a stumbling
    block for so many newbies. year after year we get the same map
    queries. what use is it? how do i convert loops to maps? is it faster or
    slower? void map is ok? some are in the faq but there must be something
    missing if this perl learning speed bump always seems to hit so many.

    uri

    --
    Uri Guttman ------ -------- http://www.sysarch.com --
    ----- Perl Code Review , Architecture, Development, Training, Support ------
    --------- Free Perl Training --- http://perlhunter.com/college.html ---------
    --------- Gourmet Hot Cocoa Mix ---- http://bestfriendscocoa.com ---------
     
    Uri Guttman, Apr 21, 2008
    #6
  7. mynews

    Ben Bullock Guest

    On Sun, 20 Apr 2008 15:30:06 -0700, nolo contendere wrote:

    > On Apr 18, 11:49 pm, Jürgen Exner <> wrote:


    >> While sometimes map() can be used to achive similar results as a
    >> foreach, usually that's not a good idea because you create a return
    >> value only to throw it away.


    > Is this still true? I thought map in void context was optimized.


    There was a discussion about this topic a month ago (started March 22).
    Perhaps reading this might help:

    http://groups.google.co.jp/group/comp.lang.perl.misc/search?hl=en&q=map
    +void+context&start=0&scoring=d&hl=en&
     
    Ben Bullock, Apr 21, 2008
    #7
  8. >>>>> "UG" == Uri Guttman <> writes:

    UG> map is such a basic concept i wonder why it seems to be a
    UG> stumbling block for so many newbies. year after year we get
    UG> the same map queries.

    Because most of the time the newbies have run into the other basic
    concepts elsewhere -- for loops, if/then, subroutines, etc., even
    object orientation -- but it's very likely that Perl is their first
    exposure to map and functional programming.

    Charlton


    --
    Charlton Wilbur
     
    Charlton Wilbur, Apr 21, 2008
    #8
  9. Uri Guttman <> wrote:
    >map is such a basic concept i wonder why it seems to be a stumbling
    >block for so many newbies.


    Actually map() is not as trivial, because it is a higher order function,
    i.e. a function that takes a function (or code block) as argument.
    I've seen this again and again when we tought functional programming
    that there are otherwise smart students, who simply couldn't grasp the
    concept that a function can be data (i.e. argument to another function),
    too.
    And considering that not many students are tought functional programming
    at all and that most well-known languages don't have higher-order
    functions at all it is not surprising that map() is a speed bump for
    many.
    Another nice example is sort(). I wonder how many implemented their own
    sorting algorithm because they couldn't figure out how to write the
    comparision function for non-trivial sorts.

    jue
     
    Jürgen Exner, Apr 21, 2008
    #9
  10. mynews

    Uri Guttman Guest

    >>>>> "JE" == Jürgen Exner <> writes:

    JE> Uri Guttman <> wrote:
    >> map is such a basic concept i wonder why it seems to be a stumbling
    >> block for so many newbies.


    JE> Actually map() is not as trivial, because it is a higher order
    JE> function, i.e. a function that takes a function (or code block) as
    JE> argument. I've seen this again and again when we tought
    JE> functional programming that there are otherwise smart students,
    JE> who simply couldn't grasp the concept that a function can be data
    JE> (i.e. argument to another function), too.

    coming from assembler where i passed around pointers to code all the
    time and similarly i did that in c and i knew list, yes, functional
    programming is a core thing with me. but if you teach references first
    including dispatch tables, then shifting to functional programming and
    map should be easy. i do training too and i don't find it hard to teach
    map/grep but they do need some handholding.

    JE> Another nice example is sort(). I wonder how many implemented
    JE> their own sorting algorithm because they couldn't figure out how
    JE> to write the comparision function for non-trivial sorts.

    that is one reason i wrote sort::maker! :)

    uri

    --
    Uri Guttman ------ -------- http://www.sysarch.com --
    ----- Perl Code Review , Architecture, Development, Training, Support ------
    --------- Free Perl Training --- http://perlhunter.com/college.html ---------
    --------- Gourmet Hot Cocoa Mix ---- http://bestfriendscocoa.com ---------
     
    Uri Guttman, Apr 21, 2008
    #10
  11. mynews

    Uri Guttman Guest

    >>>>> "GF" == Gerry Ford <> writes:

    GF> "Uri Guttman" <> wrote in message

    >> untested:
    >>
    >> return unless open(my $file, "<$killrc") ;
    >> return map {
    >> /^([^#]+)#?$/ &&
    >> eval{ qr/$1/} || prompt $@, ()
    >> } <$file> ;
    >>

    GF> I tried both versions of this without any success whatsoever:

    how about showing your output?

    GF> #!/usr/bin/perl -w

    use warnings is better than -w
    GF> use strict;

    GF> my $killrc = "sample.killrc";
    GF> my @filter;
    GF> my @list1 = qw( Mon Tu Wed);

    where did that come from?

    GF> open(FILE, "<$killrc") and do {
    GF> @filter = ();
    GF> foreach (<FILE>) {
    GF> chomp; length or next; /^#/o and next;
    GF> my $pat; eval '$pat = qr/$_/' or do {prompt $@; next};
    GF> push @filter, $pat;
    GF> }
    GF> close(FILE);

    GF> }
    GF> print @filter;
    GF> print @list1;

    and the results?

    GF> # perl mats5.pl 2>text50.txt >text51.txt

    why the redirect of stderr? there is no stderr output. and what is in
    the prompt sub?

    GF> __END__

    GF> #!/usr/bin/perl -w

    GF> use strict;

    GF> my $killrc = "sample.killrc";

    my return calls IMPLY A SUB is surrounding it. of course it won't work
    as shown. jeez, i can't hold your hand and also blow your nose. think
    about the code and don't just copy/run it.

    GF> return unless open(my $file, "<$killrc") ;
    GF> return map {
    GF> /^([^#]+)#?$/ &&
    GF> eval{ qr/$1/} || prompt $@, ()
    GF> } <$file> ;


    GF> # perl mats4.pl 2>text50.txt >text51.txt
    GF> __END__

    GF> Perl is so idiomatic, it makes me scream. The syntax for the print
    GF> statement is:
    GF> print LIST
    GF> How this doesn't fit the bill is beyond me.
    GF> print @list1;

    huh? show a complete runnable example of why you think that doesn't
    work. my guess is that @list1 has no newlines and so doesn't get printed
    until the program ends. this is a well know buffering issue and isn't a
    bug in perl.

    GF> I find no example of printing a list in the camel book. It does have
    GF> print reverse sort map (1c) keys %hash;

    and in the FAQ? on cpan? the camel book is just a book. it can't have
    every possible example you want. and also note that the perl docs are
    the actually final language description, not the camel books.

    uri

    --
    Uri Guttman ------ -------- http://www.sysarch.com --
    ----- Perl Code Review , Architecture, Development, Training, Support ------
    --------- Free Perl Training --- http://perlhunter.com/college.html ---------
    --------- Gourmet Hot Cocoa Mix ---- http://bestfriendscocoa.com ---------
     
    Uri Guttman, Apr 22, 2008
    #11
  12. "Gerry Ford" <> wrote:

    [shortened to key lines]
    >my @list1 = qw( Mon Tu Wed);
    >print @list1;
    >
    >Perl is so idiomatic, it makes me scream. The syntax for the print
    >statement is:
    >print LIST
    >How this doesn't fit the bill is beyond me.
    >print @list1;


    Huh??? What do you mean?
    That print statement prints exactly the elements of that list. What did
    you expect it to print?

    jue

    >
    >I find no example of printing a list in the camel book. It does have
    >print reverse sort map (1c) keys %hash;
     
    Jürgen Exner, Apr 22, 2008
    #12
  13. mynews

    Uri Guttman Guest

    >>>>> "JE" == Jürgen Exner <> writes:

    JE> "Gerry Ford" <> wrote:
    JE> [shortened to key lines]
    >> my @list1 = qw( Mon Tu Wed);
    >> print @list1;
    >>
    >> Perl is so idiomatic, it makes me scream. The syntax for the print
    >> statement is:
    >> print LIST
    >> How this doesn't fit the bill is beyond me.
    >> print @list1;


    JE> Huh??? What do you mean?
    JE> That print statement prints exactly the elements of that list. What did
    JE> you expect it to print?

    see my recent reply to this. my bet is it is the typical missing
    newline/stdout buffering issue. note that @list1 has no newlines nor
    does the built up array. and he never showed the output, just how he
    collected it.

    uri

    --
    Uri Guttman ------ -------- http://www.sysarch.com --
    ----- Perl Code Review , Architecture, Development, Training, Support ------
    --------- Free Perl Training --- http://perlhunter.com/college.html ---------
    --------- Gourmet Hot Cocoa Mix ---- http://bestfriendscocoa.com ---------
     
    Uri Guttman, Apr 22, 2008
    #13
  14. mynews

    Jim Cochrane Guest

    On 2008-04-22, Gerry Ford <> wrote:
    >
    > "Uri Guttman" <> wrote in message
    > news:...
    >>>>>>> "JE" == Jürgen Exner <> writes:

    >>
    >> JE> "Gerry Ford" <> wrote:
    >> JE> [shortened to key lines]
    >> >> my @list1 = qw( Mon Tu Wed);
    >> >> print @list1;
    >> >>
    >> >> Perl is so idiomatic, it makes me scream. The syntax for the print
    >> >> statement is:
    >> >> print LIST
    >> >> How this doesn't fit the bill is beyond me.
    >> >> print @list1;

    >>
    >> JE> Huh??? What do you mean?
    >> JE> That print statement prints exactly the elements of that list. What
    >> did
    >> JE> you expect it to print?
    >>
    >> see my recent reply to this. my bet is it is the typical missing
    >> newline/stdout buffering issue. note that @list1 has no newlines nor
    >> does the built up array. and he never showed the output, just how he
    >> collected it.

    >
    > I simply can't see what's wrong with this:
    > #!/usr/bin/perl -w
    >
    > use strict;
    >
    > my $killrc = "sample.killrc";
    > my @filter;
    > my @list1 = qw( Mon Tu Wed);
    > open(FILE, "<$killrc") and do {
    > @filter = ();
    > foreach (<FILE>) {
    > chomp; length or next; /^#/o and next;
    > my $pat; eval '$pat = qr/$_/' or do {prompt $@; next};
    > push @filter, $pat;
    > }
    > close(FILE);
    >


    Change:
    > }


    to:
    };

    (i.e., missing a ';' - and your code could be formatted better)

    > print @filter;
    > print @list1;
    >
    > # perl mats5.pl 2>text50.txt >text51.txt
    > __END__
    >
    > Perl.exe says:
    > syntax error at mats5.pl line 18, near "print"


    The compiler was pointing pretty much right at the problem.


    --
     
    Jim Cochrane, Apr 22, 2008
    #14
  15. Gerry Ford <> wrote:

    > How does a person invoke
    > the debugger?



    perldoc -q debug

    How do I debug my Perl programs?


    --
    Tad McClellan
    email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"
     
    Tad J McClellan, Apr 22, 2008
    #15
  16. "Gerry Ford" <> wrote:
    [Partially rearragned for better reading flow]
    >"Uri Guttman" <> wrote in message
    >>>>>>> "JE" == Jürgen Exner <> writes:

    >> JE> "Gerry Ford" <> wrote:
    >> JE> [shortened to key lines]
    >> >> my @list1 = qw( Mon Tu Wed);
    >> >> print @list1;
    >> >>
    >> >> Perl is so idiomatic, it makes me scream. The syntax for the print
    >> >> statement is:
    >> >> print LIST
    >> >> How this doesn't fit the bill is beyond me.
    >> >> print @list1;

    >>
    >> JE> Huh??? What do you mean?
    >> JE> That print statement prints exactly the elements of that list. What
    >> did
    >> JE> you expect it to print?
    >>
    >> see my recent reply to this. my bet is it is the typical missing
    >> newline/stdout buffering issue. note that @list1 has no newlines nor
    >> does the built up array. and he never showed the output, just how he
    >> collected it.


    >Perl.exe says:
    >syntax error at mats5.pl line 18, near "print"
    >Execution of mats5.pl aborted due to compilation errors.


    Man, dude!!! How are we supposed to guess??? You could have told us
    that your beef is not with the functionality of print() but with a
    syntax error in that program! Thank you very much for throwing around
    red herrings.

    >I simply can't see what's wrong with this:


    You got some 'intesting' ways of doing things. I know, there is more
    than one way to do things, but your style is kind of pushing it

    >#!/usr/bin/perl -w


    Better to use
    use warnings;
    >use strict;
    >
    >my $killrc = "sample.killrc";
    >my @filter;
    >my @list1 = qw( Mon Tu Wed);
    > open(FILE, "<$killrc") and do {


    The more standard way would be
    open (FILE, "<", $killrc) or die ("Cannot open $killrc: $!";

    > @filter = ();
    > foreach (<FILE>) {
    > chomp; length or next; /^#/o and next;


    Probably it is just me, but I have an strong adversion against mixing
    expressions and flow controll in such a way. I would write it as
    next unless length;
    next if /^#/o;
    IMNSHO this is _much_ easier to read and understand.

    > my $pat; eval '$pat = qr/$_/' or do {prompt $@; next};


    And this is where your unorthodox style bites you. Did you really mean
    to eval() the whole rest of the line? Because the argument to eval is
    indeed
    qr/$_/' or do {prompt $@; next}
    I suppose you meant to eval only the
    qr/$_/'
    Solution: enclose the argument to eval in paranthesis and the mysterious
    syntax error is gone:

    my $pat; eval ('$pat = qr/$_/') or do {prompt $@; next};

    However, I wonder what you are trying to achive by using eval in the
    first place. I don't see any need for it.

    > push @filter, $pat;
    > }
    > close(FILE);
    >
    >}
    >print @filter;
    >print @list1;


    jue
     
    Jürgen Exner, Apr 22, 2008
    #16
  17. mynews

    Uri Guttman Guest

    >>>>> "JE" == Jürgen Exner <> writes:


    >> my $pat; eval '$pat = qr/$_/' or do {prompt $@; next};


    JE> And this is where your unorthodox style bites you. Did you really mean
    JE> to eval() the whole rest of the line? Because the argument to eval is
    JE> indeed
    JE> qr/$_/' or do {prompt $@; next}
    JE> I suppose you meant to eval only the
    JE> qr/$_/'

    or has a very low precedence and that should parse as he intended. sure
    it is bad style in other ways but or will bind lower than a call to eval
    and its single EXPR.

    JE> However, I wonder what you are trying to achive by using eval in the
    JE> first place. I don't see any need for it.

    i said that before and showed how to just use the qr// directly in my
    map example. which he then didn't wrap in a sub as i only showed the map
    call.

    uri

    --
    Uri Guttman ------ -------- http://www.sysarch.com --
    ----- Perl Code Review , Architecture, Development, Training, Support ------
    --------- Free Perl Training --- http://perlhunter.com/college.html ---------
    --------- Gourmet Hot Cocoa Mix ---- http://bestfriendscocoa.com ---------
     
    Uri Guttman, Apr 22, 2008
    #17
  18. Jürgen Exner wrote:
    > "Gerry Ford" <> wrote:
    >>
    >> Perl.exe says:
    >> syntax error at mats5.pl line 18, near "print"
    >> Execution of mats5.pl aborted due to compilation errors.

    >
    > Man, dude!!! How are we supposed to guess??? You could have told us
    > that your beef is not with the functionality of print() but with a
    > syntax error in that program! Thank you very much for throwing around
    > red herrings.
    >
    >> I simply can't see what's wrong with this:

    >
    > You got some 'intesting' ways of doing things. I know, there is more
    > than one way to do things, but your style is kind of pushing it
    >
    >> #!/usr/bin/perl -w

    >
    > Better to use
    > use warnings;
    >> use strict;
    >>
    >> my $killrc = "sample.killrc";
    >> my @filter;
    >> my @list1 = qw( Mon Tu Wed);
    >> open(FILE, "<$killrc") and do {

    >
    > The more standard way would be
    > open (FILE, "<", $killrc) or die ("Cannot open $killrc: $!";
    >
    >> @filter = ();
    >> foreach (<FILE>) {
    >> chomp; length or next; /^#/o and next;

    >
    > Probably it is just me, but I have an strong adversion against mixing
    > expressions and flow controll in such a way. I would write it as
    > next unless length;
    > next if /^#/o;


    Also the /o option is superfluous there as there are no variables in the
    pattern.


    > IMNSHO this is _much_ easier to read and understand.
    >
    >> my $pat; eval '$pat = qr/$_/' or do {prompt $@; next};

    >
    > And this is where your unorthodox style bites you. Did you really mean
    > to eval() the whole rest of the line? Because the argument to eval is
    > indeed
    > qr/$_/' or do {prompt $@; next}


    No it isn't:

    $ perl -MO=Deparse -e'my $pat; eval q[$pat = qr/$_/] or do {prompt $@;
    next};'
    my $pat;
    unless (eval '$pat = qr/$_/') {
    do {
    $@->prompt;
    next;
    };
    }
    -e syntax OK


    > I suppose you meant to eval only the
    > qr/$_/'


    It looks like he meant to eval the string '$pat = qr/$_/'.


    > Solution: enclose the argument to eval in paranthesis and the mysterious
    > syntax error is gone:


    The syntax error is not related at all to this statement. Jim Cochrane
    posted the correct solution. The problem is that the do {} block
    following the open() does not end with a semicolon.


    > my $pat; eval ('$pat = qr/$_/') or do {prompt $@; next};
    >
    > However, I wonder what you are trying to achive by using eval in the
    > first place. I don't see any need for it.
    >
    >> push @filter, $pat;
    >> }
    >> close(FILE);
    >>
    >> }

    ^^^^
    Missing ; for do {} block.


    >> print @filter;
    >> print @list1;



    John
    --
    Perl isn't a toolbox, but a small machine shop where you
    can special-order certain sorts of tools at low cost and
    in short order. -- Larry Wall
     
    John W. Krahn, Apr 22, 2008
    #18
  19. mynews

    Uri Guttman Guest

    >>>>> "JWK" == John W Krahn <> writes:

    JWK> The syntax error is not related at all to this statement. Jim Cochrane
    JWK> posted the correct solution. The problem is that the do {} block
    JWK> following the open() does not end with a semicolon.

    >>> }

    JWK> ^^^^
    JWK> Missing ; for do {} block.

    another reason to avoid do blocks. in a 10k line system i wrote i found
    2 uses of do blocks. and in the OP's case the normal open or die/return
    is of course the better style. having a large do block after an or is
    just insane. an if/then would do the same and be much more normal and
    readable if you couldn't use statement modifiers or such.

    uri

    --
    Uri Guttman ------ -------- http://www.sysarch.com --
    ----- Perl Code Review , Architecture, Development, Training, Support ------
    --------- Free Perl Training --- http://perlhunter.com/college.html ---------
    --------- Gourmet Hot Cocoa Mix ---- http://bestfriendscocoa.com ---------
     
    Uri Guttman, Apr 22, 2008
    #19
  20. On Apr 22, 5:26 pm, "Gerry Ford" <> wrote:
    > "Jim Cochrane" <> wrote in message
    >
    > news:...
    >
    > > On 2008-04-22, Gerry Ford <> wrote:
    > > Change:
    > >> }

    >
    > > to:
    > > };

    >
    > > (i.e., missing a ';' - and your code could be formatted better)

    >
    > Thanks, Jim.  Missing semicolons were the culprit:
    >
    > #!/usr/bin/perl -w
    >
    > use strict;
    > use warnings;
    >
    > my $killrc = "sample.killrc";
    > my @filter;
    > my @list1 = qw( Mon Tu Wed);
    >     open(FILE, "<$killrc") and do {
    >         @filter = ();
    >         foreach (<FILE>) {
    >             chomp; length or next; /^#/o and next;
    >             my $pat; eval '$pat = qr/$_/' or do {prompt $@; next};
    >             push @filter, $pat;
    >         };
    >         close(FILE);
    >
    > };
    >
    > print @filter;
    > print @list1;
    >
    > #  perl mats5.pl 2>text50.txt >text51.txt
    > __END__
    > #end script begin output
    >
    > (?-xism:^From:.*<>)(?-xism:^Subject:.*MONEY)(?-xism:^Message-ID:.*googlegroups)MonTuWed
    >
    > #end output show sample.killrc
    > ^From:.*<>
    > ^Subject:.*MONEY
    > ^Message-ID:.*googlegroups
    >
    > Any ideas where the ?-xism is coming from?


    those are from the compiled regex. check out the effect of qr// on a
    simple regex by printing it.
     
    nolo contendere, Apr 22, 2008
    #20
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. alex
    Replies:
    1
    Views:
    690
    Lau Lei Cheong
    Feb 4, 2005
  2. Matthias Hildebrand
    Replies:
    5
    Views:
    8,192
    krogers
    Mar 20, 2012
  3. Vlad
    Replies:
    0
    Views:
    388
  4. Patrick Guio
    Replies:
    6
    Views:
    3,264
    chris
    Oct 20, 2004
  5. Erik Arner
    Replies:
    0
    Views:
    1,336
    Erik Arner
    Nov 2, 2004
Loading...

Share This Page