Root in a perl script

I don’t know if it’s the rigth place where post my question…
I tried to search an answer with the help of GOOGLE, but I didn’t find anything for me… (Sorry…it is my firts perl script…)
I’d want to write a perl script that execute some root commands…
Ok if I put all the root commands in a macro.C and write in the .pl file the line
system (“root .x macro.C”);

But I’d prefer to work with functions and call them with
.L macro.C
myfunction(input parameters)

Which lines I have to write in my .pl script?
I tried
system (“root”);
system (".L macro.C");
system (“myfunc()”);

but it doesn’t work :frowning:


Thanks and… happy new year!

see page 2 of