Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Compiling perl

Status
Not open for further replies.

theEclipse

Programmer
Dec 27, 1999
1,190
US
I was just wondering how to compile perl programs in the xwindows, or kde enviroment.<br><br>I am running a version of caldera. <p>theEclipse<br><a href=mailto:eclipse_web@hotmail.com>eclipse_web@hotmail.com</a><br><a href=robacarp.webjump.com>robacarp.webjump.com</a><br>**-Trying to build a documentation of a Javascript DOM, crossbrowser, of course. E-mail me if you know of any little known events and/or methods, etc.
 
Perl compiles itself as it runs.&nbsp;&nbsp;If you have perl already on your system say in /usr/local/bin and you write a perl script you have to start the script with &quot;#!/usr/local/bin/perl&quot;&nbsp;&nbsp;and do a &quot;chmod u+x {filename}&quot; to make your script executable.&nbsp;&nbsp;then just type the name of your script, perl will compile it and run it.&nbsp;&nbsp;If you run perl as &quot;#!/usr/local/bin/perl -w&quot; you will get debug messages.&nbsp;&nbsp;Hope this helps.<br><br> <p>Jon Zimmer<br><a href=mailto:b0rg@pcgeek.net>b0rg@pcgeek.net</a><br><a href= > </a><br>You WILL be assimilated, or we can write a script to parse you out.
 
uh, where do I <br><br>&gt;do a &quot;chmod u+x {filename}&quot;<br><br>?<br><br> <p>theEclipse<br><a href=mailto:eclipse_web@hotmail.com>eclipse_web@hotmail.com</a><br><a href=robacarp.webjump.com>robacarp.webjump.com</a><br>**-Trying to build a documentation of a Javascript DOM, crossbrowser, of course. E-mail me if you know of any little known events and/or methods, etc.
 
Eclipse,<br><br>Do a &quot;chmod u+x {filename}&quot; wherever you wrote the script. For example, say you write a perl script called foo.pl in your home directory just type &quot;chmod u+x /home/eclipse/foo.pl&quot; That will make the script executable, then run ./foo.pl from your home directory (or without the &quot;./&quot; if the directory where foo.pl resides is in your path), PERL will compile it on the fly as it runs.&nbsp;&nbsp;If you put &quot;#!/where/you/put/perl -w&quot; it will issue debug warnings as it goes.&nbsp;&nbsp;Take the &quot;-w&quot; out to silence the messages. <p>Jon Zimmer<br><a href=mailto:b0rg@pcgeek.net>b0rg@pcgeek.net</a><br><a href= Aetea Information Technology</a><br>The software required `Windows 95 or better', so I installed Linux.<br>
 
bOrg - <br>I did figure that out, later, but the script dosn't run on its own.<br><br>I did the chmod command, but when I try to run it, it returns an error that says something like: file or folder dosn't exist.<br><br>but when I type 'perl foo.pl' It runs the script.<br><br>also, after I run the chmod command, in kde, the perl file gets a gear icon (which is the icon for programs).<br><br>by the way - I like the signature &quot;The software required Windows 95 or better', so I installed Linux.&quot; <p>theEclipse<br><a href=mailto:eclipse_web@hotmail.com>eclipse_web@hotmail.com</a><br><a href=robacarp.webjump.com>robacarp.webjump.com</a><br>**-Trying to build a documentation of a Javascript DOM, crossbrowser, of course. E-mail me if you know of any little known events and/or methods, etc.
 
Did you tell the program where perl was in the first stanza of your script (ie., #!/bin/perl)?&nbsp;&nbsp;Do a <p>Jon Zimmer<br><a href=mailto:b0rg@pcgeek.net>b0rg@pcgeek.net</a><br><a href= Aetea Information Technology</a><br>The software required `Windows 95 or better', so I installed Linux.<br>
 
uh.. do a what?<br><br>and yes. <p>theEclipse<br><a href=mailto:eclipse_web@hotmail.com>eclipse_web@hotmail.com</a><br><a href=robacarp.webjump.com>robacarp.webjump.com</a><br>**-Trying to build a documentation of a Javascript DOM, crossbrowser, of course. E-mail me if you know of any little known events and/or methods, etc.
 
Sorry that must've been cut off or something.&nbsp;&nbsp;I meant to say do a &quot;whence perl&quot; to see where the perl binary lived. <p>Jon Zimmer<br><a href=mailto:b0rg@pcgeek.net>b0rg@pcgeek.net</a><br><a href= Aetea Information Technology</a><br>The software required `Windows 95 or better', so I installed Linux.<br>
 
bOrg-<br><br>when I do the 'whence perl', it just says that the command is not a valid command. actually, it says &quot;bash: whence: command not found&quot;<br><br> <p>theEclipse<br><a href=mailto:eclipse_web@hotmail.com>eclipse_web@hotmail.com</a><br><a href=robacarp.webjump.com>robacarp.webjump.com</a><br>**-Trying to build a documentation of a Javascript DOM, crossbrowser, of course. E-mail me if you know of any little known events and/or methods, etc.
 
Try a <i>&quot;which perl&quot;</i> if neither of those work look in /bin or /usr/local/bin to see if you have perl on your system, if you don't you need to get perl from places like <A HREF=" TARGET="_new"> . Download it and install it. <p>Jon Zimmer<br><a href=mailto:b0rg@pcgeek.net>b0rg@pcgeek.net</a><br><a href= Aetea Information Technology</a><br>The software required `Windows 95 or better', so I installed Linux.<br>
 
I typed which perl, and it said /usr/bin/perl<br><br>so I exchanged that for the line at the top of the perl script. now, I can run it just by typing the name at the prompt, in a terminal.&nbsp;&nbsp;but after it fininshes running, it dosn't put the prompt back. GRRR. <p>theEclipse<br><a href=mailto:eclipse_web@hotmail.com>eclipse_web@hotmail.com</a><br><a href=robacarp.webjump.com>robacarp.webjump.com</a><br>**-Trying to build a documentation of a Javascript DOM, crossbrowser, of course. E-mail me if you know of any little known events and/or methods, etc.
 
Well, now you got me.&nbsp;&nbsp;Try posting this thread in the Perl forum, see if any of the real perl guru's have an answer to that one. <p>Jon Zimmer<br><a href=mailto:b0rg@pcgeek.net>b0rg@pcgeek.net</a><br><a href= Aetea Information Technology</a><br>The software required `Windows 95 or better', so I installed Linux.<br>
 
thanks anyway. <p>theEclipse<br><a href=mailto:eclipse_web@hotmail.com>eclipse_web@hotmail.com</a><br><a href=robacarp.webjump.com>robacarp.webjump.com</a><br>**-Trying to build a documentation of a Javascript DOM, crossbrowser, of course. E-mail me if you know of any little known events and/or methods, etc.
 
Try a &quot;whereis perl&quot;.

That should tell you.

Then, whever the perl binary is, that is what you include in your shebang line:

i.e.,

[tt]
> whereis perl
/usr/bin/perl
[/tt]

Then..

[tt]
#!/usr/bin/perl
[/tt]

Should do it.

Hope this helps,

-Vic vic cherubini
vikter@epicsoftware.com
====
Knows: Perl, HTML, JavScript, C/C++, PHP, Flash, Director
====
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top