How to use exec statement to execute a statement
Execute a statement inside a string
We can use exec statement to create code on the fly and execute them.
exec "print 'Hello, world!'"
The code above generates the following result.
We can use exec statement to create code on the fly and execute them.
exec "print 'Hello, world!'"
The code above generates the following result.