The device is a USB voice recorder attached to a USB 4-port hub. The device works fine in 1 port, but when attaching to the port I wish to connect to on the hub it does not work even though the green light on the hub comes on and Windows seems to find it fine and I can safely remove it via the...
Given,
$string = "if ((33 * 11) > 1500) { $result = 1; } else { $result = 0; }"
How do I execute the if statement within the same perl script the string is defined in?
Thanks in advance.
How do I call a subroutine named in a string?
Instead of:
sub test($$) {
my $lookfor = shift;
my $string = shift;
print "\n$lookfor ";
if($string =~ m/($lookfor)/) { print " is in ";
} else {
print " is NOT in "; } print "$string."; if(defined($1)) { print "...
I need to create a form that allows users to enter a formula then parses and evaluates it to return a 1 or 0 on the backend. I am struggling with the logic of how to evaluate the string by storing the contents of the inner most parenthesis first, pair it with the appropriate operator then...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.