Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^2: parsing and evaluating a string

by bfdi533 (Friar)
on Apr 24, 2006 at 12:52 UTC ( [id://545264]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://545264]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (4)
As of 2024-03-19 07:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found