Ling/CSE 472: Using Perl for this class
On the PCs the LLC (109 Denny) or the PCs running Windows
in the Treehouse
Note: Please post to EPost if these instructions
are inaccurate.
- Click on "My Documents" in the start menu.
- In the C:\ drive, find the Perl folder.
- Make a subfolder called "bin".
- Use notepad to save a copy of the script you're modifying,
with a .pl extension, in C:\Perl\bin.
- From the start menu, select "run".
- In the window that pops up, type "cmd". This will open
up another window with a prompt.
- In this window, type "cd Perl\bin" to get to the
folder with your script.
- To run the script, type "perl filename.pl" in the command window.
- Edit your script in textedit, save it, and test it again
with "perl filename.pl".
- NB - any files you save on an LLC machine might be erased.
Always back up your work on a floppy or by ftping it to your Dante
account.
On Dante
- Log in to Dante using ssh.
- Type S at the initial screen to get a shell.
- Make a directory for your scripts: mkdir perlscripts
- Go to that directory: cd perlscripts
- Use emacs and cut and paste to make a copy of the
starter script you're working on. Save it with a .pl
extension (ctrl-x s to save).
- Open a second Dante window to run the script (with ssh),
and type S to get to the shell.
- In the second Dante window, cd perlscripts
- To run a script type
perl filename.pl
- Edit your script in emacs, and save it.
- Run it again in the second Dante window to test your changes.
On the Linux Treehouse monkeys
- Log in
- Make a directory for your scripts: mkdir myname-perlscripts
- Go to that directory: cd myname-perlscripts
- Open emacs: emacs &
- Use emacs and cut and paste to make a copy of the
starter script you're working on. Save it with a .pl
extension (ctrl-x s to save).
- To run a script type
perl filename.pl
in the terminal window.
- Edit your script in emacs, and save it.
- Run it again to test your changes.
On a Mac running OS X
Note: To verify: Do the macs in 112 Denny have perl?
(They should.)
- Make a directory, say, inside ~/Documents.
- Save a copy of the perl script you're working on in that directory,
with the extension .pl.
- Edit the perl script with emacs, textedit, or Word (be sure to
save it as a text file if you're using Word).
- To run the script, in your terminal window, type
perl filename.pl
- Edit the script with your favorite text editor, and save it.
- Run it again from the terminal window to see the effect
of your changes.
- NB - any files you save on an LLC machine might be erased.
Always back up your work on a floppy or by ftping it to your Dante
account.
Back to main course page