| stuuf | no, that's definitely not that would be match the regexp, then evaluate the return value |
| ATinyMouse | I didn't think it was correct, now I understand why it doesn't work the way I expected I figured there was just a quick function that I could call within an if statement that would tell me the regular expression was valid before I added it to an array.... Hopefully qr// will work |
| stuuf | eval: $re = ':('; qr-$re- |
| buubot | stuuf: Error: Unmatched ( in regex; marked by <-- HERE in m/:( <-- HERE / at eval line 1. |
| action | CPAN upload: Tk-Wizard-2.005 by MTHURN |
| CPAN | upload: Tk-Wizard-2.005 by MTHURN |
| action | CPAN upload: Astro-SpaceElevator-0.02 by DBROOKS |
| CPAN | upload: Astro-SpaceElevator-0.02 by DBROOKS |
| stuuf | yeah you have to eval it since it die()s |
| ATinyMouse | That makes sense |
| stuuf | eval: $re = ':(o)'; qr-$re- |
| buubot | stuuf: qr/(?-xism::(o))/ |
| stuuf | if it's correct you can actually keep the return value as an already compiled regexp |
| Caelum | eval: qw(D O N G S) |
| buubot | Caelum: S |
| buu | my $re = eval qr/$code/; if ( $re ) { push @x, $re } |
| rick[lvd] | push @x, $re if $re; is cooler kekekeke |
| Caelum | push @ass, $dong if $dong |
| buu | Well |
| Caelum | eval { qr/$code/ } |
| buu | push @x, eval { qr/$code/ }; @x=grep$_,@x; Or perhaps my @valid = grep { eval{qr/$_/} } @res; But you lose the qr object |
| Caelum | this coworker is telling me DB_File gets corrupted if storing more than 10k records... |
| ATinyMouse | buu: Thanks! That is exactly what I was looking for |
| puff | Anybody know, offhand, what a urlencoded newline looks like? |
| ATinyMouse | Without the {} my script was bombing at the first invalid regex.... |
| Caelum | puff: %0A |
| puff | Caelum: Danke. |
| ATinyMouse | or %0D%0A if you are on windoz..... |
| puff | yah... I mainly need to to test some error-handlnig. |
| Caelum | URI can encode stuff into URLs |
| Aankhen`` | What is the best way to remove all the elements of a list which match an arbitrary criteria? I'm thinking `@foo = grep { !... } @foo`, but I'd welcome any better suggestions. |
| stuuf | eval: URI::Escape::uri_escape("\n") |
| buubot | stuuf: %0A |
| buu | Aankhen``: Grep.. |
| Aankhen`` | buu: So what I thought, then? |
| buu | Yes. |