Sat, Nov 30, 10:21 PM CST

Renderosity Forums / Poser Technical



Welcome to the Poser Technical Forum

Forum Moderators: Staff

Poser Technical F.A.Q (Last Updated: 2024 Nov 13 12:50 am)

Welcome to the Poser Technical Forum.

Where computer nerds can Pull out their slide rules and not get laughed at. Pocket protectors are not required. ;-)

This is the place you come to ask questions and share new ideas about using the internal file structure of Poser to push the program past it's normal limits.

New users are encouraged to read the FAQ sections here and on the Poser forum before asking questions.



Checkout the Renderosity MarketPlace - Your source for digital art content!



Subject: How do I run a perl script?


insomniaworks ( ) posted Tue, 15 March 2005 at 5:14 PM · edited Sat, 30 November 2024 at 10:20 PM

I am working with new team of developers. The team leader has sent me perl scripts to aid in poser product developement. This might sound stupid, but how do I run a perl script in windows xp?


operaguy ( ) posted Tue, 15 March 2005 at 5:54 PM

The only way I know to trigger a PERL script to run is to point my browser to it in the cgi-bin directory of a web server. I don't know if there's a pure windows version of PERL....there must be. Normally when the script runs if finds PERL based on the path on the first line of the script, usually at the root of a Unix or Linux file server like Apache. Your team leader didn't give you instructions? ::::: Opera :::::


insomniaworks ( ) posted Tue, 15 March 2005 at 6:02 PM

here is his directions on the subject ---snip--- open a command prompt to that folder and do this on the command line: perl morphtarget.pl grpPitFiend.obj reposed.obj > PitFiendRepose.obj You now have a new object called PitFiendRepose.obj. ---snip--- I have tried to open up my command prompt in the same folder and typed in what he said, but I get the reply "perl is not recognized as an internal or external command". I have asked him twice by email and he keeps sending me the same instuctions. He acts like I already should know what I am doing. I have asked a few friends and they don't know. I have done a search on a search engine and I keep getting all sorts of information, much much more than I need - when all I want to do is run one!!! You know I must be getting very fustrated to post this question here,..hehehehe. All I want to do is run a .pl file. marty


insomniaworks ( ) posted Tue, 15 March 2005 at 6:07 PM

and by the way, windows xp help has nothing on the "perl" subject


operaguy ( ) posted Tue, 15 March 2005 at 7:16 PM

the .pl file requires the application PERL to be resident, and the first line of morphtarget.pl should contain a declared path TO the application. PERL scripts cannot run without PERL, i don't think! I wish I could help more....I am at the limit of my knowlege. ::::: Opera :::::


insomniaworks ( ) posted Tue, 15 March 2005 at 8:13 PM

how do I get perl to be resident?


bushi ( ) posted Tue, 15 March 2005 at 8:18 PM

Attached Link: ActiveState Perl Install Site

You can find a free perl interpreter and installation instructions at the link. It's pretty much like any other scripting language in that you need the interpreter to run the script.


insomniaworks ( ) posted Tue, 15 March 2005 at 9:44 PM

I downloaded ActiveState Perl Install a few days ago. I am still looking for a simple explanation on how to use it to run a .pl script because when I look at the documentation, I get very confused. Pretend that I know nothing, (which I don't), how do I run a script with it. marty


nruddock ( ) posted Fri, 18 March 2005 at 5:43 PM

The first thing I need to know to help, is which Installer did you download, the .MSI or the .ZIP ?

The .MSI installer should associate the extension .PL with the PERL executable, and set your PATH correctly so that you can run scripts from the command prompt.

If you downloaded the .ZIP and just unpacked it, then you will have to make the PATH changes manually, or use the full path to the executable on the command line, i.e. binperl

More detail once you supply some info like Windows version, PERL version, etc.


animajikgraphics ( ) posted Tue, 29 March 2005 at 5:41 AM

Once you get your perl interpreter installed, it's simply a matter of making sure the fisrt line in the script you have points to the installed version of perl. It's the first line in the code and will look something like this: #! If that is correct, all you need to to in run it from the command line as: perl scripttorun.pl



FatCatAlley.net | Now Playing "SpaceCat 5" Parts 1 and 2


sicowan ( ) posted Tue, 29 March 2005 at 8:30 AM

Hi there Insomniaworks,
I run perl scripts a lot from the command prompt for doing all sorts of usefull things, Perl is really good at doing monotonous tasks like creating HTML on the fly, writing batch files, cutting and editing text to seperate documents...blah,blah,blah.
I think what you will need to do is the following: inside your Perl folder on the root of your hard-drive (probably C: drive) create a new folder to paste your perl scripts into, in this case morphtarget.pl. Call the folder whatever you like, I call mine myperl just for ease of getting to it from the command prompt.
Paste into the same folder the obj files you will need in this case it looks like grpPitFiend.obj & reposed.obj. I would imagine PitFiendRepose.obj is going to be the name of the object file that is created by the Perl script.
Now open the command prompt. Type in cd Perlmyperl. now type in (without quotes)"perl morphtarget.pl grpPitFiend.obj reposed.obj > PitFiendRepose.obj". If as stated further up the thread your perl file has the code
#!/perl/bin/perl
Pasted into the top line of your perl file then it should find and run the perl.exe.
The new obj file will be created (i presume) in your copy of the myperl folder ready to be cut and pasted into the runtime/geometries folder of your choice.
I hope this helps.
Cheers,
Sicowan


sicowan ( ) posted Tue, 29 March 2005 at 8:44 AM

file_200926.gif

As an addition I created a small script entitled morphtarget.pl and pasted it into my myperl folder. The script had nothing more that this in it-

#!/usr/bin/perl
print "Yes this works!";

The image shows what I did to run it via the command prompt.

Sicowan


nruddock ( ) posted Tue, 29 March 2005 at 9:17 AM

From what insomniaworks said in post #3, when he installed PERL, the path didn't get set properly (it's usually inconvenient to always run scripts from the install directory).
How to fix that permenantly requires editing the system PATH environment variable, detailed instructions for which depend on the Windows version being used.

The #! is a Unix / Linux thing which allows you to set the shell to be called to run the script, it's irrelevant on Windows as this line will get treated like any other comment.

To run a script without invoking the PERL interpreter directly on the command line the .pl extension needs to be correctly associated with perl.exe


Privacy Notice

This site uses cookies to deliver the best experience. Our own cookies make user accounts and other features possible. Third-party cookies are used to display relevant ads and to analyze how Renderosity is used. By using our site, you acknowledge that you have read and understood our Terms of Service, including our Cookie Policy and our Privacy Policy.