Log in



Tags » ‘perl’

What is typically the easiest way to run a perl program (w parameters) on a host’s server (os = linux)?

November 17th, 2010 by

Question by bubbles: What is typically the easiest way to run a perl program (w parameters) on a host’s server (os = linux)?

Thanks! And by “command line” you mean like via telnet?

Best answer:

Answer by jplatt39
If the program begin #!/bin/perl then just save it to your user directory, type “chmod +x ” and run it with “./ . If it doesn’t then just save it to your directory and type “perl “.

For more information your host’s administrators should have documentation available, either on-line or elsewhere. You can try typing “perldoc perlintro” at the command line and see what happens.

If you are accessing the computer by telnet then yes I mean the telnet command line. If you are using OpenSSH then you are probably making your administrator happier though.
Look up PuTTY and see if your server supports it.

Add your own answer in the comments!

adding two values to a hash table in perl?

November 16th, 2010 by

Question by E-dude: adding two values to a hash table in perl?
how do i add two values (one in keys and one in values) to a hash table. can a foreach loop be used?

Best answer:

Answer by mark r
It has been a while but you want to do something like this:
$my_aa{$key} = $value

you can use a foreach loop to read and set the various key/value variables.

This page contains more infomation about hashes/associative arrays:

http://www.ebb.org/PickingUpPerl/pickingUpPerl_6.html

this page also gives some useful info

http://www.comp.leeds.ac.uk/Perl/associative.html

What do you think? Answer below!


Powered by Yahoo! Answers