| UNIX/Linux Forum Archives · Rules and Guidelines · Disclaimer |
Help
Search
Members
Calendar
|
| Welcome Guest ( Log In | Register ) | Resend Validation Email |
![]() ![]() ![]() |
| drakokatze |
Posted: Feb 10 2005, 04:36 AM
|
|
Newbie ![]() Group: Members Posts: 3 Member No.: 804 Joined: 10-February 05 |
I'm trying to teach myself Pearl, but for some reason the terminal will not let me run the programs that I am writing. I've tried the chmod u+x program_filename after I wrote the program, but that does not seem to be helping. Does anyone have any tips for me? :(
|
| fishsponge |
Posted: Feb 11 2005, 09:39 AM
|
|
Administrator ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Admin Posts: 679 Member No.: 1 Joined: 13-February 03 |
first of all, you mean perl, not pearl.
what command are you using to run the perl script? can you post your script in this topic inside [code] tags? |
| drakokatze |
Posted: Feb 13 2005, 04:43 AM
|
|
Newbie ![]() Group: Members Posts: 3 Member No.: 804 Joined: 10-February 05 |
I've tried both of these methods:
method 1 perl [-switch] program_name method 2 put #!/usr/local/bin/perl at the first line in the script. (doesn't work with [#!/usr/bin/perl -w], either. set file permission to be executable. chmod u+x program_name program_name neither of them seemed to want to work. Here's an example of a cript that I tried. [#!/usr/bin/perl -w print "Money value in US \$ "; $us_money = <STDIN> ; chomp $us_money; $can_money = $us_money /0.6; print "US\$ $us_money = Canandian \$ $can_money\n";] |
| drakokatze |
Posted: Feb 13 2005, 05:04 AM
|
|
Newbie ![]() Group: Members Posts: 3 Member No.: 804 Joined: 10-February 05 |
sorry, that should be "script," not cript.
|
![]() |
![]() ![]() ![]() |