Regular Expression Annoyance

Jan Henning Thorsen pm at flodhest.net
Sat Jun 12 09:49:25 PDT 2010


Can't you just store the value of $1? Like:

 my $s;
 $mech->content_unlike( ($s) = qr/Error: ([^>]+)/, 'No error message' );
 diag $s if $s;

?

On Thu, Jun 10, 2010 at 3:33 PM, Tom Hukins <tom at eborcom.com> wrote:
> On Thu, Jun 10, 2010 at 02:13:31PM +0100, Colin Newell wrote:
>> I'm of the opinion that you're trying to hard and that your solution
>> is perfectly reasonable if a little confusing.
>
> Thanks, Colin.  Maybe I'm frustrated because Perl often fits with the
> way I think, just not in this case.
>
> Now I wonder whether Perl really does fit the way I think or whether I
> do things in a Perlish way after 15 years of brainwashing..
>
> Tom
> _______________________________________________
> MiltonKeynes-pm mailing list
> MiltonKeynes-pm at pm.org
> http://mail.pm.org/mailman/listinfo/miltonkeynes-pm
>


More information about the MiltonKeynes-pm mailing list