| Placid | so " or ' or / is in fact the same regardless of the character used it's just a delimiter, as it were? |
| bru802 | If I have several forms on a page, can someone confirm, if this would select/follow the first form with the field username: my @forms = grep {$_->$mech->field()=~ /username/i }$mech->forms(); $mech->form($forms[0]);$mech->field('username','username'); ? |
| integral | IT ALWAYS TAKES A PATTERN. Can I be any clearer? |
| Placid | probably not |
| integral | Always, walways, always (except " ") |
| Ani-_ | All those damn exceptions! :) |
| Caelum | dkr: that triangle thingy just gives me a blank line, perl -e '$}=1|1<<pop;print($"x$},(map$_?$=:$"x2,@;),$/),@;=(1,map$;[$_]^$;[-$_],1..@;)while$}--' right? |
| PerlJam | integral: Wait ... you mean the first argument to split is a ... what again? |
| Placid | What's the difference with "? |
| integral | Placid: None! It's always a pattern (except " ") |
| Ani-_ | Caelum: add 7 or something Caelum: note how pop() is used. That means it expects an argument. |
| Caelum | doh, thanks :) |
| Placid | integral: can you clarify " "? Do you mean a double quoted space is an exception? |
| integral | *sigh* I'm starting to think pretending parrot looks like a real CPU for code generation just doesn't work :-( |
| Ani-_ | Placid: perldoc -f split # Read it! |
| integral | Everyone assumes a big flat memory model with pointer arithmetic |
| PerlJam | Placid: split() has a single special case that if the first parameter is a single, literal, space character, it does something magical |
| dkr | Caelum: http://www.perlmonks.org/index.pl?node_id=188405 |
| Placid | PerlJam: thank you |
| integral | Placid: Read perldoc -f split, it makes the one special case clear. The one to which I've been referring. |
| Placid | Ani-_: i have, it didn't explain my actual quesiton, which was to do with speed. |
| integral | I had assumed you'd read the docs, recently. |
| PerlJam | Placid: optimize algorithms, not code. |
| integral | Yes, but whenever something doesn't do what you expect, check the docs! |
| dkr | Caelum: note the part, "Specify the size on the command line" and the "pop" functioni n the code, :) |
| integral | I'm surprised you noticed the speed before the incorrect result. |
| Placid | integral: which i did. It hasn't explained the speed. integral: someone was benchmarking, you see |
| integral | So? Your benchmark doesn't test the result? woops. You need to build better benchmarks. |
| Placid | lol |
| Ani-_ | Placid: then you didn't read it properly. |
| integral | And always benchmark real algorithms, not microoptimizations |
| Placid | indeed, but the comparison was between regex and a call to substr & index sure |