Skip to content

Instantly share code, notes, and snippets.

@sourishkrout
Created August 4, 2023 14:27
Show Gist options
  • Save sourishkrout/560e075b4cb2ee668610ff5e6e7bd96a to your computer and use it in GitHub Desktop.
Save sourishkrout/560e075b4cb2ee668610ff5e6e7bd96a to your computer and use it in GitHub Desktop.
How to use shebang in RUNME
use strict;
use warnings;

print "hi RUNME\n";
-- defines a factorial function
function fact (n)
    if n == 0 then
    return 1
    else
    return n * fact(n-1)
    end
end

print("enter a number:")
a = io.read("*number")        -- read a number
print(fact(a))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment