in reply to Re: parsing and evaluating a string
in thread parsing and evaluating a string

Sorry, should have been a bit more clear. The '+' is a concat operator not a sum operator.

Replies are listed 'Best First'.
Re^3: parsing and evaluating a string
by davido (Cardinal) on Apr 24, 2006 at 15:15 UTC

    Maybe this then:

    use strict; use warnings; my $input = "char(123)+char(107)+char(112)+char(42)"; my $output .= chr( $_ ) foreach $input =~ m/(\d+)/g; print "$output\n";

    Dave