FAQ Database Discussion Community


Parse Perl range string such as “1,4..7,10,11” [duplicate]

perl,parsing,eval
This question already has an answer here: Is there a Perl module for parsing numbers, including ranges? 1 answer Given a string such as 1,4..7,10,11, is there a neat way to parse it into the list (1,4,5,6,7,10,11)? The string is given as a command-line argument. My plan is ensure...

Using Javascript's eval() on HTML Text

javascript,html,eval
I am toying around with some basic constructs in HTML and Javascript (i.e., I am a HTML/Javascript n00b), and there is a feature I simply cannot seem to implement properly. In a nutshell, I'd like to grab text from the body of an HTML page and evaluate it using Javascript...

JS - Call function by name (in object notation)

javascript,window,eval,object-notation
I want to clean up some old code and optimize it, which often uses the same code. (with only different names of functions to call) I make a easier example and no, I don't write on a game. But this example looks more comprehensible to explaination of my issue. character.sleep(1);...

Can an inserted