in reply to "Can't open perl script..." :-(
When I attempt to execute my "program"
The devil is in the details. You need to know:
The easiest thing to do is: 'cd' to the directory that contains your program, then issue the same command again. Better yet, set the default prompt to the directory where you are going to store all your perl programs, then you won't have to do any 'cd'ing.
Always use these two lines at the top of your programs:
use strict; use warnings; use 5.010; #if you are using version 5.10 or higher.
Always declare your variables with 'my', e.g.:
my $count = 1; while (my $line = <STDIN>) { ...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: "Can't open perl script..." :-(
by Erosia (Novice) on Feb 15, 2010 at 18:28 UTC | |
by molecules (Monk) on Feb 15, 2010 at 19:10 UTC | |
by AnomalousMonk (Archbishop) on Feb 15, 2010 at 20:58 UTC |